]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Fix off-by-one in vblank hardware counter wraparound handling
authorMichel Dänzer <michel.daenzer@amd.com>
Tue, 26 May 2015 08:53:38 +0000 (17:53 +0900)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 27 May 2015 11:00:08 +0000 (13:00 +0200)
commit6252dc5d5a00989d61f68bd48dc3cadfbc72b299
tree4a9ad864ed2ff736c7138fa997875b7944601d6e
parentead504c09b94ac54f5c8ffcf55579df03aeb0605
drm: Fix off-by-one in vblank hardware counter wraparound handling

dev->max_vblank_count contains the largest value that can be represented
by the hardware counter. When the hardware counter wraps around, we have
to add that value + 1 to get the same value as if the hardware counter
didn't wrap around.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_irq.c