aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2011-10-10 06:23:26 -0400
committerDave Airlie <airlied@redhat.com>2011-10-10 10:46:55 -0400
commit57c5ee79acba9582762c09c269e0e2ae1adf1b31 (patch)
tree26b2148b81e7a7c1785d9d07d45c68bb1117bfb5 /include/drm
parent8bf445cee3127de3779a395d08d1ada2ad70161e (diff)
vmwgfx: Add fence events
Add a way to send DRM events down the gpu fifo by attaching them to fence objects. This may be useful for Xserver swapbuffer throttling and page-flip done notifications. Bump version to 2.2 to signal the availability of the FENCE_EVENT ioctl. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/vmwgfx_drm.h47
1 files changed, 45 insertions, 2 deletions
diff --git a/include/drm/vmwgfx_drm.h b/include/drm/vmwgfx_drm.h
index 5b5b0a891f36..cd7cd8162ed6 100644
--- a/include/drm/vmwgfx_drm.h
+++ b/include/drm/vmwgfx_drm.h
@@ -685,6 +685,51 @@ struct drm_vmw_fence_arg {
685 685
686/*************************************************************************/ 686/*************************************************************************/
687/** 687/**
688 * DRM_VMW_FENCE_EVENT
689 *
690 * Queues an event on a fence to be delivered on the drm character device
691 * when the fence has signaled the DRM_VMW_FENCE_FLAG_EXEC flag.
692 * Optionally the approximate time when the fence signaled is
693 * given by the event.
694 */
695
696/*
697 * The event type
698 */
699#define DRM_VMW_EVENT_FENCE_SIGNALED 0x80000000
700
701struct drm_vmw_event_fence {
702 struct drm_event base;
703 uint64_t user_data;
704 uint32_t tv_sec;
705 uint32_t tv_usec;
706};
707
708/*
709 * Flags that may be given to the command.
710 */
711/* Request fence signaled time on the event. */
712#define DRM_VMW_FE_FLAG_REQ_TIME (1 << 0)
713
714/**
715 * struct drm_vmw_fence_event_arg
716 *
717 * @fence_rep: Pointer to fence_rep structure cast to uint64_t or 0 if
718 * the fence is not supposed to be referenced by user-space.
719 * @user_info: Info to be delivered with the event.
720 * @handle: Attach the event to this fence only.
721 * @flags: A set of flags as defined above.
722 */
723struct drm_vmw_fence_event_arg {
724 uint64_t fence_rep;
725 uint64_t user_data;
726 uint32_t handle;
727 uint32_t flags;
728};
729
730
731/*************************************************************************/
732/**
688 * DRM_VMW_PRESENT 733 * DRM_VMW_PRESENT
689 * 734 *
690 * Executes an SVGA present on a given fb for a given surface. The surface 735 * Executes an SVGA present on a given fb for a given surface. The surface
@@ -743,6 +788,4 @@ struct drm_vmw_present_readback_arg {
743 uint64_t clips_ptr; 788 uint64_t clips_ptr;
744 uint64_t fence_rep; 789 uint64_t fence_rep;
745}; 790};
746
747
748#endif 791#endif