diff options
Diffstat (limited to 'jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/ion.c')
-rw-r--r-- | jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/ion.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/ion.c b/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/ion.c index e84fdc4..5cb1521 100644 --- a/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/ion.c +++ b/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/ion.c | |||
@@ -254,7 +254,7 @@ PVRSRV_ERROR IonImportBufferAndAquirePhysAddr(IMG_HANDLE hIonDev, | |||
254 | { | 254 | { |
255 | struct ion_client *psIonClient = hIonDev; | 255 | struct ion_client *psIonClient = hIonDev; |
256 | struct ion_handle *psIonHandle; | 256 | struct ion_handle *psIonHandle; |
257 | struct scatterlist *psScatterList; | 257 | struct sg_table *psSgTable; |
258 | struct scatterlist *psTemp; | 258 | struct scatterlist *psTemp; |
259 | IMG_SYS_PHYADDR *pasSysPhysAddr = NULL; | 259 | IMG_SYS_PHYADDR *pasSysPhysAddr = NULL; |
260 | ION_IMPORT_DATA *psImportData; | 260 | ION_IMPORT_DATA *psImportData; |
@@ -282,8 +282,8 @@ PVRSRV_ERROR IonImportBufferAndAquirePhysAddr(IMG_HANDLE hIonDev, | |||
282 | psImportData->psIonClient = psIonClient; | 282 | psImportData->psIonClient = psIonClient; |
283 | psImportData->psIonHandle = psIonHandle; | 283 | psImportData->psIonHandle = psIonHandle; |
284 | 284 | ||
285 | psScatterList = ion_map_dma(psIonClient, psIonHandle); | 285 | psSgTable = ion_sg_table(psIonClient, psIonHandle); |
286 | if (psScatterList == NULL) | 286 | if (psSgTable == NULL) |
287 | { | 287 | { |
288 | eError = PVRSRV_ERROR_INVALID_PARAMS; | 288 | eError = PVRSRV_ERROR_INVALID_PARAMS; |
289 | goto exitFailMap; | 289 | goto exitFailMap; |
@@ -295,7 +295,7 @@ PVRSRV_ERROR IonImportBufferAndAquirePhysAddr(IMG_HANDLE hIonDev, | |||
295 | */ | 295 | */ |
296 | for (i=0;i<2;i++) | 296 | for (i=0;i<2;i++) |
297 | { | 297 | { |
298 | psTemp = psScatterList; | 298 | psTemp = psSgTable->sgl; |
299 | if (i == 1) | 299 | if (i == 1) |
300 | { | 300 | { |
301 | pasSysPhysAddr = kmalloc(sizeof(IMG_SYS_PHYADDR) * ui32PageCount, GFP_KERNEL); | 301 | pasSysPhysAddr = kmalloc(sizeof(IMG_SYS_PHYADDR) * ui32PageCount, GFP_KERNEL); |
@@ -339,7 +339,6 @@ PVRSRV_ERROR IonImportBufferAndAquirePhysAddr(IMG_HANDLE hIonDev, | |||
339 | return PVRSRV_OK; | 339 | return PVRSRV_OK; |
340 | 340 | ||
341 | exitFailAlloc: | 341 | exitFailAlloc: |
342 | ion_unmap_dma(psIonClient, psIonHandle); | ||
343 | exitFailMap: | 342 | exitFailMap: |
344 | ion_free(psIonClient, psIonHandle); | 343 | ion_free(psIonClient, psIonHandle); |
345 | exitFailImport: | 344 | exitFailImport: |
@@ -352,7 +351,6 @@ IMG_VOID IonUnimportBufferAndReleasePhysAddr(IMG_HANDLE hPriv) | |||
352 | { | 351 | { |
353 | ION_IMPORT_DATA *psImportData = hPriv; | 352 | ION_IMPORT_DATA *psImportData = hPriv; |
354 | 353 | ||
355 | ion_unmap_dma(psImportData->psIonClient, psImportData->psIonHandle); | ||
356 | if (psImportData->pvKernAddr) | 354 | if (psImportData->pvKernAddr) |
357 | { | 355 | { |
358 | ion_unmap_kernel(psImportData->psIonClient, psImportData->psIonHandle); | 356 | ion_unmap_kernel(psImportData->psIonClient, psImportData->psIonHandle); |