drm: when queuing an event with NEXTONMISS, return queued sequence to userspace
authorJesse Barnes <jbarnes@virtuousgeek.org>
Tue, 10 Nov 2009 08:21:25 +0000 (08:21 +0000)
committerDave Airlie <airlied@redhat.com>
Wed, 18 Nov 2009 00:02:48 +0000 (10:02 +1000)
If we queue a vblank event but miss it, we should return the actual
sequence number we queued to userspace, so its event handling function
will know which event to look for.

Acked-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_irq.c

index 72754ac..6b3ce6d 100644 (file)
@@ -585,6 +585,7 @@ static int drm_queue_vblank_event(struct drm_device *dev, int pipe,
        if ((vblwait->request.type & _DRM_VBLANK_NEXTONMISS) &&
            (seq - vblwait->request.sequence) <= (1 << 23)) {
                vblwait->request.sequence = seq + 1;
+               vblwait->reply.sequence = vblwait->request.sequence;
        }
 
        DRM_DEBUG("event on vblank count %d, current %d, crtc %d\n",