diff options
author | Hemant Hariyani | 2014-12-01 10:31:50 -0600 |
---|---|---|
committer | Hemant Hariyani | 2014-12-01 10:59:08 -0600 |
commit | 7ba6322476fe758da39a711c4918516694da23af (patch) | |
tree | bff4b1dd1bea0a68111d792d32245c4451867837 | |
parent | 61b0359352629226e33d2ab8ce1dc0e47508b344 (diff) | |
download | device-ti-proprietary-open-7ba6322476fe758da39a711c4918516694da23af.tar.gz device-ti-proprietary-open-7ba6322476fe758da39a711c4918516694da23af.tar.xz device-ti-proprietary-open-7ba6322476fe758da39a711c4918516694da23af.zip |
sgx_src: Update sgx_src with missing files and platform rev
This files were missing from the previous commit. Also, set
default platform version to 5.0 to allow building KM
without Android enviornment.
Change-Id: I768a1824846ac07574ca3b78769dd4bf56628c80
Signed-off-by: Hemant Hariyani <hemanthariyani@ti.com>
-rw-r--r-- | jacinto6/README.SGX | 12 | ||||
-rw-r--r-- | jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/platform_version.mk | 2 | ||||
-rw-r--r-- | jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/dmabuf.c | 283 | ||||
-rw-r--r-- | jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/dmabuf.h | 58 | ||||
-rw-r--r-- | jacinto6/sgx_src/eurasia_km/services4/srvkm/include/external_sync.h (renamed from jacinto6/sgx_src/eurasia_km/services4/srvkm/include/ion_sync.h) | 24 |
5 files changed, 361 insertions, 18 deletions
diff --git a/jacinto6/README.SGX b/jacinto6/README.SGX index 1479e47..c1fde6c 100644 --- a/jacinto6/README.SGX +++ b/jacinto6/README.SGX | |||
@@ -16,11 +16,13 @@ sgx.tgz a set of binaries built for SGX544. | |||
16 | [DDK Version] | 16 | [DDK Version] |
17 | 1.12/2917986 | 17 | 1.12/2917986 |
18 | [DDK commit ID] | 18 | [DDK commit ID] |
19 | 0c60181 android: update hal_public.h for TI formats | 19 | c76a085 build-km: Set 5.0 as default version |
20 | [Branch] | 20 | [Branch] |
21 | android/1.12/2917986_k3.14_L_gem | 21 | android/1.12/2917986_k3.14_L_gem |
22 | [Kernel modules built against] | 22 | [Kernel modules built against] |
23 | Kernel Version: 3.14.y with CONFIG_MODVERSIONS=y | 23 | Kernel Version: 3.14.y with CONFIG_MODVERSIONS=y |
24 | [Build type] | ||
25 | debug (export BUILD=debug) | ||
24 | 26 | ||
25 | #=========================================================================== | 27 | #=========================================================================== |
26 | # Building SGX Kernel Modules | 28 | # Building SGX Kernel Modules |
@@ -31,17 +33,17 @@ Make sure kernel is built before building modules | |||
31 | 33 | ||
32 | # cd ANDROID_ROOT/device/ti/proprietary-open/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap_android/ | 34 | # cd ANDROID_ROOT/device/ti/proprietary-open/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap_android/ |
33 | # export KERNELDIR=path_to_kernel | 35 | # export KERNELDIR=path_to_kernel |
36 | # export PATH=<path to kernel toolchain>:$PATH | ||
34 | 37 | ||
35 | To build for OMAP5 (SGX 544 multi core): | 38 | To build for OMAP5 (SGX 544 multi core): |
36 | # make ARCH=arm KERNEL_CROSS_COMPILE=arm-eabi- CROSS_COMPILE=arm-eabi- TARGET_PRODUCT="jacinto6evm" PLATFORM_VERSION=5.0 BUILD=debug | 39 | # make ARCH=arm KERNEL_CROSS_COMPILE=arm-eabi- CROSS_COMPILE=arm-eabi- TARGET_PRODUCT="jacinto6evm" BUILD=debug |
37 | 40 | ||
38 | Once the .ko is built, install it onto device (/system/lib/modules) | 41 | Once the .ko is built, install it onto device (/system/lib/modules) |
39 | 42 | ||
40 | # cd ANDROID_ROOT/device/ti/proprietary-open/jacinto6/sgx_src/eurasia_km/eurasiacon/binary2_omap_android_release/target/ | 43 | # cd ANDROID_ROOT/device/ti/proprietary-open/jacinto6/sgx_src/eurasia_km/eurasiacon/binary2_omap_android_debug/target/ |
41 | # adb push pvrsrvkm.ko /system/lib/modules/ | 44 | # adb push pvrsrvkm.ko /system/lib/modules/ |
42 | # adb push omaplfb.ko /system/lib/modules/ | ||
43 | 45 | ||
44 | If you build the kernel module, it is highly advisable to replace the binaries | 46 | If you build the kernel module, it is highly advisable to replace the binaries |
45 | in your device with the ones located in sgx.tgz to avoid incompatibility. | 47 | in your device with the ones in sgx.tgz to avoid incompatibility. |
46 | 48 | ||
47 | Reboot device. | 49 | Reboot device. |
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/platform_version.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/platform_version.mk index 482fd19..bf43dda 100644 --- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/platform_version.mk +++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/platform_version.mk | |||
@@ -45,7 +45,7 @@ PLATFORM_VERSION := $(shell \ | |||
45 | cat $(TARGET_ROOT)/product/$(TARGET_DEVICE)/system/build.prop | \ | 45 | cat $(TARGET_ROOT)/product/$(TARGET_DEVICE)/system/build.prop | \ |
46 | grep ^ro.build.version.release | cut -f2 -d'=' | cut -f1 -d'-'; \ | 46 | grep ^ro.build.version.release | cut -f2 -d'=' | cut -f1 -d'-'; \ |
47 | else \ | 47 | else \ |
48 | echo 1.6; \ | 48 | echo 5.0; \ |
49 | fi) | 49 | fi) |
50 | 50 | ||
51 | define version-starts-with | 51 | define version-starts-with |
diff --git a/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/dmabuf.c b/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/dmabuf.c new file mode 100644 index 0000000..29c7d5d --- /dev/null +++ b/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/dmabuf.c | |||
@@ -0,0 +1,283 @@ | |||
1 | /*************************************************************************/ /*! | ||
2 | @Title Ion driver inter-operability code. | ||
3 | @Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved | ||
4 | @License Dual MIT/GPLv2 | ||
5 | |||
6 | The contents of this file are subject to the MIT license as set out below. | ||
7 | |||
8 | Permission is hereby granted, free of charge, to any person obtaining a copy | ||
9 | of this software and associated documentation files (the "Software"), to deal | ||
10 | in the Software without restriction, including without limitation the rights | ||
11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
12 | copies of the Software, and to permit persons to whom the Software is | ||
13 | furnished to do so, subject to the following conditions: | ||
14 | |||
15 | The above copyright notice and this permission notice shall be included in | ||
16 | all copies or substantial portions of the Software. | ||
17 | |||
18 | Alternatively, the contents of this file may be used under the terms of | ||
19 | the GNU General Public License Version 2 ("GPL") in which case the provisions | ||
20 | of GPL are applicable instead of those above. | ||
21 | |||
22 | If you wish to allow use of your version of this file only under the terms of | ||
23 | GPL, and not to allow others to use your version of this file under the terms | ||
24 | of the MIT license, indicate your decision by deleting the provisions above | ||
25 | and replace them with the notice and other provisions required by GPL as set | ||
26 | out in the file called "GPL-COPYING" included in this distribution. If you do | ||
27 | not delete the provisions above, a recipient may use your version of this file | ||
28 | under the terms of either the MIT license or GPL. | ||
29 | |||
30 | This License is also included in this distribution in the file called | ||
31 | "MIT-COPYING". | ||
32 | |||
33 | EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS | ||
34 | PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING | ||
35 | BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR | ||
36 | PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR | ||
37 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
38 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
39 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
40 | */ /**************************************************************************/ | ||
41 | |||
42 | #include "dmabuf.h" | ||
43 | #include <linux/platform_device.h> | ||
44 | #include <linux/dma-buf.h> | ||
45 | #include <linux/dma-direction.h> | ||
46 | #include <linux/scatterlist.h> | ||
47 | #include <linux/kernel.h> | ||
48 | #include <linux/slab.h> | ||
49 | #include <linux/err.h> | ||
50 | |||
51 | extern struct platform_device *gpsPVRLDMDev; | ||
52 | |||
53 | #define MAX_IMPORT_DMABUF_FDS 3 | ||
54 | |||
55 | typedef struct _DMABUF_IMPORT_DATA_ | ||
56 | { | ||
57 | /* Number of dma_buf handles represented by this import */ | ||
58 | IMG_UINT32 ui32NumHandles; | ||
59 | |||
60 | /* Array of dma_buf handles in use by services */ | ||
61 | struct dma_buf *apsDmaBuf[MAX_IMPORT_DMABUF_FDS]; | ||
62 | |||
63 | /* Array of dma_buf attachments */ | ||
64 | struct dma_buf_attachment *apsDmaBufAttachment[MAX_IMPORT_DMABUF_FDS]; | ||
65 | |||
66 | /* Array of sg_tables */ | ||
67 | struct sg_table *apsSgTable[MAX_IMPORT_DMABUF_FDS]; | ||
68 | |||
69 | /* Array of physical addresses represented by these buffers */ | ||
70 | IMG_SYS_PHYADDR *psSysPhysAddr; | ||
71 | |||
72 | #if defined(PDUMP) | ||
73 | /* FIXME: Not sure if this is needed here */ | ||
74 | IMG_PVOID pvKernAddr0; | ||
75 | #endif /* defined(PDUMP) */ | ||
76 | } | ||
77 | DMABUF_IMPORT_DATA; | ||
78 | |||
79 | PVRSRV_ERROR DmabufImportBufferAndAcquirePhysAddr(IMG_UINT32 ui32NumFDs, | ||
80 | IMG_INT32 *pai32BufferFDs, | ||
81 | IMG_UINT32 *pui32PageCount, | ||
82 | IMG_SYS_PHYADDR **ppsSysPhysAddr, | ||
83 | IMG_PVOID *ppvKernAddr0, | ||
84 | IMG_HANDLE *phPriv, | ||
85 | IMG_HANDLE *phUnique) | ||
86 | { | ||
87 | struct scatterlist *psTemp, *psScatterList[MAX_IMPORT_DMABUF_FDS] = {}; | ||
88 | PVRSRV_ERROR eError = PVRSRV_ERROR_OUT_OF_MEMORY; | ||
89 | IMG_UINT32 i, k, ui32PageCount = 0; | ||
90 | DMABUF_IMPORT_DATA *psImportData; | ||
91 | |||
92 | if(ui32NumFDs > MAX_IMPORT_DMABUF_FDS) | ||
93 | { | ||
94 | printk(KERN_ERR "%s: More passed in than supported " | ||
95 | "(%d provided, %d max)", __func__, ui32NumFDs, | ||
96 | MAX_IMPORT_DMABUF_FDS); | ||
97 | return PVRSRV_ERROR_INVALID_PARAMS; | ||
98 | } | ||
99 | |||
100 | psImportData = kzalloc(sizeof(DMABUF_IMPORT_DATA), GFP_KERNEL); | ||
101 | if (psImportData == NULL) | ||
102 | { | ||
103 | goto exitFailKMallocImportData; | ||
104 | } | ||
105 | |||
106 | /* Set up import data for free call */ | ||
107 | psImportData->ui32NumHandles = ui32NumFDs; | ||
108 | |||
109 | for(i = 0; i < ui32NumFDs; i++) | ||
110 | { | ||
111 | int fd = (int)pai32BufferFDs[i]; | ||
112 | |||
113 | psImportData->apsDmaBuf[i] = dma_buf_get(fd); | ||
114 | if (psImportData->apsDmaBuf[i] == IMG_NULL) | ||
115 | { | ||
116 | eError = PVRSRV_ERROR_BAD_MAPPING; | ||
117 | goto exitFailImport; | ||
118 | } | ||
119 | |||
120 | psImportData->apsDmaBufAttachment[i] = dma_buf_attach(psImportData->apsDmaBuf[i], | ||
121 | &gpsPVRLDMDev->dev); | ||
122 | |||
123 | psImportData->apsSgTable[i] = dma_buf_map_attachment(psImportData->apsDmaBufAttachment[i], | ||
124 | DMA_BIDIRECTIONAL); | ||
125 | |||
126 | psScatterList[i] = psImportData->apsSgTable[i]->sgl; | ||
127 | if (psScatterList[i] == NULL) | ||
128 | { | ||
129 | eError = PVRSRV_ERROR_INVALID_PARAMS; | ||
130 | goto exitFailImport; | ||
131 | } | ||
132 | |||
133 | /* Although all heaps will provide an sg_table, the tables cannot | ||
134 | * always be trusted because sg_lists are just pointers to "struct | ||
135 | * page" values, and some memory e.g. carveout may not have valid | ||
136 | * "struct page" values. In particular, on ARM, carveout is | ||
137 | * generally reserved with memblock_remove(), which leaves the | ||
138 | * "struct page" entries uninitialized when SPARSEMEM is enabled. | ||
139 | * The effect of this is that page_to_pfn(pfn_to_page(pfn)) != pfn. | ||
140 | * | ||
141 | * There's more discussion on this mailing list thread: | ||
142 | * http://lists.linaro.org/pipermail/linaro-mm-sig/2012-August/002440.html | ||
143 | * | ||
144 | * probably a contiguous allocator. If the phys() function is | ||
145 | * implemented, we'll use it to check sg_table->sgl[0]. If we find | ||
146 | * they don't agree, we'll assume phys() is more reliable and use | ||
147 | * that. | ||
148 | * | ||
149 | * Some heaps out there will implement phys() even though they are | ||
150 | * not for physically contiguous allocations (so the sg_table must | ||
151 | * be used). Therefore use the sg_table if the phys() and first | ||
152 | * sg_table entry match. This should be reliable because for most | ||
153 | * contiguous allocators, the sg_table should be a single span | ||
154 | * from 'start' to 'start+size'. | ||
155 | * | ||
156 | * Also, ion prints out an error message if the heap doesn't implement | ||
157 | * ->phys(), which we want to avoid, so only use ->phys() if the | ||
158 | * sg_table contains a single span and therefore could plausibly | ||
159 | * be a contiguous allocator. | ||
160 | */ | ||
161 | #if 0 | ||
162 | if(!sg_next(psScatterList[i])) | ||
163 | { | ||
164 | ion_phys_addr_t sPhyAddr; | ||
165 | size_t sLength; | ||
166 | |||
167 | if(!ion_phys(psIonClient, psImportData->apsIonHandle[i], | ||
168 | &sPhyAddr, &sLength)) | ||
169 | { | ||
170 | BUG_ON(sLength & ~PAGE_MASK); | ||
171 | |||
172 | if(sg_phys(psScatterList[i]) != sPhyAddr) | ||
173 | { | ||
174 | psScatterList[i] = IMG_NULL; | ||
175 | ui32PageCount += sLength / PAGE_SIZE; | ||
176 | } | ||
177 | } | ||
178 | } | ||
179 | #endif | ||
180 | for(psTemp = psScatterList[i]; psTemp; psTemp = sg_next(psTemp)) | ||
181 | { | ||
182 | IMG_UINT32 j; | ||
183 | for (j = 0; j < psTemp->length; j += PAGE_SIZE) | ||
184 | { | ||
185 | ui32PageCount++; | ||
186 | } | ||
187 | } | ||
188 | } | ||
189 | |||
190 | BUG_ON(ui32PageCount == 0); | ||
191 | |||
192 | psImportData->psSysPhysAddr = kmalloc(sizeof(IMG_SYS_PHYADDR) * ui32PageCount, GFP_KERNEL); | ||
193 | if (psImportData->psSysPhysAddr == NULL) | ||
194 | { | ||
195 | goto exitFailImport; | ||
196 | } | ||
197 | |||
198 | for(i = 0, k = 0; i < ui32NumFDs; i++) | ||
199 | { | ||
200 | if(psScatterList[i]) | ||
201 | { | ||
202 | for(psTemp = psScatterList[i]; psTemp; psTemp = sg_next(psTemp)) | ||
203 | { | ||
204 | IMG_UINT32 j; | ||
205 | for (j = 0; j < psTemp->length; j += PAGE_SIZE) | ||
206 | { | ||
207 | psImportData->psSysPhysAddr[k].uiAddr = sg_phys(psTemp) + j; | ||
208 | k++; | ||
209 | } | ||
210 | } | ||
211 | } | ||
212 | #if 0 | ||
213 | else | ||
214 | { | ||
215 | ion_phys_addr_t sPhyAddr; | ||
216 | size_t sLength, j; | ||
217 | |||
218 | ion_phys(psIonClient, psImportData->apsIonHandle[i], | ||
219 | &sPhyAddr, &sLength); | ||
220 | |||
221 | for(j = 0; j < sLength; j += PAGE_SIZE) | ||
222 | { | ||
223 | psImportData->psSysPhysAddr[k].uiAddr = sPhyAddr + j; | ||
224 | k++; | ||
225 | } | ||
226 | } | ||
227 | #endif | ||
228 | } | ||
229 | |||
230 | *pui32PageCount = ui32PageCount; | ||
231 | *ppsSysPhysAddr = psImportData->psSysPhysAddr; | ||
232 | |||
233 | #if defined(PDUMP) | ||
234 | if(ui32NumFDs == 1) | ||
235 | { | ||
236 | /*FIXME */ | ||
237 | /* Need to handle kernel mapping */ | ||
238 | } | ||
239 | else | ||
240 | #endif /* defined(PDUMP) */ | ||
241 | { | ||
242 | *ppvKernAddr0 = NULL; | ||
243 | } | ||
244 | |||
245 | *phPriv = psImportData; | ||
246 | *phUnique = (IMG_HANDLE)psImportData->psSysPhysAddr[0].uiAddr; | ||
247 | |||
248 | return PVRSRV_OK; | ||
249 | |||
250 | exitFailImport: | ||
251 | for(i = 0; psImportData->apsDmaBuf[i] != NULL; i++) | ||
252 | { | ||
253 | dma_buf_put(psImportData->apsDmaBuf[i]); | ||
254 | } | ||
255 | kfree(psImportData); | ||
256 | exitFailKMallocImportData: | ||
257 | return eError; | ||
258 | } | ||
259 | |||
260 | IMG_VOID DmabufUnimportBufferAndReleasePhysAddr(IMG_HANDLE hPriv) | ||
261 | { | ||
262 | DMABUF_IMPORT_DATA *psImportData = hPriv; | ||
263 | IMG_UINT32 i; | ||
264 | |||
265 | #if defined(PDUMP) | ||
266 | if (psImportData->pvKernAddr0) | ||
267 | { | ||
268 | //FIXME | ||
269 | } | ||
270 | #endif /* defined(PDUMP) */ | ||
271 | for(i = 0; i < psImportData->ui32NumHandles; i++) | ||
272 | { | ||
273 | dma_buf_unmap_attachment(psImportData->apsDmaBufAttachment[i], | ||
274 | psImportData->apsSgTable[i], | ||
275 | DMA_BIDIRECTIONAL); | ||
276 | dma_buf_detach(psImportData->apsDmaBuf[i], | ||
277 | psImportData->apsDmaBufAttachment[i]); | ||
278 | dma_buf_put(psImportData->apsDmaBuf[i]); | ||
279 | } | ||
280 | |||
281 | kfree(psImportData->psSysPhysAddr); | ||
282 | kfree(psImportData); | ||
283 | } | ||
diff --git a/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/dmabuf.h b/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/dmabuf.h new file mode 100644 index 0000000..4ea3ff1 --- /dev/null +++ b/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/dmabuf.h | |||
@@ -0,0 +1,58 @@ | |||
1 | /*************************************************************************/ /*! | ||
2 | @Title Ion driver inter-operability code. | ||
3 | @Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved | ||
4 | @License Dual MIT/GPLv2 | ||
5 | |||
6 | The contents of this file are subject to the MIT license as set out below. | ||
7 | |||
8 | Permission is hereby granted, free of charge, to any person obtaining a copy | ||
9 | of this software and associated documentation files (the "Software"), to deal | ||
10 | in the Software without restriction, including without limitation the rights | ||
11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
12 | copies of the Software, and to permit persons to whom the Software is | ||
13 | furnished to do so, subject to the following conditions: | ||
14 | |||
15 | The above copyright notice and this permission notice shall be included in | ||
16 | all copies or substantial portions of the Software. | ||
17 | |||
18 | Alternatively, the contents of this file may be used under the terms of | ||
19 | the GNU General Public License Version 2 ("GPL") in which case the provisions | ||
20 | of GPL are applicable instead of those above. | ||
21 | |||
22 | If you wish to allow use of your version of this file only under the terms of | ||
23 | GPL, and not to allow others to use your version of this file under the terms | ||
24 | of the MIT license, indicate your decision by deleting the provisions above | ||
25 | and replace them with the notice and other provisions required by GPL as set | ||
26 | out in the file called "GPL-COPYING" included in this distribution. If you do | ||
27 | not delete the provisions above, a recipient may use your version of this file | ||
28 | under the terms of either the MIT license or GPL. | ||
29 | |||
30 | This License is also included in this distribution in the file called | ||
31 | "MIT-COPYING". | ||
32 | |||
33 | EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS | ||
34 | PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING | ||
35 | BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR | ||
36 | PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR | ||
37 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
38 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
39 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
40 | */ /**************************************************************************/ | ||
41 | |||
42 | #ifndef __IMG_LINUX_DMABUF_H__ | ||
43 | #define __IMG_LINUX_DMABUF_H__ | ||
44 | |||
45 | #include "img_types.h" | ||
46 | #include "servicesext.h" | ||
47 | |||
48 | PVRSRV_ERROR DmabufImportBufferAndAcquirePhysAddr(IMG_UINT32 ui32NumFDs, | ||
49 | IMG_INT32 *pi32BufferFDs, | ||
50 | IMG_UINT32 *pui32PageCount, | ||
51 | IMG_SYS_PHYADDR **ppsSysPhysAddr, | ||
52 | IMG_PVOID *ppvKernAddr0, | ||
53 | IMG_HANDLE *phPriv, | ||
54 | IMG_HANDLE *phUnique); | ||
55 | |||
56 | IMG_VOID DmabufUnimportBufferAndReleasePhysAddr(IMG_HANDLE hPriv); | ||
57 | |||
58 | #endif /* __IMG_LINUX_DMABUF_H__ */ | ||
diff --git a/jacinto6/sgx_src/eurasia_km/services4/srvkm/include/ion_sync.h b/jacinto6/sgx_src/eurasia_km/services4/srvkm/include/external_sync.h index 8600a19..9b64d1e 100644 --- a/jacinto6/sgx_src/eurasia_km/services4/srvkm/include/ion_sync.h +++ b/jacinto6/sgx_src/eurasia_km/services4/srvkm/include/external_sync.h | |||
@@ -43,31 +43,31 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |||
43 | #include "img_types.h" | 43 | #include "img_types.h" |
44 | #include "servicesint.h" | 44 | #include "servicesint.h" |
45 | 45 | ||
46 | #ifndef __ION_SYNC_H__ | 46 | #ifndef __EXTERNAL_SYNC_H__ |
47 | #define __ION_SYNC_H__ | 47 | #define __EXTERNAL_SYNC_H__ |
48 | 48 | ||
49 | typedef struct _PVRSRV_ION_SYNC_INFO_ { | 49 | typedef struct _PVRSRV_EXTERNAL_SYNC_INFO_ { |
50 | PVRSRV_KERNEL_SYNC_INFO *psSyncInfo; | 50 | PVRSRV_KERNEL_SYNC_INFO *psSyncInfo; |
51 | IMG_HANDLE hUnique; | 51 | IMG_HANDLE hUnique; |
52 | IMG_UINT32 ui32RefCount; | 52 | IMG_UINT32 ui32RefCount; |
53 | IMG_UINT64 ui64Stamp; | 53 | IMG_UINT64 ui64Stamp; |
54 | } PVRSRV_ION_SYNC_INFO; | 54 | } PVRSRV_EXTERNAL_SYNC_INFO; |
55 | 55 | ||
56 | PVRSRV_ERROR PVRSRVIonBufferSyncAcquire(IMG_HANDLE hUnique, | 56 | PVRSRV_ERROR PVRSRVExternalBufferSyncAcquire(IMG_HANDLE hUnique, |
57 | IMG_HANDLE hDevCookie, | 57 | IMG_HANDLE hDevCookie, |
58 | IMG_HANDLE hDevMemContext, | 58 | IMG_HANDLE hDevMemContext, |
59 | PVRSRV_ION_SYNC_INFO **ppsIonSyncInfo); | 59 | PVRSRV_EXTERNAL_SYNC_INFO **ppsExternalSyncInfo); |
60 | 60 | ||
61 | IMG_VOID PVRSRVIonBufferSyncRelease(PVRSRV_ION_SYNC_INFO *psIonSyncInfo); | 61 | IMG_VOID PVRSRVExternalBufferSyncRelease(PVRSRV_EXTERNAL_SYNC_INFO *psExternalSyncInfo); |
62 | 62 | ||
63 | static INLINE PVRSRV_KERNEL_SYNC_INFO *IonBufferSyncGetKernelSyncInfo(PVRSRV_ION_SYNC_INFO *psIonSyncInfo) | 63 | static INLINE PVRSRV_KERNEL_SYNC_INFO *ExternalBufferSyncGetKernelSyncInfo(PVRSRV_EXTERNAL_SYNC_INFO *psExternalSyncInfo) |
64 | { | 64 | { |
65 | return psIonSyncInfo->psSyncInfo; | 65 | return psExternalSyncInfo->psSyncInfo; |
66 | } | 66 | } |
67 | 67 | ||
68 | static INLINE IMG_UINT64 IonBufferSyncGetStamp(PVRSRV_ION_SYNC_INFO *psIonSyncInfo) | 68 | static INLINE IMG_UINT64 ExternalBufferSyncGetStamp(PVRSRV_EXTERNAL_SYNC_INFO *psExternalSyncInfo) |
69 | { | 69 | { |
70 | return psIonSyncInfo->ui64Stamp; | 70 | return psExternalSyncInfo->ui64Stamp; |
71 | } | 71 | } |
72 | 72 | ||
73 | #endif /* __ION_SYNC_H__ */ | 73 | #endif /* __EXTERNAL_SYNC_H__ */ |