linux_dsm_epyc7002/drivers/gpu/drm/shmobile
Laurent Pinchart 17f0efc4f4 drm/shmobile: Fix race condition between page flip request and handler
The page flip handler stores the page flip event pointer and then calls
drm_vblank_get() to enable the vblank interrupt. Due to the vblank off
delay, the vblank interrupt can be enabled in the hardware at that
point, even if the vblank reference count is equal to 0. If a vblank
interrupt is triggered between storing the event pointer and calling
drm_vblank_get(), the page flip completion handler will process the
event and call drm_vblank_put() with a reference count equal to 0. This
will result in a BUG_ON.

Fix the race condition by calling drm_vblank_get() before storing the
event pointer.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-04-26 10:21:57 +10:00
..
Kconfig drm: Renesas SH Mobile DRM driver 2012-09-18 12:28:22 +02:00
Makefile drm: Renesas SH Mobile DRM driver 2012-09-18 12:28:22 +02:00
shmob_drm_backlight.c drm: Renesas SH Mobile DRM driver 2012-09-18 12:28:22 +02:00
shmob_drm_backlight.h drm: Renesas SH Mobile DRM driver 2012-09-18 12:28:22 +02:00
shmob_drm_crtc.c drm/shmobile: Fix race condition between page flip request and handler 2013-04-26 10:21:57 +10:00
shmob_drm_crtc.h drm: Renesas SH Mobile DRM driver 2012-09-18 12:28:22 +02:00
shmob_drm_drv.c drm/shmobile: use drm_modeset_lock_all 2013-01-20 22:16:51 +01:00
shmob_drm_drv.h drm: Renesas SH Mobile DRM driver 2012-09-18 12:28:22 +02:00
shmob_drm_kms.c drm: Renesas SH Mobile DRM driver 2012-09-18 12:28:22 +02:00
shmob_drm_kms.h drm: Renesas SH Mobile DRM driver 2012-09-18 12:28:22 +02:00
shmob_drm_plane.c drm: Renesas SH Mobile DRM driver 2012-09-18 12:28:22 +02:00
shmob_drm_plane.h drm: Renesas SH Mobile DRM driver 2012-09-18 12:28:22 +02:00
shmob_drm_regs.h drm: Renesas SH Mobile DRM driver 2012-09-18 12:28:22 +02:00