aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/pvr/buffer_manager.c
diff options
context:
space:
mode:
authorAlistair Strachan <alistair.strachan@imgtec.com>2011-11-30 17:56:30 +0000
committerAlistair Strachan <alistair.strachan@imgtec.com>2011-11-30 18:01:07 +0000
commit2942e153a093e4908da155a6f82db98346993892 (patch)
treeefe552041a23114d90d4c809345c68f1f32fabb2 /drivers/gpu/pvr/buffer_manager.c
parent56bc79d2860e8072a6472140604ce6581a148fcd (diff)
downloadkernel_samsung_crespo-2942e153a093e4908da155a6f82db98346993892.zip
kernel_samsung_crespo-2942e153a093e4908da155a6f82db98346993892.tar.gz
kernel_samsung_crespo-2942e153a093e4908da155a6f82db98346993892.tar.bz2
gpu: pvr: Update to DDK 1.8@782952
- Add reference count debugging feature to dump out the last 256 object reference count modifications. - Flush the CPU cache before 3D transfers or 2D core operations. Fixes glCopyTexSubImage2D() of SW-rendered EGLImage. Change-Id: I86cfb0623acad8f20c381eefacdece6fba738ea5
Diffstat (limited to 'drivers/gpu/pvr/buffer_manager.c')
-rw-r--r--drivers/gpu/pvr/buffer_manager.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/gpu/pvr/buffer_manager.c b/drivers/gpu/pvr/buffer_manager.c
index 8907e22..d58d19d 100644
--- a/drivers/gpu/pvr/buffer_manager.c
+++ b/drivers/gpu/pvr/buffer_manager.c
@@ -1408,7 +1408,7 @@ BM_Wrap ( IMG_HANDLE hDevMemHeap,
"BM_Wrap (Matched previous Wrap! uSize=0x%x, uOffset=0x%x, SysAddr=%08X)",
ui32Size, ui32Offset, sHashAddress.uiAddr));
- pBuf->ui32RefCount++;
+ PVRSRVBMBufIncRef(pBuf);
*phBuf = (BM_HANDLE)pBuf;
if(pui32Flags)
*pui32Flags = uFlags;
@@ -1477,7 +1477,7 @@ BM_Export (BM_HANDLE hBuf)
{
BM_BUF *pBuf = (BM_BUF *)hBuf;
- pBuf->ui32ExportCount++;
+ PVRSRVBMBufIncExport(pBuf);
}
IMG_VOID
@@ -1486,7 +1486,7 @@ BM_FreeExport(BM_HANDLE hBuf,
{
BM_BUF *pBuf = (BM_BUF *)hBuf;
- pBuf->ui32ExportCount--;
+ PVRSRVBMBufDecExport(pBuf);
FreeBuf (pBuf, ui32Flags, IMG_FALSE);
}
@@ -1509,8 +1509,7 @@ BM_Free (BM_HANDLE hBuf,
SysAcquireData(&psSysData);
- pBuf->ui32RefCount--;
-
+ PVRSRVBMBufDecRef(pBuf);
if(pBuf->ui32RefCount == 0)
{
if(pBuf->pMapping->eCpuMemoryOrigin == hm_wrapped || pBuf->pMapping->eCpuMemoryOrigin == hm_wrapped_virtaddr)
@@ -1881,7 +1880,7 @@ XProcWorkaroundAllocShareable(RA_ARENA *psArena,
*ppvCpuVAddr = gXProcWorkaroundShareData[gXProcWorkaroundShareIndex].pvCpuVAddr;
*phOSMemHandle = gXProcWorkaroundShareData[gXProcWorkaroundShareIndex].hOSMemHandle;
- gXProcWorkaroundShareData[gXProcWorkaroundShareIndex].ui32RefCount ++;
+ gXProcWorkaroundShareData[gXProcWorkaroundShareIndex].ui32RefCount++;
return PVRSRV_OK;
}
@@ -1954,7 +1953,7 @@ XProcWorkaroundAllocShareable(RA_ARENA *psArena,
*ppvCpuVAddr = gXProcWorkaroundShareData[gXProcWorkaroundShareIndex].pvCpuVAddr;
*phOSMemHandle = gXProcWorkaroundShareData[gXProcWorkaroundShareIndex].hOSMemHandle;
- gXProcWorkaroundShareData[gXProcWorkaroundShareIndex].ui32RefCount ++;
+ gXProcWorkaroundShareData[gXProcWorkaroundShareIndex].ui32RefCount++;
return PVRSRV_OK;
}
@@ -2006,7 +2005,7 @@ static IMG_VOID XProcWorkaroundFreeShareable(IMG_HANDLE hOSMemHandle)
return;
}
- gXProcWorkaroundShareData[ui32SI].ui32RefCount --;
+ gXProcWorkaroundShareData[ui32SI].ui32RefCount--;
PVR_DPF((PVR_DBG_VERBOSE, "Reduced refcount of SI[%d] from %d to %d",
ui32SI, gXProcWorkaroundShareData[ui32SI].ui32RefCount+1, gXProcWorkaroundShareData[ui32SI].ui32RefCount));