Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 345337
b: refs/heads/master
c: 0355cf3
h: refs/heads/master
i:
  345335: de73c17
v: v3
  • Loading branch information
Egbert Eich authored and Dave Airlie committed Nov 20, 2012
1 parent 43e1548 commit 6c0f790
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a4f968d8e50cb7810e08ebb9bf4c8f2b769fdac7
refs/heads/master: 0355cf3a0f49e26f4b84d9da7189b2324cf1df6d
6 changes: 5 additions & 1 deletion trunk/drivers/gpu/drm/drm_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ static void vblank_disable_and_save(struct drm_device *dev, int crtc)
s64 diff_ns;
int vblrc;
struct timeval tvblank;
int count = DRM_TIMESTAMP_MAXRETRIES;

/* Prevent vblank irq processing while disabling vblank irqs,
* so no updates of timestamps or count can happen after we've
Expand All @@ -131,7 +132,10 @@ static void vblank_disable_and_save(struct drm_device *dev, int crtc)
do {
dev->last_vblank[crtc] = dev->driver->get_vblank_counter(dev, crtc);
vblrc = drm_get_last_vbltimestamp(dev, crtc, &tvblank, 0);
} while (dev->last_vblank[crtc] != dev->driver->get_vblank_counter(dev, crtc));
} while (dev->last_vblank[crtc] != dev->driver->get_vblank_counter(dev, crtc) && (--count) && vblrc);

if (!count)
vblrc = 0;

/* Compute time difference to stored timestamp of last vblank
* as updated by last invocation of drm_handle_vblank() in vblank irq.
Expand Down

0 comments on commit 6c0f790

Please sign in to comment.