diff options
author | Michel Dänzer <michel@tungstengraphics.com> | 2008-06-03 11:28:09 +0200 |
---|---|---|
committer | Michel Dänzer <michel@tungstengraphics.com> | 2008-06-03 11:28:09 +0200 |
commit | 0144ebeb8a713b1420d35004075037cd4b0495a1 (patch) | |
tree | 228a256e93d329d15227f474bd492376247b3dc3 /linux-core | |
parent | 6b520005c6714d8a8afa68b8a43065a40da298cc (diff) |
vblank: Don't return current sequence number and time if interrupted by signal.
Diffstat (limited to 'linux-core')
-rw-r--r-- | linux-core/drm_irq.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/linux-core/drm_irq.c b/linux-core/drm_irq.c index 8f27d7f3..e2f106e4 100644 --- a/linux-core/drm_irq.c +++ b/linux-core/drm_irq.c @@ -484,7 +484,6 @@ int drm_wait_vblank(struct drm_device *dev, void *data, struct drm_file *file_priv) { union drm_wait_vblank *vblwait = data; - struct timeval now; int ret = 0; unsigned int flags, seq, crtc; @@ -588,11 +587,16 @@ int drm_wait_vblank(struct drm_device *dev, void *data, (((cur_vblank = drm_vblank_count(dev, crtc)) - vblwait->request.sequence) <= (1 << 23))); drm_vblank_put(dev, crtc); - do_gettimeofday(&now); - vblwait->reply.tval_sec = now.tv_sec; - vblwait->reply.tval_usec = now.tv_usec; - vblwait->reply.sequence = cur_vblank; + if (ret != -EINTR) { + struct timeval now; + + do_gettimeofday(&now); + + vblwait->reply.tval_sec = now.tv_sec; + vblwait->reply.tval_usec = now.tv_usec; + vblwait->reply.sequence = cur_vblank; + } } done: |