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>
This commit is contained in:
Xianzhong 2017-08-06 14:57:58 +08:00
parent 2c32aec9f6
commit 54b96f806b

View File

@ -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
}