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, 11 Nov 2009 03:44:58 +0000 (13:44 +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 d9af7964f81cff986d74e1a41efce77937dbd745..cc53b33d4570c648fdf413c13c669b869704571f 100644 (file)
@@ -558,6 +558,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",