[PATCH 1/5] drm/encoder_slave: make mode_valid accept const struct drm_display_mode

2024-11-17 Thread Dmitry Baryshkov
The mode_valid() callbacks of drm_encoder, drm_crtc and drm_bridge accept const struct drm_display_mode argument. Change the mode_valid callback of drm_encoder_slave to also accept const argument. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/i2c/ch7006_drv.c | 2 +- drivers/gpu/d

[PATCH 5/5] drm/connector: make mode_valid accept const struct drm_display_mode

2024-11-17 Thread Dmitry Baryshkov
The mode_valid() callbacks of drm_encoder, drm_crtc and drm_bridge accept const struct drm_display_mode argument. Change the mode_valid callback of drm_connector to also accept const argument. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 8 -

[PATCH 3/5] drm/sti: hda: pass const struct drm_display_mode* to hda_get_mode_idx()

2024-11-17 Thread Dmitry Baryshkov
Make hda_get_mode_idx() accept const struct drm_display_mode pointer instead of just raw struct drm_display_mode. This is a preparation to converting the mode_valid() callback of drm_connector to accept const struct drm_display_mode argument. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/

[PATCH 0/5] drm/connector: make mode_valid() callback accept const mode pointer

2024-11-17 Thread Dmitry Baryshkov
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 co

[PATCH 4/5] drm/connector: make mode_valid_ctx accept const struct drm_display_mode

2024-11-17 Thread Dmitry Baryshkov
The mode_valid() callbacks of drm_encoder, drm_crtc and drm_bridge accept const struct drm_display_mode argument. Change the mode_valid_ctx callback of drm_connector to also accept const argument. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/i915/display/intel_dp_mst.c | 2 +- include/drm

[PATCH 2/5] drm/amdgpu: don't change mode in amdgpu_dm_connector_mode_valid()

2024-11-17 Thread Dmitry Baryshkov
Make amdgpu_dm_connector_mode_valid() duplicate the mode during the test rather than modifying the passed mode. This is a preparation to converting the mode_valid() callback of drm_connector to accept const struct drm_display_mode argument. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/amd