0284-drm-vc4-Fix-a-framebuffer-reference-leak-on-async-fl.patch 949 B

1234567891011121314151617181920212223242526
  1. From 08d2762526279939513276a142849f5a82b31106 Mon Sep 17 00:00:00 2001
  2. From: Eric Anholt <eric@anholt.net>
  3. Date: Fri, 5 Feb 2016 15:06:15 -0800
  4. Subject: [PATCH] drm/vc4: Fix a framebuffer reference leak on async flip
  5. interrupt.
  6. We'd need X to queue up an async pageflip while another is
  7. outstanding, and then take a SIGIO. I think X actually avoids sending
  8. out the next pageflip while one's already queued, but I'm not sure.
  9. Signed-off-by: Eric Anholt <eric@anholt.net>
  10. (cherry picked from commit 48627eb8dc55c60d35794105f6f79fb627347dbd)
  11. ---
  12. drivers/gpu/drm/vc4/vc4_crtc.c | 1 +
  13. 1 file changed, 1 insertion(+)
  14. --- a/drivers/gpu/drm/vc4/vc4_crtc.c
  15. +++ b/drivers/gpu/drm/vc4/vc4_crtc.c
  16. @@ -527,6 +527,7 @@ static int vc4_async_page_flip(struct dr
  17. /* Make sure all other async modesetes have landed. */
  18. ret = down_interruptible(&vc4->async_modeset);
  19. if (ret) {
  20. + drm_framebuffer_unreference(fb);
  21. kfree(flip_state);
  22. return ret;
  23. }