aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/imx/dw_hdmi-imx.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2020-05-26 04:14:49 +0300
committerSam Ravnborg <sam@ravnborg.org>2020-06-23 19:54:32 +0200
commit96591a4b93fb8b335941783dd6e7ded9d6d49f09 (patch)
treeb76c5023046a4e4aa1d5be15d486bc6de223acad /drivers/gpu/drm/imx/dw_hdmi-imx.c
parentdrm: bridge: Pass drm_display_info to drm_bridge_funcs .mode_valid() (diff)
downloadlinux-dev-96591a4b93fb8b335941783dd6e7ded9d6d49f09.tar.xz
linux-dev-96591a4b93fb8b335941783dd6e7ded9d6d49f09.zip
drm: bridge: dw-hdmi: Pass private data pointer to .mode_valid()
Platform glue drivers for dw_hdmi may need to access device-specific data from their .mode_valid() implementation. They currently have no clean way to do so, and one driver hacks around it by accessing the dev_private data of the drm_device retrieved from the connector. Add a priv_data void pointer to the dw_hdmi_plat_data structure, and pass it to the .mode_valid() function. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200526011505.31884-12-laurent.pinchart+renesas@ideasonboard.com
Diffstat (limited to 'drivers/gpu/drm/imx/dw_hdmi-imx.c')
-rw-r--r--drivers/gpu/drm/imx/dw_hdmi-imx.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/imx/dw_hdmi-imx.c b/drivers/gpu/drm/imx/dw_hdmi-imx.c
index ba4ca17fd4d8..95aed4666c95 100644
--- a/drivers/gpu/drm/imx/dw_hdmi-imx.c
+++ b/drivers/gpu/drm/imx/dw_hdmi-imx.c
@@ -145,7 +145,8 @@ static const struct drm_encoder_helper_funcs dw_hdmi_imx_encoder_helper_funcs =
};
static enum drm_mode_status
-imx6q_hdmi_mode_valid(struct drm_connector *con,
+imx6q_hdmi_mode_valid(struct dw_hdmi *hdmi, void *data,
+ struct drm_connector *con,
const struct drm_display_mode *mode)
{
if (mode->clock < 13500)
@@ -158,7 +159,8 @@ imx6q_hdmi_mode_valid(struct drm_connector *con,
}
static enum drm_mode_status
-imx6dl_hdmi_mode_valid(struct drm_connector *con,
+imx6dl_hdmi_mode_valid(struct dw_hdmi *hdmi, void *data,
+ struct drm_connector *con,
const struct drm_display_mode *mode)
{
if (mode->clock < 13500)