3db32889cd2afaed0f600d105de423635da5d08c
[openwrt/staging/jow.git] /
1 From 6314c24d162b32cfe3113329e5a44bfd7ac71ddc Mon Sep 17 00:00:00 2001
2 From: Maxime Ripard <maxime@cerno.tech>
3 Date: Wed, 23 Nov 2022 16:25:58 +0100
4 Subject: [PATCH] drm/vc4: txp: Initialise the CRTC before the encoder
5 and connector
6
7 It makes more sense to register the CRTC before the encoder and
8 connectors, so let's move our call around.
9
10 Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
11 Signed-off-by: Maxime Ripard <maxime@cerno.tech>
12 Link: https://patchwork.freedesktop.org/patch/msgid/20221123-rpi-kunit-tests-v1-16-051a0bb60a16@cerno.tech
13 ---
14 drivers/gpu/drm/vc4/vc4_txp.c | 10 +++++-----
15 1 file changed, 5 insertions(+), 5 deletions(-)
16
17 --- a/drivers/gpu/drm/vc4/vc4_txp.c
18 +++ b/drivers/gpu/drm/vc4/vc4_txp.c
19 @@ -516,6 +516,11 @@ static int vc4_txp_bind(struct device *d
20 vc4_crtc->regset.regs = txp_regs;
21 vc4_crtc->regset.nregs = ARRAY_SIZE(txp_regs);
22
23 + ret = vc4_crtc_init(drm, vc4_crtc,
24 + &vc4_txp_crtc_funcs, &vc4_txp_crtc_helper_funcs);
25 + if (ret)
26 + return ret;
27 +
28 vc4_encoder = &txp->encoder;
29 txp->encoder.type = VC4_ENCODER_TYPE_TXP;
30
31 @@ -537,11 +542,6 @@ static int vc4_txp_bind(struct device *d
32 if (ret)
33 return ret;
34
35 - ret = vc4_crtc_init(drm, vc4_crtc,
36 - &vc4_txp_crtc_funcs, &vc4_txp_crtc_helper_funcs);
37 - if (ret)
38 - return ret;
39 -
40 ret = devm_request_irq(dev, irq, vc4_txp_interrupt, 0,
41 dev_name(dev), txp);
42 if (ret)