drm/msm: Use drm_atomic_helper_shutdown
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 4 Oct 2018 20:24:36 +0000 (22:24 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 5 Oct 2018 16:04:09 +0000 (18:04 +0200)
drm_plane_helper_disable is a non-atomic drivers only function, and
will blow up (since no one passes the locking context it needs).

Atomic drivers which want to quiescent their hw on unload should
use drm_atomic_helper_shutdown() instead.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Rajesh Yadav <ryadav@codeaurora.org>
Cc: Chandan Uddaraju <chandanu@codeaurora.org>
Cc: Archit Taneja <architt@codeaurora.org>
Cc: Jeykumar Sankaran <jsanka@codeaurora.org>
Cc: Sean Paul <seanpaul@chromium.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Sinclair Yeh <syeh@vmware.com>
Cc: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: Russell King <rmk+kernel@armlinux.org.uk>
Cc: Gustavo Padovan <gustavo.padovan@collabora.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: linux-arm-msm@vger.kernel.org
Cc: freedreno@lists.freedesktop.org
Link: https://patchwork.freedesktop.org/patch/msgid/20181004202446.22905-12-daniel.vetter@ffwll.ch
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
drivers/gpu/drm/msm/disp/mdp4/mdp4_plane.c
drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c
drivers/gpu/drm/msm/msm_drv.c

index 015341e2dd4ca7b4a27eb59eb3c28080e09643be..ec959f847d5f75ad5b59270829f38ba250e28498 100644 (file)
@@ -1482,8 +1482,6 @@ static void dpu_plane_destroy(struct drm_plane *plane)
 
                mutex_destroy(&pdpu->lock);
 
-               drm_plane_helper_disable(plane, NULL);
-
                /* this will destroy the states as well */
                drm_plane_cleanup(plane);
 
index 79ff653d8081e63d4aff0c57aa04037c24b7f58b..7a499731ce9323ddbb1192413d09ef4902a80d86 100644 (file)
@@ -68,7 +68,6 @@ static void mdp4_plane_destroy(struct drm_plane *plane)
 {
        struct mdp4_plane *mdp4_plane = to_mdp4_plane(plane);
 
-       drm_plane_helper_disable(plane, NULL);
        drm_plane_cleanup(plane);
 
        kfree(mdp4_plane);
index 7d306c5acd09644ff62b7e7d62f6590390a90344..d5e4f0de321a20d5f56f6600acc682b7e21e2770 100644 (file)
@@ -46,7 +46,6 @@ static void mdp5_plane_destroy(struct drm_plane *plane)
 {
        struct mdp5_plane *mdp5_plane = to_mdp5_plane(plane);
 
-       drm_plane_helper_disable(plane, NULL);
        drm_plane_cleanup(plane);
 
        kfree(mdp5_plane);
index c1abad8a8612683a237dfae4fec766c806c9caf8..69dbdba183fe418c59f3d4d125d36797d2a55cbb 100644 (file)
@@ -312,6 +312,7 @@ static int msm_drm_uninit(struct device *dev)
        if (fbdev && priv->fbdev)
                msm_fbdev_free(ddev);
 #endif
+       drm_atomic_helper_shutdown(ddev);
        drm_mode_config_cleanup(ddev);
 
        pm_runtime_get_sync(dev);