1 From 9c1e7822d347b766bf3392c8b37fe5004e1bbaaf Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Mon, 8 Feb 2021 11:22:01 +0000
4 Subject: [PATCH] drm/vc4: Register dsi0 as the correct vc4 encoder
7 vc4_dsi was registering both dsi0 and dsi1 as VC4_ENCODER_TYPE_DSI1
8 which seemed to work OK for a single DSI display, but fails
9 if there are two DSI displays connected.
11 Update to register the correct type.
13 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
15 drivers/gpu/drm/vc4/vc4_dsi.c | 3 ++-
16 1 file changed, 2 insertions(+), 1 deletion(-)
18 --- a/drivers/gpu/drm/vc4/vc4_dsi.c
19 +++ b/drivers/gpu/drm/vc4/vc4_dsi.c
20 @@ -1510,7 +1510,8 @@ static int vc4_dsi_bind(struct device *d
23 INIT_LIST_HEAD(&dsi->bridge_chain);
24 - vc4_dsi_encoder->base.type = VC4_ENCODER_TYPE_DSI1;
25 + vc4_dsi_encoder->base.type = dsi->variant->port ?
26 + VC4_ENCODER_TYPE_DSI1 : VC4_ENCODER_TYPE_DSI0;
27 vc4_dsi_encoder->dsi = dsi;
28 dsi->encoder = &vc4_dsi_encoder->base.base;