[10/18] drm/arcpgu: Use drm_atomic_helper_shutdown
diff mbox series

Message ID 20181002133526.13685-11-daniel.vetter@ffwll.ch
State New
Headers show
Series
  • atomic helper cleanups
Related show

Commit Message

Daniel Vetter Oct. 2, 2018, 1:35 p.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: Alexey Brodkin <abrodkin@synopsys.com>
---
 drivers/gpu/drm/arc/arcpgu_crtc.c | 1 -
 drivers/gpu/drm/arc/arcpgu_drv.c  | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

Comments

Ville Syrjälä Oct. 2, 2018, 3:39 p.m. UTC | #1
On Tue, Oct 02, 2018 at 03:35:18PM +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: Alexey Brodkin <abrodkin@synopsys.com>

Matches earlier changes made to other drivers. I wonder if there are any
more left?

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

> ---
>  drivers/gpu/drm/arc/arcpgu_crtc.c | 1 -
>  drivers/gpu/drm/arc/arcpgu_drv.c  | 1 +
>  2 files changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/arc/arcpgu_crtc.c b/drivers/gpu/drm/arc/arcpgu_crtc.c
> index 26cb2800f3ad..62f51f70606d 100644
> --- a/drivers/gpu/drm/arc/arcpgu_crtc.c
> +++ b/drivers/gpu/drm/arc/arcpgu_crtc.c
> @@ -184,7 +184,6 @@ static const struct drm_plane_helper_funcs arc_pgu_plane_helper_funcs = {
>  
>  static void arc_pgu_plane_destroy(struct drm_plane *plane)
>  {
> -	drm_plane_helper_disable(plane, NULL);
>  	drm_plane_cleanup(plane);
>  }

Could eliminate this (now pointless) wrapper as well.

>  
> 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;
> -- 
> 2.19.0.rc2
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

Patch
diff mbox series

diff --git a/drivers/gpu/drm/arc/arcpgu_crtc.c b/drivers/gpu/drm/arc/arcpgu_crtc.c
index 26cb2800f3ad..62f51f70606d 100644
--- a/drivers/gpu/drm/arc/arcpgu_crtc.c
+++ b/drivers/gpu/drm/arc/arcpgu_crtc.c
@@ -184,7 +184,6 @@  static const struct drm_plane_helper_funcs arc_pgu_plane_helper_funcs = {
 
 static void arc_pgu_plane_destroy(struct drm_plane *plane)
 {
-	drm_plane_helper_disable(plane, NULL);
 	drm_plane_cleanup(plane);
 }
 
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;