Re: [PATCH 13/18] drm/vc4: Use drm_atomic_helper_shutdown

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx>
> Cc: Eric Anholt <eric@xxxxxxxxxx>

Looks correct to me.

Reviewed-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

> ---
>  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@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux