summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/vc4
diff options
context:
space:
mode:
authorMaxime Ripard <maxime@cerno.tech>2022-11-23 18:25:58 +0300
committerMaxime Ripard <maxime@cerno.tech>2022-11-28 13:51:07 +0300
commit5676105188f8931c838342f2827ed9c3bd8593d7 (patch)
tree393291bf0246acfbe4572bee2054564260c781b4 /drivers/gpu/drm/vc4
parentb998eb4fda0087f64bd068af758ae611188c7c9e (diff)
downloadlinux-5676105188f8931c838342f2827ed9c3bd8593d7.tar.xz
drm/vc4: txp: Initialise the CRTC before the encoder and connector
It makes more sense to register the CRTC before the encoder and connectors, so let's move our call around. Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://patchwork.freedesktop.org/patch/msgid/20221123-rpi-kunit-tests-v1-16-051a0bb60a16@cerno.tech
Diffstat (limited to 'drivers/gpu/drm/vc4')
-rw-r--r--drivers/gpu/drm/vc4/vc4_txp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_txp.c b/drivers/gpu/drm/vc4/vc4_txp.c
index 0bb8e97d7891..c2a6bea6fd96 100644
--- a/drivers/gpu/drm/vc4/vc4_txp.c
+++ b/drivers/gpu/drm/vc4/vc4_txp.c
@@ -516,6 +516,11 @@ static int vc4_txp_bind(struct device *dev, struct device *master, void *data)
vc4_crtc->regset.regs = txp_regs;
vc4_crtc->regset.nregs = ARRAY_SIZE(txp_regs);
+ ret = vc4_crtc_init(drm, vc4_crtc,
+ &vc4_txp_crtc_funcs, &vc4_txp_crtc_helper_funcs);
+ if (ret)
+ return ret;
+
vc4_encoder = &txp->encoder;
txp->encoder.type = VC4_ENCODER_TYPE_TXP;
@@ -537,11 +542,6 @@ static int vc4_txp_bind(struct device *dev, struct device *master, void *data)
if (ret)
return ret;
- ret = vc4_crtc_init(drm, vc4_crtc,
- &vc4_txp_crtc_funcs, &vc4_txp_crtc_helper_funcs);
- if (ret)
- return ret;
-
ret = devm_request_irq(dev, irq, vc4_txp_interrupt, 0,
dev_name(dev), txp);
if (ret)