diff options
author | Michel Dänzer <michel@tungstengraphics.com> | 2006-09-01 11:35:31 +0200 |
---|---|---|
committer | Michel Dänzer <michel@tungstengraphics.com> | 2006-09-29 12:55:08 +0200 |
commit | cef0f243251103be81c914d5b83ee3401c2a9c34 (patch) | |
tree | 17650f254368aa4d6c1f30d4c5fc9d674c1a7b66 /linux-core | |
parent | ed82172378666d35ca60e6094fdecb59511a135f (diff) |
Core vsync: Don't clobber target sequence number when scheduling signal.
It looks like this would have caused signals to always get sent on the next
vertical blank, regardless of the sequence number.
(cherry picked from cf6b2c5299e9be3542d4deddfd05d5811f11d2ef commit)
Diffstat (limited to 'linux-core')
-rw-r--r-- | linux-core/drm_irq.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/linux-core/drm_irq.c b/linux-core/drm_irq.c index bd8a9c82..d1a6a6b1 100644 --- a/linux-core/drm_irq.c +++ b/linux-core/drm_irq.c @@ -295,8 +295,6 @@ int drm_wait_vblank(DRM_IOCTL_ARGS) ? &dev->vbl_sigs2 : &dev->vbl_sigs; drm_vbl_sig_t *vbl_sig; - vblwait.reply.sequence = seq; - spin_lock_irqsave(&dev->vbl_lock, irqflags); /* Check if this task has already scheduled the same signal @@ -309,6 +307,7 @@ int drm_wait_vblank(DRM_IOCTL_ARGS) && vbl_sig->task == current) { spin_unlock_irqrestore(&dev->vbl_lock, irqflags); + vblwait.reply.sequence = seq; goto done; } } @@ -339,6 +338,8 @@ int drm_wait_vblank(DRM_IOCTL_ARGS) list_add_tail((struct list_head *)vbl_sig, &vbl_sigs->head); spin_unlock_irqrestore(&dev->vbl_lock, irqflags); + + vblwait.reply.sequence = seq; } else { if (flags & _DRM_VBLANK_SECONDARY) { if (dev->driver->vblank_wait2) |