From: Nicușor Cîțu Date: Thu, 15 Apr 2021 06:59:26 +0000 (+0300) Subject: MGS-6197 [#imx-2532] GPU crash when changing gpu_govern mode X-Git-Tag: rel_imx_5.10.35_2.0.0-somdevices.0~83 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=68407e8f621548a25914112355799a6f864a1c2a;p=linux.git MGS-6197 [#imx-2532] GPU crash when changing gpu_govern mode Put GPU into suspend instead of idle. Suspend will also disable internal clocks. Signed-off-by: Nicușor Cîțu --- diff --git a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c index 7e941f54eb8a..338ebb5b0a58 100644 --- a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c +++ b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c @@ -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; diff --git a/drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx.c b/drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx.c index 924691ef047c..cc2b368e6e13 100644 --- a/drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx.c +++ b/drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx.c @@ -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];