aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/pvr/sgx/sgxinit.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/pvr/sgx/sgxinit.c')
-rw-r--r--drivers/gpu/pvr/sgx/sgxinit.c27
1 files changed, 22 insertions, 5 deletions
diff --git a/drivers/gpu/pvr/sgx/sgxinit.c b/drivers/gpu/pvr/sgx/sgxinit.c
index 66bfae5..fc98227 100644
--- a/drivers/gpu/pvr/sgx/sgxinit.c
+++ b/drivers/gpu/pvr/sgx/sgxinit.c
@@ -1222,11 +1222,13 @@ IMG_VOID SGXOSTimer(IMG_VOID *pvData)
PVRSRV_SGXDEV_INFO *psDevInfo = psDeviceNode->pvDevice;
static IMG_UINT32 ui32EDMTasks = 0;
static IMG_UINT32 ui32LockupCounter = 0;
+ static IMG_UINT32 ui32OpenCLDelayCounter = 0;
static IMG_UINT32 ui32NumResets = 0;
#if defined(FIX_HW_BRN_31093)
static IMG_BOOL bBRN31093Inval = IMG_FALSE;
#endif
IMG_UINT32 ui32CurrentEDMTasks;
+ IMG_UINT32 ui32CurrentOpenCLDelayCounter=0;
IMG_BOOL bLockup = IMG_FALSE;
IMG_BOOL bPoweredDown;
@@ -1263,14 +1265,26 @@ IMG_VOID SGXOSTimer(IMG_VOID *pvData)
if (ui32LockupCounter == 3)
{
ui32LockupCounter = 0;
-
+ ui32CurrentOpenCLDelayCounter = (psDevInfo->psSGXHostCtl)->ui32OpenCLDelayCount;
+ if(0 != ui32CurrentOpenCLDelayCounter)
+ {
+ if(ui32OpenCLDelayCounter != ui32CurrentOpenCLDelayCounter){
+ ui32OpenCLDelayCounter = ui32CurrentOpenCLDelayCounter;
+ }else{
+ ui32OpenCLDelayCounter -= 1;
+ (psDevInfo->psSGXHostCtl)->ui32OpenCLDelayCount = ui32OpenCLDelayCounter;
+ }
+ goto SGX_NoUKernel_LockUp;
+ }
+
+
#if defined(FIX_HW_BRN_31093)
if (bBRN31093Inval == IMG_FALSE)
{
#if defined(FIX_HW_BRN_29997)
IMG_UINT32 ui32BIFCtrl;
-
+
ui32BIFCtrl = OSReadHWReg(psDevInfo->pvRegsBaseKM, EUR_CR_BIF_CTRL);
OSWriteHWReg(psDevInfo->pvRegsBaseKM, EUR_CR_BIF_CTRL, ui32BIFCtrl | EUR_CR_BIF_CTRL_PAUSE_MASK);
@@ -1291,12 +1305,13 @@ IMG_VOID SGXOSTimer(IMG_VOID *pvData)
else
#endif
{
- PVR_DPF((PVR_DBG_ERROR, "SGXOSTimer() detected SGX lockup (0x%x tasks)", ui32EDMTasks));
+ PVR_DPF((PVR_DBG_ERROR, "SGXOSTimer() detected SGX lockup (0x%x tasks)", ui32EDMTasks));
- bLockup = IMG_TRUE;
+ bLockup = IMG_TRUE;
+ (psDevInfo->psSGXHostCtl)->ui32OpenCLDelayCount = 0;
+ }
}
}
- }
else
{
#if defined(FIX_HW_BRN_31093)
@@ -1307,6 +1322,7 @@ IMG_VOID SGXOSTimer(IMG_VOID *pvData)
ui32NumResets = psDevInfo->ui32NumResets;
}
}
+SGX_NoUKernel_LockUp:
if (bLockup)
{
@@ -1322,6 +1338,7 @@ IMG_VOID SGXOSTimer(IMG_VOID *pvData)
#endif
+
#if defined(SYS_USING_INTERRUPTS)
IMG_BOOL SGX_ISRHandler (IMG_VOID *pvData)