drm/vc4: crtc: Introduce a lower-level crtc init helper
authorMaxime Ripard <maxime@cerno.tech>
Thu, 1 Dec 2022 15:11:45 +0000 (16:11 +0100)
committerMaxime Ripard <maxime@cerno.tech>
Thu, 8 Dec 2022 08:56:56 +0000 (09:56 +0100)
commitee33ac2727da64f3e05dfa715d3079b265b2d124
treeac930ad7f19908d3f3ab1b5a7bc3afc7000b1a42
parent3c5cb5ec2e73a649d9416d4051d5cd3e9e3a9e43
drm/vc4: crtc: Introduce a lower-level crtc init helper

The current vc4_crtc_init() helper assumes that we will be using
hardware planes and calls vc4_plane_init().

While it's a reasonable assumption, we'll want to mock the plane and
thus provide our own. Let's create a helper that will take the plane as
an argument.

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: MaĆ­ra Canal <mcanal@igalia.com>
Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-14-4615a663a84a@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
drivers/gpu/drm/vc4/vc4_crtc.c
drivers/gpu/drm/vc4/vc4_drv.h