summaryrefslogtreecommitdiff
path: root/drivers/mxc
diff options
context:
space:
mode:
authorJessie Hao <juan.hao@nxp.com>2023-07-28 17:53:33 +0800
committerJason Liu <jason.hui.liu@nxp.com>2023-08-07 15:37:25 -0500
commitc076f80fd42605b682a79f531ea43066edb7dd81 (patch)
treec82ebc7ddcf4c58b32c9c3b05cd62a83b9134a7a /drivers/mxc
parentd286e4718112144c5dfb3c9407932a38ddf0b2a8 (diff)
MA-21513 [#imx-3206] Fix AXI BUS ERROR on more than 4G DDR board.
Meet GPU dump when run the below case on more than 4G DDR board. CtsNNAPITestCases TestRandomGraph/RandomGraphTest#LargeGraph_TENSOR_FLOAT16_Rank* The above 4G address can be rejected when doing _UserMemoryAttach. But will be used by _UserMemoryPhysical as os->paddingPage is allocated with __GFP_HIGHMEM. Here change __GFP_HIGHMEM to __GFP_DMA32 to avoid the GPU dump. Signed-off-by: Jessie Hao <juan.hao@nxp.com>
Diffstat (limited to 'drivers/mxc')
-rw-r--r--drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c
index 3b667aa1ea7c..09579f9efa34 100644
--- a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c
+++ b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c
@@ -762,7 +762,12 @@ gckOS_Construct(
gcmkONERROR(gcvSTATUS_OUT_OF_MEMORY);
}
- os->paddingPage = alloc_page(GFP_KERNEL | __GFP_HIGHMEM | gcdNOWARN);
+#if defined(CONFIG_ZONE_DMA32) && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
+ os->paddingPage = alloc_page(GFP_KERNEL | __GFP_DMA32 | gcdNOWARN);
+#else
+ os->paddingPage = alloc_page(GFP_KERNEL | __GFP_DMA | gcdNOWARN);
+#endif
+
if (os->paddingPage == gcvNULL)
{
/* Out of memory. */