diff options
author | Vishal Mahaveer <vishalm@ti.com> | 2015-08-28 15:10:30 -0500 |
---|---|---|
committer | Vishal Mahaveer <vishalm@ti.com> | 2015-08-28 15:10:30 -0500 |
commit | 29bd91158e93bcde70c194be4dacc4af2c01c04c (patch) | |
tree | 7237d41755545593f066a215ae84641e7541d113 | |
parent | 07ee34f5be2623f08e9044db08e523a7d04b73b6 (diff) | |
download | proprietary-open-jacinto-29bd91158e93bcde70c194be4dacc4af2c01c04c.tar.gz |
jacinto6: sgx-bin: sgx binaries and KM source update
Updating SGX binaries and Kernel module source of the latest DDK source.
Change-Id: Ib9f973a961b6d8dd78e98c2617270016399bc49e
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
-rw-r--r-- | jacinto6/README.SGX | 2 | ||||
-rw-r--r-- | jacinto6/sgx.tgz | bin | 2706286 -> 2706542 bytes | |||
-rw-r--r-- | jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/dmabuf.c | 30 |
3 files changed, 29 insertions, 3 deletions
diff --git a/jacinto6/README.SGX b/jacinto6/README.SGX index 139d90c..e850111 100644 --- a/jacinto6/README.SGX +++ b/jacinto6/README.SGX @@ -16,7 +16,7 @@ sgx.tgz a set of binaries built for SGX544. [DDK Version] 1.12/2917986 [DDK commit ID] - b26ac90 SGX-UM: EGL server wait fix. + 78cec7b sgx-km: check for dma_buf errors while importing them. [Branch] android/1.12/2917986_k3.14_L_gem [Kernel modules built against] diff --git a/jacinto6/sgx.tgz b/jacinto6/sgx.tgz Binary files differindex 2efbfc8..29e29af 100644 --- a/jacinto6/sgx.tgz +++ b/jacinto6/sgx.tgz 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 index 29c7d5d..4b9023e 100644 --- a/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/dmabuf.c +++ b/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/dmabuf.c @@ -110,18 +110,44 @@ PVRSRV_ERROR DmabufImportBufferAndAcquirePhysAddr(IMG_UINT32 ui32NumFDs, { int fd = (int)pai32BufferFDs[i]; + /* connect to the buffer */ psImportData->apsDmaBuf[i] = dma_buf_get(fd); - if (psImportData->apsDmaBuf[i] == IMG_NULL) + if (IS_ERR_OR_NULL(psImportData->apsDmaBuf[i])) { + dev_err(&gpsPVRLDMDev->dev, + "dma_buf_get() returned bad dma_buf handle\n"); eError = PVRSRV_ERROR_BAD_MAPPING; goto exitFailImport; } psImportData->apsDmaBufAttachment[i] = dma_buf_attach(psImportData->apsDmaBuf[i], &gpsPVRLDMDev->dev); - + if (IS_ERR_OR_NULL(psImportData->apsDmaBufAttachment[i])) + { + dev_err(&gpsPVRLDMDev->dev, + "dma_buf_attach() returned bad attachment struct\n"); + eError = PVRSRV_ERROR_BAD_MAPPING; + goto exitFailImport; + } + + /* requesting access to the buffer */ psImportData->apsSgTable[i] = dma_buf_map_attachment(psImportData->apsDmaBufAttachment[i], DMA_BIDIRECTIONAL); + if (IS_ERR_OR_NULL(psImportData->apsSgTable[i])) + { + dev_err(&gpsPVRLDMDev->dev, + "dma_buf_map_attachment returned stale sgtable: %d\n", + (int)psImportData->apsSgTable[i]); +#if defined(DEBUG) + /* lets dump the stack trace here */ + WARN_ON(true); + /* TODO: print all the current omap bo info */ +#endif + dma_buf_detach(psImportData->apsDmaBuf[i], + psImportData->apsDmaBufAttachment[i]); + eError = PVRSRV_ERROR_OUT_OF_MEMORY; + goto exitFailImport; + } psScatterList[i] = psImportData->apsSgTable[i]->sgl; if (psScatterList[i] == NULL) |