From: Daniel Vetter Date: Fri, 15 Feb 2013 20:21:37 +0000 (+0100) Subject: drm: Don't set the plane->fb to NULL on successfull set_plane X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=35f8badc1cf652381fa3f82c1fbea39f4dbe87fd;p=linux-beck.git drm: Don't set the plane->fb to NULL on successfull set_plane 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 Date: Tue Dec 11 00:59:24 2012 +0100 drm: refcounting for sprite framebuffers Reported-by: Jesse Barnes Cc: Rob Clark Reviewed-by: Jesse Barnes Reviewed-by: Ville Syrjälä Reviewed-by: Thierry Reding Signed-off-by: Daniel Vetter Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index f17077307c65..e7471b0880b7 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -1996,9 +1996,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);