MLK-13751 [7ULP1]A7 mem mode suspend can't be resumed by M4 through M4 image after...
authorYuchou Gan <yuchou.gan@nxp.com>
Mon, 16 Jan 2017 16:04:31 +0000 (00:04 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:58:21 +0000 (14:58 -0500)
This reverts commit a6553be76f8368442bd976f39a6bc28352c57f99 and run power on before power off in gpu_suspend.
This issue happened in x11 because x11 gpu has more complicated power management than fb. Revert the commit which imported this issue and fix the former MGS-2513 in another way.

Date: Jan 16, 2017
Signed-off-by: yuchou.gan <yuchou.gan@nxp.com>
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c

index 550cb08..bb20179 100644 (file)
@@ -1167,6 +1167,17 @@ static int gpu_suspend(struct platform_device *dev, pm_message_t state)
                 return -1;
             }
 
+#if gcdENABLE_VG
+            if (i == gcvCORE_VG)
+            {
+                status = gckVGHARDWARE_SetPowerManagementState(device->kernels[i]->vg->hardware, gcvPOWER_ON);
+            }
+            else
+#endif
+            {
+                status = gckHARDWARE_SetPowerManagementState(device->kernels[i]->hardware, gcvPOWER_ON);
+            }
+
 #if gcdENABLE_VG
             if (i == gcvCORE_VG)
             {
@@ -1227,7 +1238,7 @@ static int gpu_resume(struct platform_device *dev)
             switch(device->statesStored[i])
             {
             case gcvPOWER_OFF:
-                statesStored = gcvPOWER_OFF;
+                statesStored = gcvPOWER_OFF_BROADCAST;
                 break;
             case gcvPOWER_IDLE:
                 statesStored = gcvPOWER_IDLE_BROADCAST;