| 1 |
/*============================================================================== |
| 2 |
Copyright(c) 2019 Intel Corporation |
| 3 |
|
| 4 |
Permission is hereby granted, free of charge, to any person obtaining a |
| 5 |
copy of this software and associated documentation files(the "Software"), |
| 6 |
to deal in the Software without restriction, including without limitation |
| 7 |
the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 8 |
and / or sell copies of the Software, and to permit persons to whom the |
| 9 |
Software is furnished to do so, subject to the following conditions: |
| 10 |
|
| 11 |
The above copyright notice and this permission notice shall be included |
| 12 |
in all copies or substantial portions of the Software. |
| 13 |
|
| 14 |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
| 15 |
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 16 |
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 17 |
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR |
| 18 |
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
| 19 |
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
| 20 |
OTHER DEALINGS IN THE SOFTWARE. |
| 21 |
============================================================================*/ |
| 22 |
|
| 23 |
#pragma once |
| 24 |
|
| 25 |
#if defined(__linux__) && !LHDM |
| 26 |
|
| 27 |
// GMM Lib Client Exports |
| 28 |
#include "External/Common/GmmCommonExt.h" |
| 29 |
#include "External/Common/GmmUtil.h" |
| 30 |
#include "External/Common/GmmResourceFlags.h" |
| 31 |
#include "External/Common/GmmCachePolicy.h" |
| 32 |
#include "External/Common/GmmCachePolicyExt.h" |
| 33 |
#include "External/Common/GmmResourceInfoExt.h" |
| 34 |
#include "External/Common/GmmPlatformExt.h" |
| 35 |
#include "External/Common/GmmTextureExt.h" |
| 36 |
#include "External/Common/GmmInfoExt.h" |
| 37 |
#include "External/Common/GmmResourceInfo.h" |
| 38 |
#include "External/Common/GmmInfo.h" |
| 39 |
|
| 40 |
typedef struct { |
| 41 |
size_t size; |
| 42 |
size_t alignment; |
| 43 |
void *bo; |
| 44 |
void *cpuAddr; |
| 45 |
uint64_t gfxAddr; |
| 46 |
} GMM_DDI_ALLOCATE; |
| 47 |
|
| 48 |
typedef struct { |
| 49 |
void *bo; |
| 50 |
} GMM_DDI_DEALLOCATE; |
| 51 |
|
| 52 |
typedef struct { |
| 53 |
void *bo; |
| 54 |
}GMM_DDI_WAITFORSYNCHRONIZATIONOBJECTFROMCPU; |
| 55 |
|
| 56 |
typedef enum GMM_DEVICE_CALLBACKS_TYPE_REC |
| 57 |
{ |
| 58 |
GMM_DEV_CB_ALLOC = 0, |
| 59 |
GMM_DEV_CB_DEALLOC, |
| 60 |
GMM_DEV_CB_WAIT_FROM_CPU, |
| 61 |
} GMM_DEVICE_CALLBACKS_TYPE; |
| 62 |
|
| 63 |
int GmmDeviceCallback(GMM_CLIENT ClientType, GMM_DEVICE_CALLBACKS_INT *pDeviceCb, GMM_DDI_ALLOCATE *pAllocate); |
| 64 |
int GmmDeviceCallback(GMM_CLIENT ClientType, GMM_DEVICE_CALLBACKS_INT *pDeviceCb, GMM_DDI_DEALLOCATE *pDeallocate); |
| 65 |
int GmmDeviceCallback(GMM_CLIENT ClientType, GMM_DEVICE_CALLBACKS_INT *pDeviceCb, GMM_DDI_WAITFORSYNCHRONIZATIONOBJECTFROMCPU *pWait); |
| 66 |
|
| 67 |
int GmmCheckForNullDevCbPfn(GMM_CLIENT ClientType, GMM_DEVICE_CALLBACKS_INT *pDeviceCb, GMM_DEVICE_CALLBACKS_TYPE CallBackType); |
| 68 |
|
| 69 |
extern GMM_TRANSLATIONTABLE_CALLBACKS DummyTTCB; |
| 70 |
|
| 71 |
#endif /*__linux__*/ |