示例#1
0
IMG_VOID RGXCheckFaultAddress(PVRSRV_RGXDEV_INFO *psDevInfo, IMG_DEV_VIRTADDR *psDevVAddr, IMG_DEV_PHYADDR *psDevPAddr)
{
	RGX_FAULT_DATA sFaultData;
	IMG_DEV_PHYADDR sPCDevPAddr;

	sFaultData.psDevVAddr = psDevVAddr;
	sFaultData.psDevPAddr = psDevPAddr;

	OSWRLockAcquireRead(psDevInfo->hMemoryCtxListLock);

	dllist_foreach_node(&psDevInfo->sMemoryContextList,
						_RGXCheckFaultAddress,
						&sFaultData);

	/* Lastly check for fault in the kernel allocated memory */
	if (MMU_AcquireBaseAddr(psDevInfo->psKernelMMUCtx, &sPCDevPAddr) != PVRSRV_OK)
	{
		PVR_LOG(("Failed to get PC address for kernel memory context"));
	}

	if (sFaultData.psDevPAddr->uiAddr == sPCDevPAddr.uiAddr)
	{
		MMU_CheckFaultAddress(psDevInfo->psKernelMMUCtx, psDevVAddr);
	}

	OSWRLockReleaseRead(psDevInfo->hMemoryCtxListLock);
}
示例#2
0
IMG_VOID CheckForStalledComputeCtxt(PVRSRV_RGXDEV_INFO *psDevInfo,
									DUMPDEBUG_PRINTF_FUNC *pfnDumpDebugPrintf)
{
	OSWRLockAcquireRead(psDevInfo->hComputeCtxListLock, DEVINFO_COMPUTELIST);
	dllist_foreach_node(&(psDevInfo->sComputeCtxtListHead),
						CheckForStalledComputeCtxtCommand, pfnDumpDebugPrintf);
	OSWRLockReleaseRead(psDevInfo->hComputeCtxListLock);
}
IMG_BOOL CheckForStalledClientComputeCtxt(PVRSRV_RGXDEV_INFO *psDevInfo)
{
	PVRSRV_ERROR eError = PVRSRV_OK;
	OSWRLockAcquireRead(psDevInfo->hComputeCtxListLock, DEVINFO_COMPUTELIST);
	dllist_foreach_node(&(psDevInfo->sComputeCtxtListHead), 
						CheckForStalledClientComputeCtxtCommand, &eError);
	OSWRLockReleaseRead(psDevInfo->hComputeCtxListLock);
	return (PVRSRV_ERROR_CCCB_STALLED == eError)? IMG_TRUE: IMG_FALSE;
}