/* PVRSRVHWOpTimeoutKM */ PVRSRV_ERROR PVRSRVHWOpTimeoutKM(IMG_VOID) { #if defined(PVRSRV_RESET_ON_HWTIMEOUT) PVR_LOG(("User requested OS reset")); OSPanic(); #endif PVR_LOG(("HW operation timeout, dump server info")); PVRSRVDebugRequest(DEBUG_REQUEST_VERBOSITY_LOW,IMG_NULL); return PVRSRV_OK; }
/* PVRSRVDumpDebugInfoKM */ PVRSRV_ERROR PVRSRVDumpDebugInfoKM(IMG_UINT32 ui32VerbLevel) { if (ui32VerbLevel > DEBUG_REQUEST_VERBOSITY_MAX) { return PVRSRV_ERROR_INVALID_PARAMS; } PVR_LOG(("User requested PVR debug info")); PVRSRVDebugRequest(ui32VerbLevel, IMG_NULL); return PVRSRV_OK; }
/*! ****************************************************************************** @Function PVRSRVSetPowerStateKM @Description Set the system into a new state @Input eNewPowerState : @Input bForced : TRUE if the transition should not fail (e.g. OS request) @Return PVRSRV_ERROR ******************************************************************************/ IMG_EXPORT PVRSRV_ERROR PVRSRVSetPowerStateKM(PVRSRV_SYS_POWER_STATE eNewSysPowerState, IMG_BOOL bForced) { PVRSRV_ERROR eError; PVRSRV_DATA *psPVRSRVData = PVRSRVGetPVRSRVData(); IMG_UINT uiStage = 0; PVRSRV_DEV_POWER_STATE eNewDevicePowerState = _IsSystemStatePowered(eNewSysPowerState)? PVRSRV_DEV_POWER_STATE_DEFAULT : PVRSRV_DEV_POWER_STATE_OFF; /* require a proper power state */ if (eNewSysPowerState == PVRSRV_SYS_POWER_STATE_Unspecified) { return PVRSRV_ERROR_INVALID_PARAMS; } /* no power transition requested, so do nothing */ if (eNewSysPowerState == psPVRSRVData->eCurrentPowerState) { return PVRSRV_OK; } /* Prevent simultaneous SetPowerStateKM calls */ PVRSRVForcedPowerLock(); /* Perform pre transitions: first device and then sys layer */ eError = PVRSRVDevicePrePowerStateKM(IMG_TRUE, 0, eNewDevicePowerState, bForced); if (eError != PVRSRV_OK) { uiStage++; goto ErrorExit; } eError = PVRSRVSysPrePowerState(eNewSysPowerState, bForced); if (eError != PVRSRV_OK) { uiStage++; goto ErrorExit; } /* Perform system-specific post power transitions: first sys layer and then device */ eError = PVRSRVSysPostPowerState(eNewSysPowerState, bForced); if (eError != PVRSRV_OK) { uiStage++; goto ErrorExit; } eError = PVRSRVDevicePostPowerStateKM(IMG_TRUE, 0, eNewDevicePowerState, bForced); if (eError != PVRSRV_OK) { uiStage++; goto ErrorExit; } psPVRSRVData->eCurrentPowerState = eNewSysPowerState; psPVRSRVData->eFailedPowerState = PVRSRV_SYS_POWER_STATE_Unspecified; PVRSRVPowerUnlock(); /* Reprocess the devices' queues in case commands were blocked during the power transition. */ if (_IsSystemStatePowered(eNewSysPowerState) && PVRSRVGetInitServerState(PVRSRV_INIT_SERVER_SUCCESSFUL)) { PVRSRVCheckStatus(IMG_NULL); } return PVRSRV_OK; ErrorExit: /* save the power state for the re-attempt */ psPVRSRVData->eFailedPowerState = eNewSysPowerState; PVRSRVPowerUnlock(); PVR_DPF((PVR_DBG_ERROR, "PVRSRVSetPowerStateKM: Transition from %d to %d FAILED (%s) at stage %d, forced: %d. Dumping debug info.", psPVRSRVData->eCurrentPowerState, eNewSysPowerState, PVRSRVGetErrorStringKM(eError), uiStage, bForced)); PVRSRVDebugRequest(DEBUG_REQUEST_VERBOSITY_MAX); return eError; }