gpu: fix totalram_pages build error
../drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx.c: In function ‘_AdjustParam’: ../drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx.c:1520:46: error: invalid operands to binary * (have ‘long unsigned int (*)(void)’ and ‘long unsigned int’) ((Args->baseAddress + totalram_pages * PAGE_SIZE) > 0x100000000)) Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>5.4-rM2-2.2.x-imx-squashed
parent
5ec394df46
commit
b54acb9c76
|
@ -61,6 +61,7 @@
|
|||
#include <asm/atomic.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/mm.h>
|
||||
|
||||
#include "gc_hal_kernel_platform.h"
|
||||
|
||||
|
@ -205,7 +206,7 @@ _NonContiguousAlloc(
|
|||
gcmkHEADER_ARG("NumPages=%u", NumPages);
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32)
|
||||
if (NumPages > totalram_pages)
|
||||
if (NumPages > totalram_pages())
|
||||
#else
|
||||
if (NumPages > num_physpages)
|
||||
#endif
|
||||
|
|
|
@ -1517,7 +1517,7 @@ _AdjustParam(
|
|||
patch_param(Platform->device, Args);
|
||||
|
||||
if (of_find_compatible_node(NULL, NULL, "fsl,imx8mq-gpu") &&
|
||||
((Args->baseAddress + totalram_pages * PAGE_SIZE) > 0x100000000))
|
||||
((Args->baseAddress + totalram_pages() * PAGE_SIZE) > 0x100000000))
|
||||
{
|
||||
Platform->flagBits |= gcvPLATFORM_FLAG_LIMIT_4G_ADDRESS;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue