MGS-6197 [#imx-2532] GPU crash when changing gpu_govern mode
authorNicușor Cîțu <nicusor.citu@nxp.com>
Wed, 14 Apr 2021 13:15:02 +0000 (16:15 +0300)
committerNicușor Cîțu <nicusor.citu@nxp.com>
Wed, 12 May 2021 11:27:19 +0000 (14:27 +0300)
No need to power on during suspend.
1. If the GPU core is already on, then no change performed.
2. If the GPU core is already in idle/suspend/power_off it means the
   Stall has already been done.
   No need to power it on again and put into idle state again.
3. If the GPU core is in idle and we want to put into suspend or
   power_off, that will be handled inside the
   gckHARDWARE_SetPowerState().

Signed-off-by: Nicușor Cîțu <nicusor.citu@nxp.com>
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_device.c

index ebbc31d..2a39b07 100644 (file)
@@ -3011,18 +3011,6 @@ gckGALDEVICE_Suspend(
         /* Store state. */
         Device->statesStored[i] = currentState;
 
-        /* Pull up power to flush GPU command buffer before suspending. */
-#if gcdENABLE_VG
-        if (i == gcvCORE_VG)
-        {
-            gcmkONERROR(gckVGHARDWARE_SetPowerState(hardware, gcvPOWER_ON));
-        }
-        else
-#endif
-        {
-            gcmkONERROR(gckHARDWARE_SetPowerState(hardware, gcvPOWER_ON));
-        }
-
 #if gcdENABLE_VG
         if (i == gcvCORE_VG)
         {