lkml.org 
[lkml]   [2019]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v4 5/7] drm: rcar-du: lvds: Fix mode for companion encoder
Date
Primary and companion encoders need to set the same mode for
things to work properly.

rcar_lvds_mode_set gets called into for the primary encoder only,
therefore initialize the companion encoder mode while sorting
the primary encoder mode out.

Fixes: fa440d870358 ("drm: rcar-du: lvds: Add support for dual-link mode")
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>

---
v3->v4:
* New patch extracted from patch:
"drm: rcar-du: lvds: Add dual-LVDS panels support"
---
drivers/gpu/drm/rcar-du/rcar_lvds.c | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/drivers/gpu/drm/rcar-du/rcar_lvds.c b/drivers/gpu/drm/rcar-du/rcar_lvds.c
index cb2147c..eed5611 100644
--- a/drivers/gpu/drm/rcar-du/rcar_lvds.c
+++ b/drivers/gpu/drm/rcar-du/rcar_lvds.c
@@ -614,6 +614,18 @@ static void rcar_lvds_mode_set(struct drm_bridge *bridge,
lvds->display_mode = *adjusted_mode;

rcar_lvds_get_lvds_mode(lvds);
+ if (lvds->companion) {
+ struct rcar_lvds *companion_lvds = bridge_to_rcar_lvds(
+ lvds->companion);
+
+ /*
+ * FIXME: We should not be messing with the companion encoder
+ * private data from the primary encoder, but since
+ * rcar_lvds_mode_set gets called into for the primary encoder
+ * only, we don't have much of a choice for now.
+ */
+ companion_lvds->mode = lvds->mode;
+ }
}

static int rcar_lvds_attach(struct drm_bridge *bridge)
--
2.7.4
\
 
 \ /
  Last update: 2019-12-06 17:34    [W:0.160 / U:0.924 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site