Re: [PATCH] drm: Destroy the planes prior to destroying the associated CRTC

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

 



On Mon, 17 Sep 2012 10:38:03 +0100
Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> wrote:

> As during the plane cleanup, we wish to disable the hardware and
> so may modify state on the associated CRTC, that CRTC must continue to
> exist until we are finished.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54101
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Cc: Jesse Barnes <jbarnes@xxxxxxxxxxxxxxxx>
> Cc: stable@xxxxxxxxxxxxxxx
> ---
>  drivers/gpu/drm/drm_crtc.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index 6fbfc24..af81f77 100644
> --- a/drivers/gpu/drm/drm_crtc.c
> +++ b/drivers/gpu/drm/drm_crtc.c
> @@ -1034,15 +1034,15 @@ void drm_mode_config_cleanup(struct drm_device *dev)
>  		fb->funcs->destroy(fb);
>  	}
>  
> -	list_for_each_entry_safe(crtc, ct, &dev->mode_config.crtc_list, head) {
> -		crtc->funcs->destroy(crtc);
> -	}
> -
>  	list_for_each_entry_safe(plane, plt, &dev->mode_config.plane_list,
>  				 head) {
>  		plane->funcs->destroy(plane);
>  	}
>  
> +	list_for_each_entry_safe(crtc, ct, &dev->mode_config.crtc_list, head) {
> +		crtc->funcs->destroy(crtc);
> +	}
> +
>  	idr_remove_all(&dev->mode_config.crtc_idr);
>  	idr_destroy(&dev->mode_config.crtc_idr);
>  }

Yeah, looks good.  Did we used to not touch the crtc in the plane
cleanup?  Either way this is safer.

Reviewed-by: Jesse Barnes <jbarnes@xxxxxxxxxxxxxxxx>

-- 
Jesse Barnes, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux