diff mbox series

[14/18] drm/zte: Use drm_atomic_helper_shutdown

Message ID 20181003091827.25276-2-daniel.vetter@ffwll.ch (mailing list archive)
State New, archived
Headers show
Series atomic helper cleanups | expand

Commit Message

Daniel Vetter Oct. 3, 2018, 9:18 a.m. UTC
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.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Shawn Guo <shawnguo@kernel.org>
---
 drivers/gpu/drm/zte/zx_drm_drv.c | 1 +
 drivers/gpu/drm/zte/zx_plane.c   | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

Comments

Ville Syrjälä Oct. 3, 2018, 1:08 p.m. UTC | #1
On Wed, Oct 03, 2018 at 11:18:23AM +0200, Daniel Vetter wrote:
> 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.
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Shawn Guo <shawnguo@kernel.org>
> ---
>  drivers/gpu/drm/zte/zx_drm_drv.c | 1 +
>  drivers/gpu/drm/zte/zx_plane.c   | 1 -
>  2 files changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/zte/zx_drm_drv.c b/drivers/gpu/drm/zte/zx_drm_drv.c
> index 5b6f1eda52e0..f5ea32ae8600 100644
> --- a/drivers/gpu/drm/zte/zx_drm_drv.c
> +++ b/drivers/gpu/drm/zte/zx_drm_drv.c
> @@ -124,6 +124,7 @@ static void zx_drm_unbind(struct device *dev)
>  
>  	drm_dev_unregister(drm);
>  	drm_kms_helper_poll_fini(drm);
> +	drm_atomic_helper_shutdown(drm);
>  	drm_mode_config_cleanup(drm);

Familiar pattern by now, so

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

>  	component_unbind_all(dev, drm);
>  	dev_set_drvdata(dev, NULL);
> diff --git a/drivers/gpu/drm/zte/zx_plane.c b/drivers/gpu/drm/zte/zx_plane.c
> index ae8c53b4b261..83d236fd893c 100644
> --- a/drivers/gpu/drm/zte/zx_plane.c
> +++ b/drivers/gpu/drm/zte/zx_plane.c
> @@ -446,7 +446,6 @@ static const struct drm_plane_helper_funcs zx_gl_plane_helper_funcs = {
>  
>  static void zx_plane_destroy(struct drm_plane *plane)
>  {
> -	drm_plane_helper_disable(plane, NULL);
>  	drm_plane_cleanup(plane);
>  }
>  
> -- 
> 2.19.0.rc2
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox series

Patch

diff --git a/drivers/gpu/drm/zte/zx_drm_drv.c b/drivers/gpu/drm/zte/zx_drm_drv.c
index 5b6f1eda52e0..f5ea32ae8600 100644
--- a/drivers/gpu/drm/zte/zx_drm_drv.c
+++ b/drivers/gpu/drm/zte/zx_drm_drv.c
@@ -124,6 +124,7 @@  static void zx_drm_unbind(struct device *dev)
 
 	drm_dev_unregister(drm);
 	drm_kms_helper_poll_fini(drm);
+	drm_atomic_helper_shutdown(drm);
 	drm_mode_config_cleanup(drm);
 	component_unbind_all(dev, drm);
 	dev_set_drvdata(dev, NULL);
diff --git a/drivers/gpu/drm/zte/zx_plane.c b/drivers/gpu/drm/zte/zx_plane.c
index ae8c53b4b261..83d236fd893c 100644
--- a/drivers/gpu/drm/zte/zx_plane.c
+++ b/drivers/gpu/drm/zte/zx_plane.c
@@ -446,7 +446,6 @@  static const struct drm_plane_helper_funcs zx_gl_plane_helper_funcs = {
 
 static void zx_plane_destroy(struct drm_plane *plane)
 {
-	drm_plane_helper_disable(plane, NULL);
 	drm_plane_cleanup(plane);
 }