summaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/i915_drm.h
diff options
context:
space:
mode:
author=?utf-8?q?Michel_D=C3=A4nzer?= <michel@tungstengraphics.com>2006-10-24 23:38:54 +1000
committerairlied <airlied@linux.ie>2006-12-07 15:53:30 +1100
commit541f29aad766b6c7b911a7d900d952744369bf53 (patch)
tree5ce5aa51d47c518146b0f13c2a58d643b58d58ba /drivers/char/drm/i915_drm.h
parenta6b54f3f5050c0cbc0c35dd48064846c6302706b (diff)
drm: DRM_I915_VBLANK_SWAP ioctl: Take drm_vblank_seq_type_t instead
of pipe number. Handle relative as well as absolute target sequence numbers. Return error if target sequence has already passed, so userspace can deal with this situation as it sees fit. On success, return the sequence number of the vertical blank when the buffer swap is expected to take place. Also add DRM_IOCTL_I915_VBLANK_SWAP definition for userspace code that may want to use ioctl() instead of drmCommandWriteRead(). Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/i915_drm.h')
-rw-r--r--drivers/char/drm/i915_drm.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/drm/i915_drm.h b/drivers/char/drm/i915_drm.h
index 8926beb5a61..4ce3d16cf06 100644
--- a/drivers/char/drm/i915_drm.h
+++ b/drivers/char/drm/i915_drm.h
@@ -149,6 +149,7 @@ typedef struct _drm_i915_sarea {
#define DRM_IOCTL_I915_DESTROY_HEAP DRM_IOW( DRM_COMMAND_BASE + DRM_I915_DESTROY_HEAP, drm_i915_mem_destroy_heap_t)
#define DRM_IOCTL_I915_SET_VBLANK_PIPE DRM_IOW( DRM_COMMAND_BASE + DRM_I915_SET_VBLANK_PIPE, drm_i915_vblank_pipe_t)
#define DRM_IOCTL_I915_GET_VBLANK_PIPE DRM_IOR( DRM_COMMAND_BASE + DRM_I915_GET_VBLANK_PIPE, drm_i915_vblank_pipe_t)
+#define DRM_IOCTL_I915_VBLANK_SWAP DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_VBLANK_SWAP, drm_i915_vblank_swap_t)
/* Allow drivers to submit batchbuffers directly to hardware, relying
* on the security mechanisms provided by hardware.
@@ -248,7 +249,7 @@ typedef struct drm_i915_vblank_pipe {
*/
typedef struct drm_i915_vblank_swap {
drm_drawable_t drawable;
- unsigned int pipe;
+ drm_vblank_seq_type_t seqtype;
unsigned int sequence;
} drm_i915_vblank_swap_t;