[Intel-gfx] [PATCH 13/18] drm/vc4: Use drm_atomic_helper_shutdown

Ville Syrjälä ville.syrjala at linux.intel.com
Wed Oct 3 13:08:05 UTC 2018


On Wed, Oct 03, 2018 at 11:18:22AM +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.
> 
> v2: Rebase.
> 
> Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> Cc: Eric Anholt <eric at anholt.net>

Looks correct to me.

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

> ---
>  drivers/gpu/drm/vc4/vc4_drv.c   | 3 +++
>  drivers/gpu/drm/vc4/vc4_plane.c | 1 -
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c
> index 1f1780ccdbdf..f6f5cd80c04d 100644
> --- a/drivers/gpu/drm/vc4/vc4_drv.c
> +++ b/drivers/gpu/drm/vc4/vc4_drv.c
> @@ -33,6 +33,7 @@
>  #include <linux/pm_runtime.h>
>  #include <drm/drm_fb_cma_helper.h>
>  #include <drm/drm_fb_helper.h>
> +#include <drm/drm_atomic_helper.h>
>  
>  #include "uapi/drm/vc4_drm.h"
>  #include "vc4_drv.h"
> @@ -308,6 +309,8 @@ static void vc4_drm_unbind(struct device *dev)
>  
>  	drm_dev_unregister(drm);
>  
> +	drm_atomic_helper_shutdown(drm);
> +
>  	drm_mode_config_cleanup(drm);
>  
>  	drm_atomic_private_obj_fini(&vc4->ctm_manager);
> diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c
> index 9dc3fcbd290b..d04b3c3246ba 100644
> --- a/drivers/gpu/drm/vc4/vc4_plane.c
> +++ b/drivers/gpu/drm/vc4/vc4_plane.c
> @@ -903,7 +903,6 @@ static const struct drm_plane_helper_funcs vc4_plane_helper_funcs = {
>  
>  static void vc4_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 at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Ville Syrjälä
Intel


More information about the Intel-gfx mailing list