summaryrefslogtreecommitdiff
path: root/miext/sync/misync.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-04-09 19:59:39 -0700
committerKeith Packard <keithp@keithp.com>2013-10-31 16:58:30 -0700
commit563138298868f62501875d3016f03469dcffaad0 (patch)
treea63491ea60c8a0360351b0e163a8195ce22f697d /miext/sync/misync.c
parentfdec793cdc2ef9a6ea66b311cb1068a7bd4a3be3 (diff)
dri3: Add DRI3 extension
Adds DRM compatible fences using futexes. Uses FD passing to get pixmaps from DRM applications. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'miext/sync/misync.c')
-rw-r--r--miext/sync/misync.c29
1 files changed, 8 insertions, 21 deletions
diff --git a/miext/sync/misync.c b/miext/sync/misync.c
index f38054754..3d03d1b59 100644
--- a/miext/sync/misync.c
+++ b/miext/sync/misync.c
@@ -29,20 +29,7 @@
#include "misync.h"
#include "misyncstr.h"
-static DevPrivateKeyRec syncScreenPrivateKeyRec;
-static DevPrivateKey syncScreenPrivateKey = &syncScreenPrivateKeyRec;
-
-#define SYNC_SCREEN_PRIV(pScreen) \
- (SyncScreenPrivPtr) dixLookupPrivate(&pScreen->devPrivates, \
- syncScreenPrivateKey)
-
-typedef struct _syncScreenPriv {
- /* Wrappable sync-specific screen functions */
- SyncScreenFuncsRec funcs;
-
- /* Wrapped screen functions */
- CloseScreenProcPtr CloseScreen;
-} SyncScreenPrivRec, *SyncScreenPrivPtr;
+DevPrivateKeyRec miSyncScreenPrivateKey;
/* Default implementations of the sync screen functions */
void
@@ -62,25 +49,25 @@ miSyncScreenDestroyFence(ScreenPtr pScreen, SyncFence * pFence)
}
/* Default implementations of the per-object functions */
-static void
+void
miSyncFenceSetTriggered(SyncFence * pFence)
{
pFence->triggered = TRUE;
}
-static void
+void
miSyncFenceReset(SyncFence * pFence)
{
pFence->triggered = FALSE;
}
-static Bool
+Bool
miSyncFenceCheckTriggered(SyncFence * pFence)
{
return pFence->triggered;
}
-static void
+void
miSyncFenceAddTrigger(SyncTrigger * pTrigger)
{
(void) pTrigger;
@@ -88,7 +75,7 @@ miSyncFenceAddTrigger(SyncTrigger * pTrigger)
return;
}
-static void
+void
miSyncFenceDeleteTrigger(SyncTrigger * pTrigger)
{
(void) pTrigger;
@@ -182,8 +169,8 @@ miSyncSetup(ScreenPtr pScreen)
&miSyncScreenDestroyFence
};
- if (!dixPrivateKeyRegistered(syncScreenPrivateKey)) {
- if (!dixRegisterPrivateKey(syncScreenPrivateKey, PRIVATE_SCREEN,
+ if (!dixPrivateKeyRegistered(&miSyncScreenPrivateKey)) {
+ if (!dixRegisterPrivateKey(&miSyncScreenPrivateKey, PRIVATE_SCREEN,
sizeof(SyncScreenPrivRec)))
return FALSE;
}