diff options
author | Xianzhong <xianzhong.li@nxp.com> | 2018-08-09 19:48:41 +0800 |
---|---|---|
committer | Jason Liu <jason.hui.liu@nxp.com> | 2019-02-12 10:33:08 +0800 |
commit | 5797a70f413476f92af63a7956f0b07600bfb7b8 (patch) | |
tree | 0069db338abeddad635d679f4b864f9f14d83e39 /drivers/mxc/gpu-viv/hal/os/linux | |
parent | 78ee4a77f2f4a3c11b37807831b1321259ebc440 (diff) |
MGS-4125 [#imx-320] fix 6sx suspend/resume stuck issue
6sx gpu need reserve command to flush cache before power-off,
there is no way to perform force sync in power broadcast mode.
command buffer will be exhausted with repeat suspend/resume,
need pull up power to flush command buffer before suspend.
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
Diffstat (limited to 'drivers/mxc/gpu-viv/hal/os/linux')
-rw-r--r-- | drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c | 17 |
1 files changed, 17 insertions, 0 deletions
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 b76b11882f3f..4e0c419652a4 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 @@ -1067,6 +1067,23 @@ static int gpu_suspend(struct platform_device *dev, pm_message_t state) return -1; } + /* need pull up power to flush gpu command buffer before suspend */ +#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 (gcmIS_ERROR(status)) + { + return -1; + } + #if gcdENABLE_VG if (i == gcvCORE_VG) { |