[PATCH 2/3] drm/bridge/synopsys: dsi: extend the prototype of mode_valid()

Antonio Borneo antonio.borneo at foss.st.com
Sat Dec 18 13:50:53 PST 2021


To evaluate the validity of a video mode, some additional internal
value has to be passed to the platform implementation.

Extend the prototype of mode_valid().

Signed-off-by: Antonio Borneo <antonio.borneo at foss.st.com>
---
To: David Airlie <airlied at linux.ie>
To: Daniel Vetter <daniel at ffwll.ch>
To: Andrzej Hajda <a.hajda at samsung.com>
To: Neil Armstrong <narmstrong at baylibre.com>
To: Robert Foss <robert.foss at linaro.org>
To: Laurent Pinchart <Laurent.pinchart at ideasonboard.com>
To: Jonas Karlman <jonas at kwiboo.se>
To: Jernej Skrabec <jernej.skrabec at gmail.com>
To: Yannick Fertre <yannick.fertre at foss.st.com>
To: Philippe Cornu <philippe.cornu at foss.st.com>
To: Benjamin Gaignard <benjamin.gaignard at linaro.org>
To: Maxime Coquelin <mcoquelin.stm32 at gmail.com>
To: Alexandre Torgue <alexandre.torgue at foss.st.com>
To: Philipp Zabel <p.zabel at pengutronix.de>
To: dri-devel at lists.freedesktop.org
To: linux-stm32 at st-md-mailman.stormreply.com
To: linux-arm-kernel at lists.infradead.org
Cc: linux-kernel at vger.kernel.org
---
 drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 5 ++++-
 include/drm/bridge/dw_mipi_dsi.h              | 4 +++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
index e44e18a0112a..3f6564762e24 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
@@ -998,7 +998,10 @@ dw_mipi_dsi_bridge_mode_valid(struct drm_bridge *bridge,
 	enum drm_mode_status mode_status = MODE_OK;
 
 	if (pdata->mode_valid)
-		mode_status = pdata->mode_valid(pdata->priv_data, mode);
+		mode_status = pdata->mode_valid(pdata->priv_data, mode,
+						dsi->mode_flags,
+						dw_mipi_dsi_get_lanes(dsi),
+						dsi->format);
 
 	return mode_status;
 }
diff --git a/include/drm/bridge/dw_mipi_dsi.h b/include/drm/bridge/dw_mipi_dsi.h
index bda8aa7c2280..5286a53a1875 100644
--- a/include/drm/bridge/dw_mipi_dsi.h
+++ b/include/drm/bridge/dw_mipi_dsi.h
@@ -51,7 +51,9 @@ struct dw_mipi_dsi_plat_data {
 	unsigned int max_data_lanes;
 
 	enum drm_mode_status (*mode_valid)(void *priv_data,
-					   const struct drm_display_mode *mode);
+					   const struct drm_display_mode *mode,
+					   unsigned long mode_flags,
+					   u32 lanes, u32 format);
 
 	const struct dw_mipi_dsi_phy_ops *phy_ops;
 	const struct dw_mipi_dsi_host_ops *host_ops;
-- 
2.34.1




More information about the linux-arm-kernel mailing list