[PATCH xextproto 1/4] Initial Fence Sync support

James Jones jajones at nvidia.com
Mon Aug 9 11:09:36 PDT 2010


Defines the protocol for creation and basic
management of binary state sync objects.
The following operations are defined:

 -Creation
 -Destruction
 -Trigger
 -Reset

Signed-off-by: James Jones <jajones at nvidia.com>
Reviewed-by: Aaron Plattner <aplattner at nvidia.com>
---
 syncconst.h |    6 ++++--
 syncproto.h |   53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 57 insertions(+), 2 deletions(-)

diff --git a/syncconst.h b/syncconst.h
index 926b60c..3acc387 100644
--- a/syncconst.h
+++ b/syncconst.h
@@ -54,7 +54,7 @@ PERFORMANCE OF THIS SOFTWARE.
 #define SYNC_NAME "SYNC"
 
 #define SYNC_MAJOR_VERSION	3
-#define SYNC_MINOR_VERSION	0
+#define SYNC_MINOR_VERSION	1
 
 
 #define XSyncCounterNotify              0
@@ -65,7 +65,8 @@ PERFORMANCE OF THIS SOFTWARE.
 
 #define XSyncBadCounter			0L
 #define XSyncBadAlarm			1L
-#define XSyncNumberErrors		(XSyncBadAlarm + 1)
+#define XSyncBadFence           2L
+#define XSyncNumberErrors		(XSyncBadFence + 1)
 
 /*
  * Flags for Alarm Attributes
@@ -172,6 +173,7 @@ typedef enum {
 
 typedef XID XSyncCounter;
 typedef XID XSyncAlarm;
+typedef XID XSyncFence;
 typedef struct _XSyncValue {
     int hi;
     unsigned int lo;
diff --git a/syncproto.h b/syncproto.h
index 13b53d5..5e39777 100644
--- a/syncproto.h
+++ b/syncproto.h
@@ -67,6 +67,10 @@ PERFORMANCE OF THIS SOFTWARE.
 #define X_SyncDestroyAlarm	       11
 #define X_SyncSetPriority   	       12
 #define X_SyncGetPriority   	       13
+#define X_SyncCreateFence	       14
+#define X_SyncTriggerFence	       15
+#define X_SyncResetFence	       16
+#define X_SyncDestroyFence	       17
 
 /* cover up types from sync.h to make sure they're the right size for
  * protocol packaging.  These will be undef'ed after all the protocol
@@ -74,6 +78,7 @@ PERFORMANCE OF THIS SOFTWARE.
  */
 #define XSyncCounter CARD32
 #define XSyncAlarm   CARD32
+#define XSyncFence   CARD32
 
 /*
  * Initialize
@@ -337,6 +342,53 @@ typedef struct {
 #define sz_xSyncGetPriorityReply	32
 
 /*
+ * Create Fence
+ */
+typedef struct _xSyncCreateFenceReq {
+    CARD8	reqType;
+    CARD8	syncReqType;
+    CARD16	length B16;
+    XSyncFence	fid B32;
+    BOOL	initially_triggered;
+    CARD8	pad0;
+    CARD16	pad1;
+} xSyncCreateFenceReq;
+#define sz_xSyncCreateFenceReq		12
+
+/*
+ * Put a fence object in the "triggered" state.
+ */
+typedef struct _xSyncTriggerFenceReq {
+    CARD8	reqType;
+    CARD8	syncReqType;
+    CARD16	length B16;
+    XSyncFence	fid B32;
+} xSyncTriggerFenceReq;
+#define sz_xSyncTriggerFenceReq		8
+
+/*
+ * Put a fence in the "untriggered" state.
+ */
+typedef struct _xSyncResetFenceReq {
+    CARD8	reqType;
+    CARD8	syncReqType;
+    CARD16	length B16;
+    XSyncFence	fid B32;
+} xSyncResetFenceReq;
+#define sz_xSyncResetFenceReq		8
+
+/*
+ * Destroy a fence object
+ */
+typedef struct _xSyncDestroyFenceReq {
+    CARD8	reqType;
+    CARD8	syncReqType;
+    CARD16	length B16;
+    XSyncFence	fid B32;
+} xSyncDestroyFenceReq;
+#define sz_xSyncDestroyFenceReq		8
+
+/*
  * Events
  */
 
@@ -373,6 +425,7 @@ typedef struct _xSyncAlarmNotifyEvent {
 
 #undef XSyncCounter
 #undef XSyncAlarm
+#undef XSyncFence
 
 
 #endif /* _SYNCPROTO_H_ */
-- 
1.7.1



More information about the xorg-devel mailing list