All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] drm/bridge: lt9611: Fix handling of 4k panels
@ 2020-11-23 10:46 ` Robert Foss
  0 siblings, 0 replies; 9+ messages in thread
From: Robert Foss @ 2020-11-23 10:46 UTC (permalink / raw)
  To: a.hajda, narmstrong, Laurent.pinchart, jonas, jernej.skrabec,
	airlied, daniel, dri-devel, linux-kernel, John Stultz,
	Peter Collingbourne
  Cc: Alistair Delva, Anibal Limon, Vinod Koul, Robert Foss,
	Bjorn Andersson

4k requires two dsi pipes, so don't report MODE_OK when only a
single pipe is configured. But rather report MODE_PANEL to
signal that requirements of the panel are not being met.

Reported-by: Peter Collingbourne <pcc@google.com>
Suggested-by: Peter Collingbourne <pcc@google.com>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Tested-by: John Stultz <john.stultz@linaro.org>
---
 drivers/gpu/drm/bridge/lontium-lt9611.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/bridge/lontium-lt9611.c b/drivers/gpu/drm/bridge/lontium-lt9611.c
index d734d9402c35..e8eb8deb444b 100644
--- a/drivers/gpu/drm/bridge/lontium-lt9611.c
+++ b/drivers/gpu/drm/bridge/lontium-lt9611.c
@@ -867,8 +867,14 @@ static enum drm_mode_status lt9611_bridge_mode_valid(struct drm_bridge *bridge,
 						     const struct drm_display_mode *mode)
 {
 	struct lt9611_mode *lt9611_mode = lt9611_find_mode(mode);
+	struct lt9611 *lt9611 = bridge_to_lt9611(bridge);
 
-	return lt9611_mode ? MODE_OK : MODE_BAD;
+	if (!lt9611_mode)
+		return MODE_BAD;
+	else if (lt9611_mode->intfs > 1 && !lt9611->dsi1)
+		return MODE_PANEL;
+	else
+		return MODE_OK;
 }
 
 static void lt9611_bridge_pre_enable(struct drm_bridge *bridge)
-- 
2.27.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-12-11  8:16 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-23 10:46 [PATCH v1] drm/bridge: lt9611: Fix handling of 4k panels Robert Foss
2020-11-23 10:46 ` Robert Foss
2020-11-23 16:04 ` Anibal Limon
2020-11-23 16:05 ` Vinod Koul
2020-11-23 16:05   ` Vinod Koul
2020-12-10 21:00 ` Peter Collingbourne
2020-12-10 21:00   ` Peter Collingbourne
2020-12-11  0:25 ` Bjorn Andersson
2020-12-11  0:25   ` Bjorn Andersson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.