drm/kms: add page flipping ioctl
authorKristian Høgsberg <krh@bitplanet.net>
Tue, 17 Nov 2009 17:43:55 +0000 (12:43 -0500)
committerDave Airlie <airlied@redhat.com>
Wed, 18 Nov 2009 00:05:47 +0000 (10:05 +1000)
commitd91d8a3f88059d93e34ac70d059153ec69a9ffc7
tree13810c8dbc35522d930b5fc17db35570f3d1e821
parentdad07ca71719598bc990dbdbeda763d15a10e98b
drm/kms: add page flipping ioctl

This adds a page flipping ioctl to the KMS API.  The ioctl takes an fb ID
and a ctrc ID and flips the crtc to the given fb at the next vblank.
The ioctl returns immediately but the flip doesn't happen until after
any rendering that's currently queued up against the new framebuffer
is done.  After submitting a page flip, any execbuffer involving the
old front buffer will block until the flip is completed.

Optionally, a vblank event can be generated when the swap eventually
happens.

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_crtc.c
drivers/gpu/drm/drm_drv.c
include/drm/drm.h
include/drm/drm_crtc.h
include/drm/drm_mode.h