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

2024-12-15 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 take a const struct drm_display_mode argument. Reviewed-by: Laurent Pinchart Signed-off-by: Dmitry Bary

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

2024-12-15 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 v2 3/5] drm/sti: hda: pass const struct drm_display_mode* to hda_get_mode_idx()

2024-12-15 Thread Dmitry Baryshkov
Make hda_get_mode_idx() take a 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 take a const struct drm_display_mode argument. Acked-by: Raphael Gallais-Pou Reviewed-by: Laurent Pin

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

2024-12-15 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. Reviewed-by: Laurent Pinchart Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/i2c/ch7006_drv.c

[PATCH v2 5/5] drm/connector: make mode_valid take a const struct drm_display_mode

2024-12-15 Thread Dmitry Baryshkov
The mode_valid() callbacks of drm_encoder, drm_crtc and drm_bridge take a const struct drm_display_mode argument. Change the mode_valid callback of drm_connector to also take a const argument. Acked-by: Jani Nikula Reviewed-by: Liviu Dudau Reviewed-by: Raphael Gallais-Pou Reviewed-by: Laurent P

[PATCH v2 4/5] drm/connector: make mode_valid_ctx take a const struct drm_display_mode

2024-12-15 Thread Dmitry Baryshkov
The mode_valid() callbacks of drm_encoder, drm_crtc and drm_bridge take a const struct drm_display_mode argument. Change the mode_valid_ctx callback of drm_connector to also take a const argument. Acked-by: Jani Nikula Reviewed-by: Laurent Pinchart Signed-off-by: Dmitry Baryshkov --- drivers/g