summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorXianzhong <xianzhong.li@nxp.com>2017-08-06 14:57:58 +0800
committerXianzhong <xianzhong.li@nxp.com>2017-08-08 13:53:13 +0800
commit54b96f806b145137c1c6d75c2225d7241ac3b7ea (patch)
tree523ea242ec7e25cd718758cd85266f36967fe69f /drivers
parent2c32aec9f6b910e03c7d422ad524352663547f52 (diff)
MGS-3159 [#imx-700] fix kernel panic for x11 stress test
when gpu memory is from virtual system pool, the physical address will become invalid, driver should enable mmu mapping accordingly. but current kernel driver return the zero address with default value, this mistake will cause gpu write into the wrong memory from zero. this fix mark the invalid address for the virtual memory. Date: Aug 06, 2017 Signed-off-by: Xianzhong <xianzhong.li@nxp.com> Reviewed-by: Yuchou Gan <yuchou.gan@nxp.com> Reviewed-by: Yong Gan <yong.gan@nxp.com> Tested-by: Jason Liu <jason.hui.liu@nxp.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_video_memory.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_video_memory.c b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_video_memory.c
index 543c727f7c20..835a0a78b16c 100644
--- a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_video_memory.c
+++ b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_video_memory.c
@@ -1786,6 +1786,12 @@ gckVIDMEM_Lock(
pageMask = (gctUINT32)pageSize - 1;
*Address += (gctUINT32)physicalAddress & pageMask;
+
+ /* Need mark invalid address for virtual memory */
+ if (node->Virtual.contiguous == gcvFALSE)
+ {
+ physicalAddress = gcvINVALID_ADDRESS;
+ }
}
#endif
}