Skip to content

Commit 35f8bad

Browse files
danvetairlied
authored andcommitted
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 6c2a753 Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Tue Dec 11 00:59:24 2012 +0100 drm: refcounting for sprite framebuffers Reported-by: Jesse Barnes <jbarnes@virtuousgeek.org> Cc: Rob Clark <rob@ti.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
1 parent 196e077 commit 35f8bad

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/gpu/drm/drm_crtc.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1996,9 +1996,9 @@ int drm_mode_setplane(struct drm_device *dev, void *data,
19961996
plane_req->src_w, plane_req->src_h);
19971997
if (!ret) {
19981998
old_fb = plane->fb;
1999-
fb = NULL;
20001999
plane->crtc = crtc;
20012000
plane->fb = fb;
2001+
fb = NULL;
20022002
}
20032003
drm_modeset_unlock_all(dev);
20042004

0 commit comments

Comments
 (0)