mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 08:04:30 +00:00
mi: sync: move over public SDK headers to include/
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
f3d2731684
commit
82de39bc4e
@@ -3,13 +3,6 @@ srcs_miext_sync = [
|
||||
'misyncfd.c',
|
||||
]
|
||||
|
||||
hdrs_miext_sync = [
|
||||
'misync.h',
|
||||
'misyncfd.h',
|
||||
'misyncshm.h',
|
||||
'misyncstr.h',
|
||||
]
|
||||
|
||||
if xshmfence_dep.found()
|
||||
srcs_miext_sync += 'misyncshm.c'
|
||||
endif
|
||||
@@ -22,7 +15,3 @@ libxserver_miext_sync = static_library('xserver_miext_sync',
|
||||
xshmfence_dep,
|
||||
],
|
||||
)
|
||||
|
||||
if build_xorg
|
||||
install_data(hdrs_miext_sync, install_dir: xorgsdkdir)
|
||||
endif
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2010 NVIDIA Corporation
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#ifndef _MISYNC_H_
|
||||
#define _MISYNC_H_
|
||||
|
||||
typedef struct _SyncObject SyncObject;
|
||||
typedef struct _SyncFence SyncFence;
|
||||
typedef struct _SyncTrigger SyncTrigger;
|
||||
|
||||
typedef void (*SyncScreenCreateFenceFunc) (ScreenPtr pScreen,
|
||||
SyncFence * pFence,
|
||||
Bool initially_triggered);
|
||||
typedef void (*SyncScreenDestroyFenceFunc) (ScreenPtr pScreen,
|
||||
SyncFence * pFence);
|
||||
|
||||
typedef struct _syncScreenFuncs {
|
||||
SyncScreenCreateFenceFunc CreateFence;
|
||||
SyncScreenDestroyFenceFunc DestroyFence;
|
||||
} SyncScreenFuncsRec, *SyncScreenFuncsPtr;
|
||||
|
||||
extern _X_EXPORT void
|
||||
miSyncScreenCreateFence(ScreenPtr pScreen, SyncFence * pFence,
|
||||
Bool initially_triggered);
|
||||
extern _X_EXPORT void
|
||||
miSyncScreenDestroyFence(ScreenPtr pScreen, SyncFence * pFence);
|
||||
|
||||
typedef void (*SyncFenceSetTriggeredFunc) (SyncFence * pFence);
|
||||
typedef void (*SyncFenceResetFunc) (SyncFence * pFence);
|
||||
typedef Bool (*SyncFenceCheckTriggeredFunc) (SyncFence * pFence);
|
||||
typedef void (*SyncFenceAddTriggerFunc) (SyncTrigger * pTrigger);
|
||||
typedef void (*SyncFenceDeleteTriggerFunc) (SyncTrigger * pTrigger);
|
||||
|
||||
typedef struct _syncFenceFuncs {
|
||||
SyncFenceSetTriggeredFunc SetTriggered;
|
||||
SyncFenceResetFunc Reset;
|
||||
SyncFenceCheckTriggeredFunc CheckTriggered;
|
||||
SyncFenceAddTriggerFunc AddTrigger;
|
||||
SyncFenceDeleteTriggerFunc DeleteTrigger;
|
||||
} SyncFenceFuncsRec, *SyncFenceFuncsPtr;
|
||||
|
||||
extern _X_EXPORT void
|
||||
miSyncInitFence(ScreenPtr pScreen, SyncFence * pFence,
|
||||
Bool initially_triggered);
|
||||
|
||||
extern _X_EXPORT void
|
||||
miSyncDestroyFence(SyncFence * pFence);
|
||||
|
||||
extern _X_EXPORT void
|
||||
miSyncTriggerFence(SyncFence * pFence);
|
||||
|
||||
extern _X_EXPORT SyncScreenFuncsPtr miSyncGetScreenFuncs(ScreenPtr pScreen);
|
||||
extern _X_EXPORT Bool
|
||||
miSyncSetup(ScreenPtr pScreen);
|
||||
|
||||
#endif /* _MISYNC_H_ */
|
||||
@@ -1,45 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2013 Keith Packard
|
||||
*
|
||||
* Permission to use, copy, modify, distribute, and sell this software and its
|
||||
* documentation for any purpose is hereby granted without fee, provided that
|
||||
* the above copyright notice appear in all copies and that both that copyright
|
||||
* notice and this permission notice appear in supporting documentation, and
|
||||
* that the name of the copyright holders not be used in advertising or
|
||||
* publicity pertaining to distribution of the software without specific,
|
||||
* written prior permission. The copyright holders make no representations
|
||||
* about the suitability of this software for any purpose. It is provided "as
|
||||
* is" without express or implied warranty.
|
||||
*
|
||||
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
* EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||
* OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _MISYNCFD_H_
|
||||
#define _MISYNCFD_H_
|
||||
|
||||
typedef int (*SyncScreenCreateFenceFromFdFunc) (ScreenPtr screen,
|
||||
SyncFence *fence,
|
||||
int fd,
|
||||
Bool initially_triggered);
|
||||
|
||||
typedef int (*SyncScreenGetFenceFdFunc) (ScreenPtr screen,
|
||||
SyncFence *fence);
|
||||
|
||||
#define SYNC_FD_SCREEN_FUNCS_VERSION 1
|
||||
|
||||
typedef struct _syncFdScreenFuncs {
|
||||
int version;
|
||||
SyncScreenCreateFenceFromFdFunc CreateFenceFromFd;
|
||||
SyncScreenGetFenceFdFunc GetFenceFd;
|
||||
} SyncFdScreenFuncsRec, *SyncFdScreenFuncsPtr;
|
||||
|
||||
extern _X_EXPORT Bool miSyncFdScreenInit(ScreenPtr pScreen,
|
||||
const SyncFdScreenFuncsRec *funcs);
|
||||
|
||||
#endif /* _MISYNCFD_H_ */
|
||||
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2013 Keith Packard
|
||||
*
|
||||
* Permission to use, copy, modify, distribute, and sell this software and its
|
||||
* documentation for any purpose is hereby granted without fee, provided that
|
||||
* the above copyright notice appear in all copies and that both that copyright
|
||||
* notice and this permission notice appear in supporting documentation, and
|
||||
* that the name of the copyright holders not be used in advertising or
|
||||
* publicity pertaining to distribution of the software without specific,
|
||||
* written prior permission. The copyright holders make no representations
|
||||
* about the suitability of this software for any purpose. It is provided "as
|
||||
* is" without express or implied warranty.
|
||||
*
|
||||
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
* EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||
* OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _MISYNCSHM_H_
|
||||
#define _MISYNCSHM_H_
|
||||
|
||||
extern _X_EXPORT Bool miSyncShmScreenInit(ScreenPtr pScreen);
|
||||
|
||||
#endif /* _MISYNCSHM_H_ */
|
||||
@@ -1,76 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2010 NVIDIA Corporation
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#ifndef _MISYNCSTR_H_
|
||||
#define _MISYNCSTR_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include "dix.h"
|
||||
#include "misync.h"
|
||||
#include "scrnintstr.h"
|
||||
#include <X11/extensions/syncconst.h>
|
||||
|
||||
/* Sync object types */
|
||||
#define SYNC_COUNTER 0
|
||||
#define SYNC_FENCE 1
|
||||
|
||||
struct _SyncObject {
|
||||
ClientPtr client; /* Owning client. 0 for system counters */
|
||||
struct _SyncTriggerList *pTriglist; /* list of triggers */
|
||||
XID id; /* resource ID */
|
||||
unsigned char type; /* SYNC_* */
|
||||
unsigned char initialized; /* FALSE if created but not initialized */
|
||||
Bool beingDestroyed; /* in process of going away */
|
||||
};
|
||||
|
||||
typedef struct _SyncCounter {
|
||||
SyncObject sync; /* Common sync object data */
|
||||
int64_t value; /* counter value */
|
||||
struct _SysCounterInfo *pSysCounterInfo; /* NULL if not a system counter */
|
||||
} SyncCounter;
|
||||
|
||||
struct _SyncFence {
|
||||
SyncObject sync; /* Common sync object data */
|
||||
ScreenPtr pScreen; /* Screen of this fence object */
|
||||
SyncFenceFuncsRec funcs; /* Funcs for performing ops on fence */
|
||||
Bool triggered; /* fence state */
|
||||
PrivateRec *devPrivates; /* driver-specific per-fence data */
|
||||
};
|
||||
|
||||
struct _SyncTrigger {
|
||||
SyncObject *pSync;
|
||||
int64_t wait_value; /* wait value */
|
||||
unsigned int value_type; /* Absolute or Relative */
|
||||
unsigned int test_type; /* transition or Comparison type */
|
||||
int64_t test_value; /* trigger event threshold value */
|
||||
Bool (*CheckTrigger)(struct _SyncTrigger *pTrigger,
|
||||
int64_t newval);
|
||||
void (*TriggerFired)(struct _SyncTrigger *pTrigger);
|
||||
void (*CounterDestroyed)(struct _SyncTrigger *pTrigger);
|
||||
};
|
||||
|
||||
typedef struct _SyncTriggerList {
|
||||
SyncTrigger *pTrigger;
|
||||
struct _SyncTriggerList *next;
|
||||
} SyncTriggerList;
|
||||
|
||||
#endif /* _MISYNCSTR_H_ */
|
||||
Reference in New Issue
Block a user