提交 049b3233 编写于 作者: = =?utf-8?q?Michel_D=C3=A4nzer?= 提交者: airlied

drm: 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.
Signed-off-by: NDave Airlie <airlied@linux.ie>
上级 ab285d74
...@@ -296,8 +296,6 @@ int drm_wait_vblank(DRM_IOCTL_ARGS) ...@@ -296,8 +296,6 @@ int drm_wait_vblank(DRM_IOCTL_ARGS)
? &dev->vbl_sigs2 : &dev->vbl_sigs; ? &dev->vbl_sigs2 : &dev->vbl_sigs;
drm_vbl_sig_t *vbl_sig; drm_vbl_sig_t *vbl_sig;
vblwait.reply.sequence = seq;
spin_lock_irqsave(&dev->vbl_lock, irqflags); spin_lock_irqsave(&dev->vbl_lock, irqflags);
/* Check if this task has already scheduled the same signal /* Check if this task has already scheduled the same signal
...@@ -310,6 +308,7 @@ int drm_wait_vblank(DRM_IOCTL_ARGS) ...@@ -310,6 +308,7 @@ int drm_wait_vblank(DRM_IOCTL_ARGS)
&& vbl_sig->task == current) { && vbl_sig->task == current) {
spin_unlock_irqrestore(&dev->vbl_lock, spin_unlock_irqrestore(&dev->vbl_lock,
irqflags); irqflags);
vblwait.reply.sequence = seq;
goto done; goto done;
} }
} }
...@@ -340,6 +339,8 @@ int drm_wait_vblank(DRM_IOCTL_ARGS) ...@@ -340,6 +339,8 @@ int drm_wait_vblank(DRM_IOCTL_ARGS)
list_add_tail((struct list_head *)vbl_sig, &vbl_sigs->head); list_add_tail((struct list_head *)vbl_sig, &vbl_sigs->head);
spin_unlock_irqrestore(&dev->vbl_lock, irqflags); spin_unlock_irqrestore(&dev->vbl_lock, irqflags);
vblwait.reply.sequence = seq;
} else { } else {
if (flags & _DRM_VBLANK_SECONDARY) { if (flags & _DRM_VBLANK_SECONDARY) {
if (dev->driver->vblank_wait2) if (dev->driver->vblank_wait2)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册