diff options
Diffstat (limited to 'drivers/gpu/pvr/power.c')
-rw-r--r-- | drivers/gpu/pvr/power.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/drivers/gpu/pvr/power.c b/drivers/gpu/pvr/power.c index ba0eced9ba1..ba203aba3c4 100644 --- a/drivers/gpu/pvr/power.c +++ b/drivers/gpu/pvr/power.c | |||
@@ -96,20 +96,14 @@ PVRSRV_ERROR PVRSRVPowerLock(IMG_UINT32 ui32CallerID, | |||
96 | SYS_DATA *psSysData; | 96 | SYS_DATA *psSysData; |
97 | IMG_UINT32 ui32Timeout = 1000000; | 97 | IMG_UINT32 ui32Timeout = 1000000; |
98 | 98 | ||
99 | #if defined(SUPPORT_LMA) | ||
100 | |||
101 | ui32Timeout *= 60; | ||
102 | #endif | ||
103 | |||
104 | SysAcquireData(&psSysData); | 99 | SysAcquireData(&psSysData); |
105 | 100 | ||
106 | #if defined(SYS_CUSTOM_POWERLOCK_WRAP) | 101 | eError = OSPowerLockWrap(); |
107 | eError = SysPowerLockWrap(psSysData); | ||
108 | if (eError != PVRSRV_OK) | 102 | if (eError != PVRSRV_OK) |
109 | { | 103 | { |
110 | return eError; | 104 | return eError; |
111 | } | 105 | } |
112 | #endif | 106 | |
113 | do | 107 | do |
114 | { | 108 | { |
115 | eError = OSLockResource(&psSysData->sPowerStateChangeResource, | 109 | eError = OSLockResource(&psSysData->sPowerStateChangeResource, |
@@ -130,12 +124,11 @@ PVRSRV_ERROR PVRSRVPowerLock(IMG_UINT32 ui32CallerID, | |||
130 | ui32Timeout--; | 124 | ui32Timeout--; |
131 | } while (ui32Timeout > 0); | 125 | } while (ui32Timeout > 0); |
132 | 126 | ||
133 | #if defined(SYS_CUSTOM_POWERLOCK_WRAP) | ||
134 | if (eError != PVRSRV_OK) | 127 | if (eError != PVRSRV_OK) |
135 | { | 128 | { |
136 | SysPowerLockUnwrap(psSysData); | 129 | OSPowerLockUnwrap(); |
137 | } | 130 | } |
138 | #endif | 131 | |
139 | 132 | ||
140 | if ((eError == PVRSRV_OK) && | 133 | if ((eError == PVRSRV_OK) && |
141 | !bSystemPowerEvent && | 134 | !bSystemPowerEvent && |
@@ -154,9 +147,7 @@ IMG_EXPORT | |||
154 | IMG_VOID PVRSRVPowerUnlock(IMG_UINT32 ui32CallerID) | 147 | IMG_VOID PVRSRVPowerUnlock(IMG_UINT32 ui32CallerID) |
155 | { | 148 | { |
156 | OSUnlockResource(&gpsSysData->sPowerStateChangeResource, ui32CallerID); | 149 | OSUnlockResource(&gpsSysData->sPowerStateChangeResource, ui32CallerID); |
157 | #if defined(SYS_CUSTOM_POWERLOCK_WRAP) | 150 | OSPowerLockUnwrap(); |
158 | SysPowerLockUnwrap(gpsSysData); | ||
159 | #endif | ||
160 | } | 151 | } |
161 | 152 | ||
162 | 153 | ||
@@ -560,7 +551,7 @@ PVRSRV_ERROR PVRSRVRegisterPowerDevice(IMG_UINT32 ui32DeviceIndex, | |||
560 | 551 | ||
561 | SysAcquireData(&psSysData); | 552 | SysAcquireData(&psSysData); |
562 | 553 | ||
563 | eError = OSAllocMem( PVRSRV_OS_PAGEABLE_HEAP, | 554 | eError = OSAllocMem( PVRSRV_OS_NON_PAGEABLE_HEAP, |
564 | sizeof(PVRSRV_POWER_DEV), | 555 | sizeof(PVRSRV_POWER_DEV), |
565 | (IMG_VOID **)&psPowerDevice, IMG_NULL, | 556 | (IMG_VOID **)&psPowerDevice, IMG_NULL, |
566 | "Power Device"); | 557 | "Power Device"); |