aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/ice4100/sgx535/system/sgx_intel_ce/graphics_pm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/ice4100/sgx535/system/sgx_intel_ce/graphics_pm.c')
-rwxr-xr-xdrivers/staging/ice4100/sgx535/system/sgx_intel_ce/graphics_pm.c38
1 files changed, 34 insertions, 4 deletions
diff --git a/drivers/staging/ice4100/sgx535/system/sgx_intel_ce/graphics_pm.c b/drivers/staging/ice4100/sgx535/system/sgx_intel_ce/graphics_pm.c
index 6a98217b4a0..e1836177685 100755
--- a/drivers/staging/ice4100/sgx535/system/sgx_intel_ce/graphics_pm.c
+++ b/drivers/staging/ice4100/sgx535/system/sgx_intel_ce/graphics_pm.c
@@ -85,6 +85,20 @@ static int graphics_pm_suspend(struct pci_dev *dev, pm_message_t state)
rc = GRAPHICS_PM_ERR_FAILED;
}
+ if(GRAPHICS_PM_OK == rc)
+ {
+ icepm_ret_t icepm_rc = ICEPM_OK;
+ icepm_rc = icepm_set_power_state(GRAPHICS_PM_COMPONENT_NAME,
+ ICEPM_D3);
+ if(ICEPM_OK != icepm_rc)
+ {
+ GRAPHICS_PM_DEBUG_PRINT ("graphics_pm_suspend: icepm_set_power_state %d\n",icepm_rc);
+ rc = GRAPHICS_PM_ERR_FAILED;
+ // Ignore error from icepm_set_power_state
+ rc = GRAPHICS_PM_OK;
+ }
+ }
+
if (GRAPHICS_PM_OK == rc) {
graphics_pm_state = GRAPHICS_PM_STATE_SUSPENDED;
}
@@ -114,9 +128,25 @@ static int graphics_pm_resume(struct pci_dev *dev)
if (GRAPHICS_PM_STATE_UNINITIALIZED != graphics_pm_state) {
os_sema_get(&graphics_pm_semaphore);
if (GRAPHICS_PM_STATE_SUSPENDED == graphics_pm_state) {
- if (PVRSRVSetPowerStateKM(PVRSRV_SYS_POWER_STATE_D0) !=
- PVRSRV_OK) {
- rc = GRAPHICS_PM_ERR_FAILED;
+ {
+ icepm_ret_t icepm_rc = ICEPM_OK;
+ icepm_rc = icepm_set_power_state(GRAPHICS_PM_COMPONENT_NAME,.
+ ICEPM_D0);
+ if(ICEPM_OK != icepm_rc)
+ {
+ GRAPHICS_PM_DEBUG_PRINT ("graphics_pm_resume: icepm_set_power_state %d\n",icepm_rc);
+ rc = GRAPHICS_PM_ERR_FAILED;
+ // Ignore error from icepm_set_power_state
+ rc = GRAPHICS_PM_OK;
+ }
+ }
+
+ if(GRAPHICS_PM_OK == rc).
+ {
+ if(PVRSRVSetPowerStateKM(PVRSRV_SYS_POWER_STATE_D0) != PVRSRV_OK)
+ {
+ rc = GRAPHICS_PM_ERR_FAILED;
+ }
}
if (GRAPHICS_PM_OK == rc) {
@@ -134,7 +164,7 @@ static int graphics_pm_resume(struct pci_dev *dev)
ret_val = -EBUSY;
}
- GRAPHICS_PM_DEBUG_PRINT("graphics_pm_resume: Goodbye\n");
+ GRAPHICS_PM_DEBUG_PRINT ("graphics_pm_resume: Goodbye %d\n", ret_val);
return ret_val;
}