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. The plane .destroy()
handler now consisting only of a call to drm_plane_cleanup(), replace it
with direct calls to that function.

Signed-off-by: Laurent Pinchart <laurent.pinchart+rene...@ideasonboard.com>
---
 drivers/gpu/drm/arc/arcpgu_crtc.c | 10 ++--------
 drivers/gpu/drm/arc/arcpgu_drv.c  |  1 +
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/arc/arcpgu_crtc.c 
b/drivers/gpu/drm/arc/arcpgu_crtc.c
index 26f360ef7f91..6e7036a5f6df 100644
--- a/drivers/gpu/drm/arc/arcpgu_crtc.c
+++ b/drivers/gpu/drm/arc/arcpgu_crtc.c
@@ -185,16 +185,10 @@ static const struct drm_plane_helper_funcs 
arc_pgu_plane_helper_funcs = {
        .atomic_update = arc_pgu_plane_atomic_update,
 };
 
-static void arc_pgu_plane_destroy(struct drm_plane *plane)
-{
-       drm_plane_helper_disable(plane);
-       drm_plane_cleanup(plane);
-}
-
 static const struct drm_plane_funcs arc_pgu_plane_funcs = {
        .update_plane           = drm_atomic_helper_update_plane,
        .disable_plane          = drm_atomic_helper_disable_plane,
-       .destroy                = arc_pgu_plane_destroy,
+       .destroy                = drm_plane_cleanup,
        .reset                  = drm_atomic_helper_plane_reset,
        .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,
        .atomic_destroy_state   = drm_atomic_helper_plane_destroy_state,
@@ -240,7 +234,7 @@ int arc_pgu_setup_crtc(struct drm_device *drm)
        ret = drm_crtc_init_with_planes(drm, &arcpgu->crtc, primary, NULL,
                                        &arc_pgu_crtc_funcs, NULL);
        if (ret) {
-               arc_pgu_plane_destroy(primary);
+               drm_plane_cleanup(primary);
                return ret;
        }
 
diff --git a/drivers/gpu/drm/arc/arcpgu_drv.c b/drivers/gpu/drm/arc/arcpgu_drv.c
index f067de4e1e82..e85e3a349f24 100644
--- a/drivers/gpu/drm/arc/arcpgu_drv.c
+++ b/drivers/gpu/drm/arc/arcpgu_drv.c
@@ -134,6 +134,7 @@ static int arcpgu_unload(struct drm_device *drm)
                arcpgu->fbdev = NULL;
        }
        drm_kms_helper_poll_fini(drm);
+       drm_atomic_helper_shutdown(drm);
        drm_mode_config_cleanup(drm);
 
        return 0;
-- 
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to