summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/vc4/vc4_txp.c
diff options
context:
space:
mode:
authorMaxime Ripard <maxime@cerno.tech>2022-11-23 18:25:59 +0300
committerMaxime Ripard <maxime@cerno.tech>2022-11-28 13:51:13 +0300
commit3f98076f294fa58e83c87ebfb0af4ccf2454250d (patch)
treeceeb248a2251a5a9d4ed4d2ed2b3eb019cb47e31 /drivers/gpu/drm/vc4/vc4_txp.c
parent5676105188f8931c838342f2827ed9c3bd8593d7 (diff)
downloadlinux-3f98076f294fa58e83c87ebfb0af4ccf2454250d.tar.xz
drm/vc4: crtc: Pass the device and data in vc4_crtc_init
Both users of vc4_crtc_init need the same extra initialization to set the pointer to the platform_device and the CRTC data. Since it's mandatory, let's make them both arguments of vc4_crtc_init(). 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-17-051a0bb60a16@cerno.tech
Diffstat (limited to 'drivers/gpu/drm/vc4/vc4_txp.c')
-rw-r--r--drivers/gpu/drm/vc4/vc4_txp.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_txp.c b/drivers/gpu/drm/vc4/vc4_txp.c
index c2a6bea6fd96..841da240d93a 100644
--- a/drivers/gpu/drm/vc4/vc4_txp.c
+++ b/drivers/gpu/drm/vc4/vc4_txp.c
@@ -509,15 +509,12 @@ static int vc4_txp_bind(struct device *dev, struct device *master, void *data)
return PTR_ERR(txp->regs);
vc4_crtc = &txp->base;
- vc4_crtc->pdev = pdev;
- vc4_crtc->data = &vc4_txp_crtc_data;
- vc4_crtc->feeds_txp = true;
vc4_crtc->regset.base = txp->regs;
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);
+ ret = vc4_crtc_init(drm, pdev, vc4_crtc, &vc4_txp_crtc_data,
+ &vc4_txp_crtc_funcs, &vc4_txp_crtc_helper_funcs, true);
if (ret)
return ret;