drm: Add async event synchronization for drmWaitVblank
authorKristian Høgsberg <krh@bitplanet.net>
Fri, 11 Sep 2009 18:33:34 +0000 (04:33 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 26 Oct 2009 03:29:27 +0000 (13:29 +1000)
commitc182be37ed7cb04c344501b88b8fdb747016e6cf
tree013ae7e4c5bb512ac8e4132a642f40c27f03390e
parent0a5c1e61dbaceb6ce56281a3128a6912b0dcd043
drm: Add async event synchronization for drmWaitVblank

This patch adds a new flag to the drmWaitVblank ioctl, which asks the drm
to return immediately and notify userspace when the specified vblank sequence
happens by sending an event back on the drm fd.

The event mechanism works with the other flags supported by the ioctls,
specifically, the vblank sequence can be specified relatively or absolutely,
and works for primary and seconday crtc.

The signal field of the vblank request is used to provide user data,
which will be sent back to user space in the vblank event.

Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_fops.c
drivers/gpu/drm/drm_irq.c
drivers/gpu/drm/drm_stub.c
drivers/gpu/drm/i915/i915_drv.c
include/drm/drm.h
include/drm/drmP.h