summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vc4/vc4_dpi.c
diff options
context:
space:
mode:
authorMaxime Ripard <maxime@cerno.tech>2022-07-11 19:39:00 +0200
committerMaxime Ripard <maxime@cerno.tech>2022-07-13 10:46:08 +0200
commit055af0235aef8110a1c44f5fc04c5c206e9e58fb (patch)
treea4920a92fd0f3fc45455d2d0eba7f22d90f216f0 /drivers/gpu/drm/vc4/vc4_dpi.c
parente126d318002639c979f23764f5d496a78e9bd85e (diff)
downloadlinux-055af0235aef8110a1c44f5fc04c5c206e9e58fb.tar.bz2
drm/vc4: dpi: Switch to drmm_of_get_bridge
The current code uses a device-managed function to retrieve the next bridge downstream. However, that means that it will be removed at unbind time, where the DRM device is still very much live and might still have some applications that still have it open. Switch to a DRM-managed variant to clean everything up 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-31-maxime@cerno.tech
Diffstat (limited to 'drivers/gpu/drm/vc4/vc4_dpi.c')
-rw-r--r--drivers/gpu/drm/vc4/vc4_dpi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_dpi.c b/drivers/gpu/drm/vc4/vc4_dpi.c
index ceb14aea6c05..660feea0534d 100644
--- a/drivers/gpu/drm/vc4/vc4_dpi.c
+++ b/drivers/gpu/drm/vc4/vc4_dpi.c
@@ -240,10 +240,11 @@ static const struct of_device_id vc4_dpi_dt_match[] = {
*/
static int vc4_dpi_init_bridge(struct vc4_dpi *dpi)
{
+ struct drm_device *drm = dpi->encoder.base.dev;
struct device *dev = &dpi->pdev->dev;
struct drm_bridge *bridge;
- bridge = devm_drm_of_get_bridge(dev, dev->of_node, 0, 0);
+ bridge = drmm_of_get_bridge(drm, dev->of_node, 0, 0);
if (IS_ERR(bridge)) {
/* If nothing was connected in the DT, that's not an
* error.