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

Laurent Pinchart laurent.pinchart at ideasonboard.com
Sun Nov 17 21:21:56 UTC 2024


Hi Dmitry,

Thank you for the patch.

On Fri, Nov 15, 2024 at 11:09:29PM +0200, Dmitry Baryshkov wrote:
> 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.

I would write "take a const argument" instead of "accept". Same in the
other patches.

> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov at linaro.org>

Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas at ideasonboard.com>

> ---
>  drivers/gpu/drm/i915/display/intel_dp_mst.c | 2 +-
>  include/drm/drm_modeset_helper_vtables.h    | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> index 7be8fb047b6c17cb37b9021a2dbf430f0aaecfa2..cfefd89209ca864e19771c538ca00016f9322e74 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> @@ -1432,7 +1432,7 @@ static int intel_dp_mst_get_modes(struct drm_connector *connector)
>  
>  static int
>  intel_dp_mst_mode_valid_ctx(struct drm_connector *connector,
> -			    struct drm_display_mode *mode,
> +			    const struct drm_display_mode *mode,
>  			    struct drm_modeset_acquire_ctx *ctx,
>  			    enum drm_mode_status *status)
>  {
> diff --git a/include/drm/drm_modeset_helper_vtables.h b/include/drm/drm_modeset_helper_vtables.h
> index ec59015aec3cf3ba01510031c55df8c0b3e0b382..fa9ee6a128bec0205f501df6f7634757f5fcb9ee 100644
> --- a/include/drm/drm_modeset_helper_vtables.h
> +++ b/include/drm/drm_modeset_helper_vtables.h
> @@ -1006,7 +1006,7 @@ struct drm_connector_helper_funcs {
>  	 *
>  	 */
>  	int (*mode_valid_ctx)(struct drm_connector *connector,
> -			      struct drm_display_mode *mode,
> +			      const struct drm_display_mode *mode,
>  			      struct drm_modeset_acquire_ctx *ctx,
>  			      enum drm_mode_status *status);
>  

-- 
Regards,

Laurent Pinchart


More information about the Intel-gfx mailing list