Maxime Ripard
2025-Jan-06 08:55 UTC
[PATCH v2 0/5] drm/connector: make mode_valid() callback accept const mode pointer
On Mon, Jan 06, 2025 at 12:47:07AM +0200, Dmitry Baryshkov wrote:> On Sat, Dec 14, 2024 at 03:37:04PM +0200, Dmitry Baryshkov wrote: > > While working on the generic mode_valid() implementation for the HDMI > > Connector framework I noticed that unlike other DRM objects > > drm_connector accepts non-const pointer to struct drm_display_mode, > > while obviously mode_valid() isn't expected to modify the argument. > > > > Mass-change the DRM framework code to pass const argument to that > > callback. > > > > The series has been compile-tested with defconfig for x86-64, arm and > > arm64. > > > > Note: yes, I understand that this change might be hard to review and > > merge. The only viable option that I foresee is to add new callback, > > having the const argument and migrate drivers into using it one by one. > > Colleagues, I'd like to graciously ping regarding this series. Should it > be merged as is (possibly requiring more R-B's)? Or should I rework it > adding something like .mode_valid_new() callback which takes const > argument?I think your patch is fine, and you can add my Reviewed-by: Maxime Ripard <mripard at kernel.org> We seem to lack an Acked-by for amdgpu though? Maxime -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 273 bytes Desc: not available URL: <https://lists.freedesktop.org/archives/nouveau/attachments/20250106/f22973ea/attachment.sig>
Dmitry Baryshkov
2025-Jan-06 09:45 UTC
[PATCH v2 0/5] drm/connector: make mode_valid() callback accept const mode pointer
On Mon, 6 Jan 2025 at 10:55, Maxime Ripard <mripard at kernel.org> wrote:> > On Mon, Jan 06, 2025 at 12:47:07AM +0200, Dmitry Baryshkov wrote: > > On Sat, Dec 14, 2024 at 03:37:04PM +0200, Dmitry Baryshkov wrote: > > > While working on the generic mode_valid() implementation for the HDMI > > > Connector framework I noticed that unlike other DRM objects > > > drm_connector accepts non-const pointer to struct drm_display_mode, > > > while obviously mode_valid() isn't expected to modify the argument. > > > > > > Mass-change the DRM framework code to pass const argument to that > > > callback. > > > > > > The series has been compile-tested with defconfig for x86-64, arm and > > > arm64. > > > > > > Note: yes, I understand that this change might be hard to review and > > > merge. The only viable option that I foresee is to add new callback, > > > having the const argument and migrate drivers into using it one by one. > > > > Colleagues, I'd like to graciously ping regarding this series. Should it > > be merged as is (possibly requiring more R-B's)? Or should I rework it > > adding something like .mode_valid_new() callback which takes const > > argument? > > I think your patch is fine, and you can add my > > Reviewed-by: Maxime Ripard <mripard at kernel.org> > > We seem to lack an Acked-by for amdgpu though?Yes. I think the AMD is the only one missing -- With best wishes Dmitry
Apparently Analagous Threads
- [PATCH v2 0/5] drm/connector: make mode_valid() callback accept const mode pointer
- [PATCH v2 0/5] drm/connector: make mode_valid() callback accept const mode pointer
- [PATCH 1/4] drm/nouveau/disp: don't misuse kernel-doc comments
- [PATCH] drm/nouveau: Fix out-of-bounds access when deferencing MMU type
- [PATCH] drm/nouveau: Fix out-of-bounds access when deferencing MMU type