projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
drm/armada: fix page_flip refcounting leak
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
gpu
/
drm
/
armada
/
armada_crtc.c
diff --git
a/drivers/gpu/drm/armada/armada_crtc.c
b/drivers/gpu/drm/armada/armada_crtc.c
index 9a0cc09e665308bd6d6a7c7b518b455f5acd050d..ef6be294c07da40bac98c786d21dfe2b124b27f9 100644
(file)
--- a/
drivers/gpu/drm/armada/armada_crtc.c
+++ b/
drivers/gpu/drm/armada/armada_crtc.c
@@
-945,18
+945,15
@@
static int armada_drm_crtc_page_flip(struct drm_crtc *crtc,
armada_reg_queue_end(work->regs, i);
/*
armada_reg_queue_end(work->regs, i);
/*
- *
Hold the old framebuffer for the work - DRM appears to drop our
- *
reference to the old framebuffer in drm_mode_page_flip_ioctl()
.
+ *
Ensure that we hold a reference on the new framebuffer.
+ *
This has to match the behaviour in mode_set
.
*/
*/
- drm_framebuffer_reference(
work->old_
fb);
+ drm_framebuffer_reference(fb);
ret = armada_drm_crtc_queue_frame_work(dcrtc, work);
if (ret) {
ret = armada_drm_crtc_queue_frame_work(dcrtc, work);
if (ret) {
- /*
- * Undo our reference above; DRM does not drop the reference
- * to this object on error, so that's okay.
- */
- drm_framebuffer_unreference(work->old_fb);
+ /* Undo our reference above */
+ drm_framebuffer_unreference(fb);
kfree(work);
return ret;
}
kfree(work);
return ret;
}