static PVRSRV_ERROR PVRSRVFinaliseSystem_CompatCheck_AnyCb(PVRSRV_DEVICE_NODE *psDeviceNode)
{
	PVRSRV_ERROR eError;
	eError = PVRSRVDevInitCompatCheck(psDeviceNode);
	if (eError != PVRSRV_OK)
	{
		PVR_DPF((PVR_DBG_ERROR,"PVRSRVFinaliseSystem: Failed PVRSRVDevInitCompatCheck call (device index: %d)", psDeviceNode->sDevId.ui32DeviceIndex));
	}
	return eError;
}
예제 #2
0
enum PVRSRV_ERROR PVRSRVFinaliseSystem(IMG_BOOL bInitSuccessful)
{
	struct PVRSRV_DEVICE_NODE *psDeviceNode;
	struct SYS_DATA *psSysData;
	enum PVRSRV_ERROR eError;

	PVR_DPF(PVR_DBG_MESSAGE, "PVRSRVFinaliseSystem");

	eError = SysAcquireData(&psSysData);
	if (eError != PVRSRV_OK) {
		PVR_DPF(PVR_DBG_ERROR,
			 "PVRSRVFinaliseSystem: Failed to get SysData");
		return eError;
	}

	if (bInitSuccessful) {
		eError = SysFinalise();
		if (eError != PVRSRV_OK) {
			PVR_DPF(PVR_DBG_ERROR,
				"PVRSRVFinaliseSystem: SysFinalise failed (%d)",
				 eError);
			return eError;
		}

		psDeviceNode = psSysData->psDeviceNodeList;
		while (psDeviceNode) {
			eError =
			    PVRSRVSetDevicePowerStateKM(psDeviceNode->sDevId.
						ui32DeviceIndex,
						PVRSRV_POWER_Unspecified,
						KERNEL_ID, IMG_FALSE);
			if (eError != PVRSRV_OK)
				PVR_DPF(PVR_DBG_ERROR, "PVRSRVFinaliseSystem: "
					"Failed PVRSRVSetDevicePowerStateKM "
					"call (device index: %d)",
				 psDeviceNode->sDevId.ui32DeviceIndex);
			psDeviceNode = psDeviceNode->psNext;
		}

		psDeviceNode = psSysData->psDeviceNodeList;
		while (psDeviceNode) {
			if (psDeviceNode->pfnInitDeviceCompatCheck) {
				eError = PVRSRVDevInitCompatCheck(psDeviceNode);
				if (eError != PVRSRV_OK) {
					PVR_DPF(PVR_DBG_ERROR,
					"PVRSRVFinaliseSystem: "
					"Failed PVRSRVDevInitCompatCheck "
					"call (device index: %d)",
						 psDeviceNode->sDevId.
						 ui32DeviceIndex);
					return eError;
				}
			}
			psDeviceNode = psDeviceNode->psNext;

		}

	}

	return PVRSRV_OK;
}