OSDN Git Service

drm/vc4: dpi: Switch to DRM-managed encoder initialization
authorMaxime Ripard <maxime@cerno.tech>
Mon, 11 Jul 2022 17:38:59 +0000 (19:38 +0200)
committerMaxime Ripard <maxime@cerno.tech>
Wed, 13 Jul 2022 08:46:08 +0000 (10:46 +0200)
commite126d318002639c979f23764f5d496a78e9bd85e
tree8245afae6685b1aeeeaa656cc0f41a656c4fc0c7
parent77932adf2a2c9625da8bc8885b626690ee500601
drm/vc4: dpi: Switch to DRM-managed encoder initialization

The current code will call drm_encoder_cleanup() when the device is
unbound. However, by then, there might still be some references held to
that encoder, 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>
Link: https://lore.kernel.org/r/20220711173939.1132294-30-maxime@cerno.tech
drivers/gpu/drm/vc4/vc4_dpi.c