summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/drm_irq.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/linux-core/drm_irq.c b/linux-core/drm_irq.c
index 26aecdf9..7c056114 100644
--- a/linux-core/drm_irq.c
+++ b/linux-core/drm_irq.c
@@ -355,19 +355,12 @@ static void drm_update_vblank_count(struct drm_device *dev, int crtc)
* a long time.
*/
cur_vblank = dev->driver->get_vblank_counter(dev, crtc);
+ diff = cur_vblank - dev->last_vblank[crtc];
if (cur_vblank < dev->last_vblank[crtc]) {
- if (cur_vblank == dev->last_vblank[crtc] - 1) {
- diff = 0;
- } else {
- diff = dev->max_vblank_count -
- dev->last_vblank[crtc];
- diff += cur_vblank;
- }
+ diff += dev->max_vblank_count;
DRM_DEBUG("last_vblank[%d]=0x%x, cur_vblank=0x%x => diff=0x%x\n",
crtc, dev->last_vblank[crtc], cur_vblank, diff);
- } else {
- diff = cur_vblank - dev->last_vblank[crtc];
}
DRM_DEBUG("enabling vblank interrupts on crtc %d, missed %d\n",