Re: [PATCH] drm: Don't set the plane->fb to NULL on successfull set_plane

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

 



On Fri, Feb 15, 2013 at 09:21:37PM +0100, Daniel Vetter wrote:
> We need to clear the local variable to get the refcounting right
> (since the reference drm_mode_setplane holds is transferred to the
> plane->fb pointer). But should be done _after_ we update the pointer.
> 
> Breakage introduced in
> 
> commit 6c2a75325c800de286166c693e0cd33c3a1c5ec8
> Author: Daniel Vetter <daniel.vetter@xxxxxxxx>
> Date:   Tue Dec 11 00:59:24 2012 +0100
> 
>     drm: refcounting for sprite framebuffers
> 
> Reported-by: Jesse Barnes <jbarnes@xxxxxxxxxxxxxxxx>
> Cc: Jesse Barnes <jbarnes@xxxxxxxxxxxxxxxx>
> Cc: Rob Clark <rob@xxxxxx>
> Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxx>
> ---
>  drivers/gpu/drm/drm_crtc.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index 826a5ca..1960418 100644
> --- a/drivers/gpu/drm/drm_crtc.c
> +++ b/drivers/gpu/drm/drm_crtc.c
> @@ -1982,9 +1982,9 @@ int drm_mode_setplane(struct drm_device *dev, void *data,
>  					 plane_req->src_w, plane_req->src_h);
>  	if (!ret) {
>  		old_fb = plane->fb;
> -		fb = NULL;
>  		plane->crtc = crtc;
>  		plane->fb = fb;
> +		fb = NULL;
>  	}
>  	drm_modeset_unlock_all(dev);
>  

Ugh... and again I sent the same patch because I didn't look properly
and missed yours.

Reviewed-by: Thierry Reding <thierry.reding@xxxxxxxxxxxxxxxxx>

Attachment: pgpkYelIVyRqB.pgp
Description: PGP signature

_______________________________________________
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