0339-drm-vc4-Fix-get_vblank_counter-with-proper-no-op-for.patch 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. From 3b82a9f86033a7a0cef86738f45bd191742a55db Mon Sep 17 00:00:00 2001
  2. From: Mario Kleiner <mario.kleiner.de@gmail.com>
  3. Date: Fri, 6 May 2016 19:26:05 +0200
  4. Subject: [PATCH] drm/vc4: Fix get_vblank_counter with proper no-op for Linux
  5. 4.4+
  6. get_vblank_counter hooked up to drm_vblank_count() which alway was
  7. non-sensical but didn't hurt in the past. Since Linux 4.4 it
  8. triggers a WARN_ON_ONCE in drm_update_vblank_count on first vblank
  9. irq disable, so fix it by hooking to drm_vblank_no_hw_counter().
  10. Tested against Raspian kernel 4.4.8 tree on RPi 2B.
  11. Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
  12. Cc: Eric Anholt <eric@anholt.net>
  13. Signed-off-by: Eric Anholt <eric@anholt.net>
  14. ---
  15. drivers/gpu/drm/vc4/vc4_drv.c | 2 +-
  16. 1 file changed, 1 insertion(+), 1 deletion(-)
  17. --- a/drivers/gpu/drm/vc4/vc4_drv.c
  18. +++ b/drivers/gpu/drm/vc4/vc4_drv.c
  19. @@ -102,7 +102,7 @@ static struct drm_driver vc4_drm_driver
  20. .enable_vblank = vc4_enable_vblank,
  21. .disable_vblank = vc4_disable_vblank,
  22. - .get_vblank_counter = drm_vblank_count,
  23. + .get_vblank_counter = drm_vblank_no_hw_counter,
  24. #if defined(CONFIG_DEBUG_FS)
  25. .debugfs_init = vc4_debugfs_init,