30bf65e3f2123f7fd60eee0ccb3de18ebf5f8770
[openwrt/staging/stintel.git] /
1 From b627cebfc64dd944b9571203e30456efbc0101c3 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
5 type
6
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.
10
11 Update to register the correct type.
12
13 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
14 ---
15 drivers/gpu/drm/vc4/vc4_dsi.c | 3 ++-
16 1 file changed, 2 insertions(+), 1 deletion(-)
17
18 --- a/drivers/gpu/drm/vc4/vc4_dsi.c
19 +++ b/drivers/gpu/drm/vc4/vc4_dsi.c
20 @@ -1506,7 +1506,8 @@ static int vc4_dsi_bind(struct device *d
21 return -ENOMEM;
22
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;
29