drm/vc4: crtc: Switch to DRM-managed CRTC initialization
authorMaxime Ripard <maxime@cerno.tech>
Wed, 11 May 2022 09:05:36 +0000 (11:05 +0200)
committerMaxime Ripard <maxime@cerno.tech>
Wed, 7 Sep 2022 08:53:02 +0000 (10:53 +0200)
commitfce2a2b465bc8a2828dfa5edde0059d56e9cc489
tree17665e5774c06395a2782cdb0a8cd23d7d1b6642
parentdea46090b34fd165478ca216d232687d341a46e5
drm/vc4: crtc: Switch to DRM-managed CRTC initialization

The current code will call drm_crtc_cleanup() when the device is
unbound. However, by then, there might still be some references held to
that CRTC, including by the userspace that might still have the DRM
device open.

Let's switch to a DRM-managed initialization to clean up after ourselves
only once the DRM device has been last closed.

Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
drivers/gpu/drm/vc4/vc4_crtc.c
drivers/gpu/drm/vc4/vc4_drv.h
drivers/gpu/drm/vc4/vc4_txp.c