From f529a510d200c87919084fda1e053545c25ebeab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Mon, 21 Jul 2008 08:16:59 +0200 Subject: Drop workaround for driver vblank counter going backwards. The driver code that caused this is no longer necessary and has been dropped. --- linux-core/drm_irq.c | 11 ++--------- 1 file 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", -- cgit v1.2.3