diff options
Diffstat (limited to 'sgx/services4/srvkm/include')
-rw-r--r-- | sgx/services4/srvkm/include/buffer_manager.h | 8 | ||||
-rw-r--r--[-rwxr-xr-x] | sgx/services4/srvkm/include/device.h | 15 | ||||
-rw-r--r-- | sgx/services4/srvkm/include/osfunc.h | 21 | ||||
-rw-r--r-- | sgx/services4/srvkm/include/osperproc.h | 2 | ||||
-rw-r--r-- | sgx/services4/srvkm/include/pdump_km.h | 4 |
5 files changed, 25 insertions, 25 deletions
diff --git a/sgx/services4/srvkm/include/buffer_manager.h b/sgx/services4/srvkm/include/buffer_manager.h index c8fa227..46f5a68 100644 --- a/sgx/services4/srvkm/include/buffer_manager.h +++ b/sgx/services4/srvkm/include/buffer_manager.h @@ -187,6 +187,13 @@ BM_RegisterSmart(BM_HANDLE hBuf, IMG_HANDLE hSmartCache); IMG_VOID BM_UnregisterSmart(BM_HANDLE hBuf, IMG_HANDLE hSmartCache); + +#if defined(SUPPORT_DRI_DRM_EXTERNAL) +IMG_VOID BM_SetGEM(BM_HANDLE hBuf, IMG_HANDLE buf); +IMG_HANDLE BM_GetGEM(BM_HANDLE hBuf); +#endif /* SUPPORT_DRI_DRM_EXTERNAL */ + + IMG_CPU_VIRTADDR BM_HandleToCpuVaddr (BM_HANDLE hBuf); @@ -230,6 +237,7 @@ PVRSRV_ERROR BM_XProcSetShareIndex(PXProcShareDataNode pShareDataNode); PVRSRV_ERROR BM_XProcFinishShareIndex(PXProcShareDataNode pShareDataNode, IMG_BOOL freeIfNotUsed); PXProcShareDataNode BM_XProcAllocNewBuffer(void); +IMG_UINT32 BM_XProcWorkaroundGetRefCount(IMG_UINT32 ui32Index); #if defined(__cplusplus) } diff --git a/sgx/services4/srvkm/include/device.h b/sgx/services4/srvkm/include/device.h index 486226d..9df2c73 100755..100644 --- a/sgx/services4/srvkm/include/device.h +++ b/sgx/services4/srvkm/include/device.h @@ -276,21 +276,6 @@ typedef struct _PVRSRV_DEVICE_NODE_ IMG_UINT32 (*pfnMMUGetContextID)(IMG_HANDLE hDevMemContext); #endif - - /* to restrict visibility of certain device nodes to certain userspace - * facing character devices, this handle can be set. If the handle is - * not null, it is compared to the handle passed down from the ioctl - * when the devices are enumerated, and if it does not match, then this - * device is hidden. - * - * For a practical example, with omaplfb the handle is set to the fb_info - * struct corresponding to the fbdev associated with the drm_device - * instance. So if the system is configured with two independent - * display drivers (card0 and card1), then each display driver instance - * will only see display-class devices associated with that driver - * instance. - */ - IMG_VOID *handle; } PVRSRV_DEVICE_NODE; PVRSRV_ERROR IMG_CALLCONV PVRSRVRegisterDevice(PSYS_DATA psSysData, diff --git a/sgx/services4/srvkm/include/osfunc.h b/sgx/services4/srvkm/include/osfunc.h index ddf2482..2341c87 100644 --- a/sgx/services4/srvkm/include/osfunc.h +++ b/sgx/services4/srvkm/include/osfunc.h @@ -152,7 +152,7 @@ static INLINE IMG_BOOL OSInvalidateCPUCacheRangeKM(IMG_HANDLE hOSMemHandle, #endif -#if defined(__linux__) +#if (defined(__linux__) || defined(__QNXNTO__)) PVRSRV_ERROR OSRegisterDiscontigMem(IMG_SYS_PHYADDR *pBasePAddr, IMG_VOID *pvCpuVAddr, IMG_SIZE_T ui32Bytes, @@ -199,13 +199,13 @@ static INLINE PVRSRV_ERROR OSUnRegisterDiscontigMem(IMG_VOID *pvCpuVAddr, #endif -#if defined(__linux__) +#if (defined(__linux__) || defined(__QNXNTO__)) #ifdef INLINE_IS_PRAGMA #pragma inline(OSReserveDiscontigPhys) #endif static INLINE PVRSRV_ERROR OSReserveDiscontigPhys(IMG_SYS_PHYADDR *pBasePAddr, IMG_SIZE_T ui32Bytes, IMG_UINT32 ui32Flags, IMG_VOID **ppvCpuVAddr, IMG_HANDLE *phOSMemHandle) { -#if defined(__linux__) +#if defined(__linux__) || defined(__QNXNTO__) *ppvCpuVAddr = IMG_NULL; return OSRegisterDiscontigMem(pBasePAddr, *ppvCpuVAddr, ui32Bytes, ui32Flags, phOSMemHandle); #else @@ -218,7 +218,7 @@ static INLINE PVRSRV_ERROR OSReserveDiscontigPhys(IMG_SYS_PHYADDR *pBasePAddr, I static INLINE PVRSRV_ERROR OSUnReserveDiscontigPhys(IMG_VOID *pvCpuVAddr, IMG_SIZE_T ui32Bytes, IMG_UINT32 ui32Flags, IMG_HANDLE hOSMemHandle) { -#if defined(__linux__) +#if defined(__linux__) || defined(__QNXNTO__) OSUnRegisterDiscontigMem(pvCpuVAddr, ui32Bytes, ui32Flags, hOSMemHandle); #endif @@ -267,7 +267,7 @@ PVRSRV_ERROR OSUnRegisterMem(IMG_VOID *pvCpuVAddr, -#if defined(__linux__) +#if defined(__linux__) || defined(__QNXNTO__) PVRSRV_ERROR OSGetSubMemHandle(IMG_HANDLE hOSMemHandle, IMG_UINTPTR_T ui32ByteOffset, IMG_SIZE_T ui32Bytes, @@ -368,7 +368,7 @@ PVRSRV_ERROR OSFreePages(IMG_UINT32 ui32Flags, IMG_SIZE_T ui32Size, IMG_PVOID pv #define OSFreeMem_Debug_Wrapper OSFreeMem_Debug_Linux_Memory_Allocations #endif -#if defined(__linux__) && defined(DEBUG_LINUX_MEMORY_ALLOCATIONS) +#if (defined(__linux__) || defined(__QNXNTO__)) && defined(DEBUG_LINUX_MEMORY_ALLOCATIONS) PVRSRV_ERROR OSAllocMem_Impl(IMG_UINT32 ui32Flags, IMG_SIZE_T ui32Size, IMG_PVOID *ppvLinAddr, IMG_HANDLE *phBlockAlloc, IMG_CHAR *pszFilename, IMG_UINT32 ui32Line); PVRSRV_ERROR OSFreeMem_Impl(IMG_UINT32 ui32Flags, IMG_SIZE_T ui32Size, IMG_PVOID pvLinAddr, IMG_HANDLE hBlockAlloc, IMG_CHAR *pszFilename, IMG_UINT32 ui32Line); @@ -387,7 +387,12 @@ PVRSRV_ERROR OSFreePages(IMG_UINT32 ui32Flags, IMG_SIZE_T ui32Size, IMG_PVOID pv IMG_VOID OSMemHandleRegisterSmart(IMG_VOID *hOSMemHandle, IMG_HANDLE hSmartCache); IMG_VOID OSMemHandleUnegisterSmart(IMG_VOID *hOSMemHandle, IMG_HANDLE hSmartCache); -#if defined(__linux__) +#if defined(SUPPORT_DRI_DRM_EXTERNAL) +IMG_VOID OSMemHandleSetGEM(IMG_VOID *hOSMemHandle, IMG_HANDLE buf); +IMG_HANDLE OSMemHandleGetGEM(IMG_VOID *hOSMemHandle); +#endif /* SUPPORT_DRI_DRM_EXTERNAL */ + +#if defined(__linux__) || defined(__QNXNTO__) IMG_CPU_PHYADDR OSMemHandleToCpuPAddr(IMG_VOID *hOSMemHandle, IMG_SIZE_T ui32ByteOffset); #else #ifdef INLINE_IS_PRAGMA @@ -535,7 +540,7 @@ IMG_BOOL OSAccessOK(IMG_VERIFY_TEST eVerification, IMG_VOID *pvUserPtr, IMG_SIZE PVRSRV_ERROR OSCopyToUser(IMG_PVOID pvProcess, IMG_VOID *pvDest, IMG_VOID *pvSrc, IMG_SIZE_T ui32Bytes); PVRSRV_ERROR OSCopyFromUser(IMG_PVOID pvProcess, IMG_VOID *pvDest, IMG_VOID *pvSrc, IMG_SIZE_T ui32Bytes); -#if defined(__linux__) +#if (defined(__linux__) || defined(__QNXNTO__)) PVRSRV_ERROR OSAcquirePhysPageAddr(IMG_VOID* pvCPUVAddr, IMG_SIZE_T ui32Bytes, IMG_SYS_PHYADDR *psSysPAddr, diff --git a/sgx/services4/srvkm/include/osperproc.h b/sgx/services4/srvkm/include/osperproc.h index 02aa230..e5c81da 100644 --- a/sgx/services4/srvkm/include/osperproc.h +++ b/sgx/services4/srvkm/include/osperproc.h @@ -31,7 +31,7 @@ extern "C" { #endif -#if defined(__linux__) +#if defined(__linux__) || defined(__QNXNTO__) PVRSRV_ERROR OSPerProcessPrivateDataInit(IMG_HANDLE *phOsPrivateData); PVRSRV_ERROR OSPerProcessPrivateDataDeInit(IMG_HANDLE hOsPrivateData); diff --git a/sgx/services4/srvkm/include/pdump_km.h b/sgx/services4/srvkm/include/pdump_km.h index 149eba9..418c6d7 100644 --- a/sgx/services4/srvkm/include/pdump_km.h +++ b/sgx/services4/srvkm/include/pdump_km.h @@ -339,6 +339,7 @@ extern IMG_UINT32 g_ui32EveryLineCounter; #define PDUMPMALLOCPAGETABLE PDumpMallocPageTable #define PDUMPSETMMUCONTEXT PDumpSetMMUContext #define PDUMPCLEARMMUCONTEXT PDumpClearMMUContext + #define PDUMPPDDEVPADDR PDumpPDDevPAddrKM #define PDUMPFREEPAGES PDumpFreePages #define PDUMPFREEPAGETABLE PDumpFreePageTable #define PDUMPPDREG PDumpPDReg @@ -355,7 +356,7 @@ extern IMG_UINT32 g_ui32EveryLineCounter; #define PDUMPRESUME PDumpResumeKM #else - #if ((defined(LINUX) || defined(GCC_IA32)) || defined(GCC_ARM)) + #if (((defined(LINUX) || defined(__QNXNTO__)) || defined(GCC_IA32)) || defined(GCC_ARM)) #define PDUMPMEMPOL(args...) #define PDUMPMEM(args...) #define PDUMPMEMPTENTRIES(args...) @@ -375,6 +376,7 @@ extern IMG_UINT32 g_ui32EveryLineCounter; #define PDUMPMALLOCPAGETABLE(args...) #define PDUMPSETMMUCONTEXT(args...) #define PDUMPCLEARMMUCONTEXT(args...) + #define PDUMPPDDEVPADDR(args...) #define PDUMPFREEPAGES(args...) #define PDUMPFREEPAGETABLE(args...) #define PDUMPPDREG(args...) |