drm: arm: malidp: Use drm_atomic_helper_shutdown() to disable planes on removal
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Wed, 17 Jan 2018 21:55:30 +0000 (23:55 +0200)
committerLiviu Dudau <Liviu.Dudau@arm.com>
Wed, 14 Mar 2018 11:38:03 +0000 (11:38 +0000)
The plane cleanup handler currently calls drm_plane_helper_disable(),
which is a legacy helper function. Replace it with a call to
drm_atomic_helper_shutdown() at removal time.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
drivers/gpu/drm/arm/malidp_drv.c
drivers/gpu/drm/arm/malidp_planes.c

index 2b26f40a9786d1a075f1cf32c02113cc47adf32d..274db28c0648de6ecdae2b9e939718e5a6f0939f 100644 (file)
@@ -278,6 +278,7 @@ static int malidp_init(struct drm_device *drm)
 
 static void malidp_fini(struct drm_device *drm)
 {
+       drm_atomic_helper_shutdown(drm);
        drm_mode_config_cleanup(drm);
 }
 
index 648e97693df926c9ccc691da6e895826b645896b..5e64060cc8fcda81c971de8b4122c6e783d0c6d5 100644 (file)
@@ -59,10 +59,6 @@ static void malidp_de_plane_destroy(struct drm_plane *plane)
 {
        struct malidp_plane *mp = to_malidp_plane(plane);
 
-       if (mp->base.fb)
-               drm_framebuffer_put(mp->base.fb);
-
-       drm_plane_helper_disable(plane);
        drm_plane_cleanup(plane);
        kfree(mp);
 }