drm-vblank: Always return true vblank count of scheduled vblank event.
authorMario Kleiner <mario.kleiner@tuebingen.mpg.de>
Fri, 10 Dec 2010 15:00:19 +0000 (16:00 +0100)
committerDave Airlie <airlied@redhat.com>
Tue, 21 Dec 2010 03:25:09 +0000 (13:25 +1000)
commit000fa7cf46479238f7b9f2d7763e41af5268b16a
tree369187b88e87ffc31b1479dd6eb69a8a942bc755
parent3ce05168907c9b1358492a73badb0ff1603fb81d
drm-vblank: Always return true vblank count of scheduled vblank event.

This patch tries to make sure that the vbl.reply.sequence
vblank count for a queued or emitted vblank event always
corresponds to the true vblank count of queueing/emission, so
the ddx can rely on the returned target_msc for consistency
checks and implementation of swap_intervals in glXSwapBuffers().

Without this there is a small race-condition between the
userspace ddx queueing a vblank event and the vblank
counter incrementing before the event gets queued in
the kernel.

Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_irq.c