aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <[email protected]>2016-09-28 23:25:00 +0100
committerDave Airlie <[email protected]>2016-10-04 12:52:58 +1000
commite86fa21b77f4ef840213ecd33230c7c16879a4ac (patch)
treeb28fb6fb398686eba68d1ab2636e0da6e885c6c2
parentf5dce66593ffb76d750918d6f1962fd62fb54d64 (diff)
drm: Restore lost drm_framebuffer_unreference in drm_mode_page_flip_ioctl
Commit 43968d7b806d ("drm: Extract drm_plane.[hc]") was not the simple cut'n'paste we presumed, somehow it introduced a leak of the page flip target's framebuffer. Fixes: 43968d7b806d ("drm: Extract drm_plane.[hc]") Signed-off-by: Chris Wilson <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Sean Paul <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Dave Airlie <[email protected]>
-rw-r--r--drivers/gpu/drm/drm_plane.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
index cd0d475bf3c3..783aef8acab7 100644
--- a/drivers/gpu/drm/drm_plane.c
+++ b/drivers/gpu/drm/drm_plane.c
@@ -898,6 +898,8 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev,
out:
if (ret && crtc->funcs->page_flip_target)
drm_crtc_vblank_put(crtc);
+ if (fb)
+ drm_framebuffer_unreference(fb);
if (crtc->primary->old_fb)
drm_framebuffer_unreference(crtc->primary->old_fb);
crtc->primary->old_fb = NULL;