Commit 54b96f806b145137c1c6d75c2225d7241ac3b7ea
1 parent
2c32aec9f6
Exists in
smarc-n7.1.2_2.0.0-ga
and in
2 other branches
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>
Showing 1 changed file with 6 additions and 0 deletions Side-by-side Diff
drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_video_memory.c
... | ... | @@ -1786,6 +1786,12 @@ |
1786 | 1786 | pageMask = (gctUINT32)pageSize - 1; |
1787 | 1787 | |
1788 | 1788 | *Address += (gctUINT32)physicalAddress & pageMask; |
1789 | + | |
1790 | + /* Need mark invalid address for virtual memory */ | |
1791 | + if (node->Virtual.contiguous == gcvFALSE) | |
1792 | + { | |
1793 | + physicalAddress = gcvINVALID_ADDRESS; | |
1794 | + } | |
1789 | 1795 | } |
1790 | 1796 | #endif |
1791 | 1797 | } |