aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/pvr/resman.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/pvr/resman.c')
-rw-r--r--drivers/gpu/pvr/resman.c30
1 files changed, 22 insertions, 8 deletions
diff --git a/drivers/gpu/pvr/resman.c b/drivers/gpu/pvr/resman.c
index 5088c7f..8eddf77 100644
--- a/drivers/gpu/pvr/resman.c
+++ b/drivers/gpu/pvr/resman.c
@@ -598,17 +598,13 @@ static PVRSRV_ERROR FreeResourceByPtr(RESMAN_ITEM *psItem,
(IMG_UINTPTR_T)psItem->pfnFreeResource, psItem->ui32Flags));
- List_RESMAN_ITEM_Remove(psItem);
-
-
-
RELEASE_SYNC_OBJ;
if (bExecuteCallback)
{
eError = psItem->pfnFreeResource(psItem->pvParam, psItem->ui32Param, bForceCleanup);
- if (eError != PVRSRV_OK)
+ if ((eError != PVRSRV_OK) && (eError != PVRSRV_ERROR_RETRY))
{
PVR_DPF((PVR_DBG_ERROR, "FreeResourceByPtr: ERROR calling FreeResource function"));
}
@@ -617,8 +613,14 @@ static PVRSRV_ERROR FreeResourceByPtr(RESMAN_ITEM *psItem,
ACQUIRE_SYNC_OBJ;
-
- OSFreeMem(PVRSRV_OS_PAGEABLE_HEAP, sizeof(RESMAN_ITEM), psItem, IMG_NULL);
+ if (eError != PVRSRV_ERROR_RETRY)
+ {
+
+ List_RESMAN_ITEM_Remove(psItem);
+
+
+ OSFreeMem(PVRSRV_OS_PAGEABLE_HEAP, sizeof(RESMAN_ITEM), psItem, IMG_NULL);
+ }
return(eError);
}
@@ -679,7 +681,19 @@ static PVRSRV_ERROR FreeResourceByCriteria(PRESMAN_CONTEXT psResManContext,
ui32Param)) != IMG_NULL
&& eError == PVRSRV_OK)
{
- eError = FreeResourceByPtr(psCurItem, bExecuteCallback, CLEANUP_WITH_POLL);
+ do
+ {
+ eError = FreeResourceByPtr(psCurItem, bExecuteCallback, CLEANUP_WITH_POLL);
+ if (eError == PVRSRV_ERROR_RETRY)
+ {
+ RELEASE_SYNC_OBJ;
+ OSReleaseBridgeLock();
+
+ OSSleepms(MAX_CLEANUP_TIME_WAIT_US/1000);
+ OSReacquireBridgeLock();
+ ACQUIRE_SYNC_OBJ;
+ }
+ } while (eError == PVRSRV_ERROR_RETRY);
}
return eError;