Commit 7a5cd45f authored by Dmitry Baryshkov's avatar Dmitry Baryshkov
Browse files

drm/encoder_slave: make mode_valid accept const struct drm_display_mode



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: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: default avatarLyude Paul <lyude@redhat.com>
Reviewed-by: default avatarMaxime Ripard <mripard@kernel.org>
Reviewed-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241214-drm-connector-mode-valid-const-v2-1-4f9498a4c822@linaro.org


Signed-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
parent 69c0d83f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -104,7 +104,7 @@ static bool ch7006_encoder_mode_fixup(struct drm_encoder *encoder,
}

static int ch7006_encoder_mode_valid(struct drm_encoder *encoder,
				     struct drm_display_mode *mode)
				     const struct drm_display_mode *mode)
{
	if (ch7006_lookup_mode(encoder, mode))
		return MODE_OK;
+1 −1
Original line number Diff line number Diff line
@@ -255,7 +255,7 @@ sil164_encoder_restore(struct drm_encoder *encoder)

static int
sil164_encoder_mode_valid(struct drm_encoder *encoder,
			  struct drm_display_mode *mode)
			  const struct drm_display_mode *mode)
{
	struct sil164_priv *priv = to_sil164_priv(encoder);

+1 −1
Original line number Diff line number Diff line
@@ -308,7 +308,7 @@ static int nv17_tv_get_modes(struct drm_encoder *encoder,
}

static int nv17_tv_mode_valid(struct drm_encoder *encoder,
			      struct drm_display_mode *mode)
			      const struct drm_display_mode *mode)
{
	struct nv17_tv_norm_params *tv_norm = get_tv_norm(encoder);

+1 −1
Original line number Diff line number Diff line
@@ -85,7 +85,7 @@ struct drm_encoder_slave_funcs {
	 * @mode_valid: Analogous to &drm_encoder_helper_funcs @mode_valid.
	 */
	int (*mode_valid)(struct drm_encoder *encoder,
			  struct drm_display_mode *mode);
			  const struct drm_display_mode *mode);
	/**
	 * @mode_set: Analogous to &drm_encoder_helper_funcs @mode_set
	 * callback. Wrapped by drm_i2c_encoder_mode_set().