summaryrefslogtreecommitdiff
path: root/drivers/mxc/gpu-viv
diff options
context:
space:
mode:
authorXianzhong <xianzhong.li@nxp.com>2017-08-03 19:01:31 +0800
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:41:33 +0300
commita4d1c682968495a2a479255a3c354ef1cf21ff17 (patch)
tree0ee06fce95d3844142ce40d9a70c6252a248773a /drivers/mxc/gpu-viv
parent3ee1a16119679f0662a97b165a741d10c841bc3d (diff)
MGS-3155 [#imx-697] fix gpu hang when insmod galcore secondly
gpu hang alway happen when insmod galcore secondly on i.mx8mq, this problem is related gpu mmu setup with virtual command buffer. revert the virtual command buffer change to align 6.2.2 driver. Date: Aug 03, 2017 Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
Diffstat (limited to 'drivers/mxc/gpu-viv')
-rw-r--r--drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c14
-rw-r--r--drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_options.h2
2 files changed, 12 insertions, 4 deletions
diff --git a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c
index adab62fb84c1..94f2a2b3dc5d 100644
--- a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c
+++ b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c
@@ -567,10 +567,18 @@ gckKERNEL_Construct(
;
/* Initialize virtual command buffer. */
-#if gcdALLOC_CMD_FROM_RESERVE || gcdSECURITY || gcdDISABLE_GPU_VIRTUAL_ADDRESS || !USE_KERNEL_VIRTUAL_BUFFERS
- kernel->virtualCommandBuffer = gcvFALSE;
+#if (defined(LINUX) || defined(__QNXNTO__)) && !defined(EMULATOR) && !gcdALLOC_CMD_FROM_RESERVE
+ kernel->virtualCommandBuffer = gcvTRUE;
#else
- kernel->virtualCommandBuffer = kernel->hardware->enableMMU;
+ kernel->virtualCommandBuffer = gcvFALSE;
+#endif
+
+#if defined(UNDER_CE) && USE_KERNEL_VIRTUAL_BUFFERS
+ kernel->virtualCommandBuffer = gcvTRUE;
+#endif
+
+#if gcdSECURITY || gcdDISABLE_GPU_VIRTUAL_ADDRESS
+ kernel->virtualCommandBuffer = gcvFALSE;
#endif
#if gcdSHARED_PAGETABLE
diff --git a/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_options.h b/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_options.h
index ae36961c6507..9e62f99a6210 100644
--- a/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_options.h
+++ b/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_options.h
@@ -82,7 +82,7 @@ This define enables the use of VM for gckCommand and fence buffers.
#if defined(UNDER_CE)
# define USE_KERNEL_VIRTUAL_BUFFERS 1
#else
-# define USE_KERNEL_VIRTUAL_BUFFERS 1
+# define USE_KERNEL_VIRTUAL_BUFFERS 0
#endif
#endif