/************************************************************************** * Function Name : PDumpClearMMUContext * Inputs : * Outputs : None * Returns : PVRSRV_ERROR * Description : Clear MMU Context **************************************************************************/ PVRSRV_ERROR PDumpMMUFreeMMUContext(const IMG_CHAR *pszPDumpMemSpaceName, IMG_UINT32 ui32MMUContextID) { PVRSRV_ERROR eErr; PDUMP_GET_SCRIPT_STRING(); eErr = PDumpOSBufprintf(hScript, ui32MaxLen, "-- Clear MMU Context for memory space %s", pszPDumpMemSpaceName); if(eErr != PVRSRV_OK) { goto ErrOut; } PDUMP_LOCK(); PDumpOSWriteString2(hScript, PDUMP_FLAGS_CONTINUOUS); eErr = PDumpOSBufprintf(hScript, ui32MaxLen, "MMU :%s:v%d", pszPDumpMemSpaceName, ui32MMUContextID); if(eErr != PVRSRV_OK) { goto ErrUnlock; } PDumpOSWriteString2(hScript, PDUMP_FLAGS_CONTINUOUS); eErr = _PdumpFreeMMUContext(ui32MMUContextID); if(eErr != PVRSRV_OK) { PVR_DPF((PVR_DBG_ERROR, "PDumpClearMMUContext: _PdumpFreeMMUContext failed: %d", eErr)); goto ErrUnlock; } ErrUnlock: PDUMP_UNLOCK(); ErrOut: return eErr; }
PVRSRV_ERROR PDumpClearMMUContext(PVRSRV_DEVICE_TYPE eDeviceType, char *pszMemSpace, u32 ui32MMUContextID, u32 ui32MMUType) { PVRSRV_ERROR eError; PDumpComment("Clear MMU Context for memory space %s\r\n", pszMemSpace); PDumpComment("MMU :%s:v%d %d\r\n", pszMemSpace, ui32MMUContextID, ui32MMUType); eError = _PdumpFreeMMUContext(ui32MMUContextID); if (eError != PVRSRV_OK) { PVR_DPF((PVR_DBG_ERROR, "PDumpClearMMUContext: _PdumpFreeMMUContext failed: %d", eError)); return eError; } return PVRSRV_OK; }