MGS-6197 [#imx-2532] GPU crash when changing gpu_govern mode
authorNicușor Cîțu <nicusor.citu@nxp.com>
Thu, 15 Apr 2021 06:59:26 +0000 (09:59 +0300)
committerNicușor Cîțu <nicusor.citu@nxp.com>
Wed, 12 May 2021 11:27:22 +0000 (14:27 +0300)
Put GPU into suspend instead of idle. Suspend will also disable internal clocks.

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

index 7e941f5..338ebb5 100644 (file)
@@ -1416,7 +1416,7 @@ static int gpu_suspend(struct platform_device *dev, pm_message_t state)
 
     sem_acquired = gcvTRUE;
 
-    /* Suspend the GPU to off state. */
+    /* Power off the GPU. */
     gcmkONERROR(gckGALDEVICE_Suspend(device, gcvPOWER_OFF));
 
     return 0;
index 924691e..cc2b368 100644 (file)
@@ -581,8 +581,8 @@ static ssize_t gpu_govern_store(struct device_driver *dev, const char *buf, size
 
     sem_acquired = gcvTRUE;
 
-    /* Suspend the GPU to idle state. */
-    gcmkONERROR(gckGALDEVICE_Suspend(device, gcvPOWER_IDLE));
+    /* Suspend the GPU. */
+    gcmkONERROR(gckGALDEVICE_Suspend(device, gcvPOWER_SUSPEND));
 
     core_freq   = priv->imx_gpu_govern.core_clk_freq[i];
     shader_freq = priv->imx_gpu_govern.shader_clk_freq[i];