From: Nicușor Cîțu Date: Wed, 14 Apr 2021 13:15:02 +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~85 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=e74e3e11415ff4e300b41d2766c5198fee293312;p=linux.git MGS-6197 [#imx-2532] GPU crash when changing gpu_govern mode 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 --- diff --git a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_device.c b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_device.c index ebbc31d393ce..2a39b0770965 100644 --- a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_device.c +++ b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_device.c @@ -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) {