From b0febde779fd5d2e3e6f83843a828726117fe0a7 Mon Sep 17 00:00:00 2001 From: Jose Abreu Date: Thu, 25 May 2017 15:19:19 +0100 Subject: drm/bridge/synopsys: dw-hdmi: Use bridge->mode_valid() callback Now that we have a callback to check if bridge supports a given mode we can use it in Synopsys Designware HDMI bridge so that we restrict the number of probbed modes to the ones we can actually display. Also, there is no need to use mode_fixup() callback as mode_valid() will handle the mode validation. NOTE: I also had to change the pdata declaration of mode_valid custom callback so that the passed modes are const. I also changed in the platforms I found. Not even compiled it though. Signed-off-by: Jose Abreu Acked-by: Neil Armstrong Acked-by: Philipp Zabel Cc: Carlos Palminha Cc: Daniel Vetter Cc: Archit Taneja Cc: Andrzej Hajda Cc: Laurent Pinchart Cc: David Airlie Cc: Philipp Zabel Cc: Carlo Caione Cc: Kevin Hilman Cc: Mark Yao Cc: Heiko Stuebner Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/3d8d449e4d13d2535fa292c75f5fa931de4a4fa8.1495720737.git.joabreu@synopsys.com --- drivers/gpu/drm/imx/dw_hdmi-imx.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'drivers/gpu/drm/imx') diff --git a/drivers/gpu/drm/imx/dw_hdmi-imx.c b/drivers/gpu/drm/imx/dw_hdmi-imx.c index f039641..b62763a 100644 --- a/drivers/gpu/drm/imx/dw_hdmi-imx.c +++ b/drivers/gpu/drm/imx/dw_hdmi-imx.c @@ -147,8 +147,9 @@ static const struct drm_encoder_funcs dw_hdmi_imx_encoder_funcs = { .destroy = drm_encoder_cleanup, }; -static enum drm_mode_status imx6q_hdmi_mode_valid(struct drm_connector *con, - struct drm_display_mode *mode) +static enum drm_mode_status +imx6q_hdmi_mode_valid(struct drm_connector *con, + const struct drm_display_mode *mode) { if (mode->clock < 13500) return MODE_CLOCK_LOW; @@ -159,8 +160,9 @@ static enum drm_mode_status imx6q_hdmi_mode_valid(struct drm_connector *con, return MODE_OK; } -static enum drm_mode_status imx6dl_hdmi_mode_valid(struct drm_connector *con, - struct drm_display_mode *mode) +static enum drm_mode_status +imx6dl_hdmi_mode_valid(struct drm_connector *con, + const struct drm_display_mode *mode) { if (mode->clock < 13500) return MODE_CLOCK_LOW; -- cgit v1.1