gpu: MALI_DMA_BUF_MAP_ON_DEMAND by default [1/1]
authorJiyu Yang <Jiyu.Yang@amlogic.com>
Mon, 2 Dec 2019 09:46:40 +0000 (17:46 +0800)
committerJiyu Yang <jiyu.yang@amlogic.com>
Thu, 12 Dec 2019 09:30:16 +0000 (17:30 +0800)
PD#SWPL-18288

Problem:
kernel still use the legacy mode

Solution:
11.2 new DMA-BUF mapping from the Mali release note.
From r18p0-01rel0 version of the DDK the DMA-BUF memory
will be mapped for the GPU when it is imported into the DDK.
This will reduce the CPU load by avoiding unnecessary work
to build GPU page tables potentially every time the work using DMA-BUF memory
is submitted to GPU.

Verify:
ac213

Change-Id: I6405790d84196961f6fcbedf813f212ea61a16e2
Signed-off-by: Jiyu Yang <jiyu.yang@amlogic.com>
gpu-v2.mk

index beee4503e3aa4fbf69b3e7209588dae72837fd96..9613e7c0b80bcfa23c37583fb64ab691909149d2 100755 (executable)
--- a/gpu-v2.mk
+++ b/gpu-v2.mk
@@ -78,7 +78,7 @@ define bifrost-modules
        ARCH=$(3) CROSS_COMPILE=$(PREFIX_CROSS_COMPILE) \
        EXTRA_CFLAGS="-DCONFIG_MALI_PLATFORM_DEVICETREE -DCONFIG_MALI_MIDGARD_DVFS -DCONFIG_MALI_BACKEND=gpu " \
        EXTRA_CFLAGS+="-I$(shell pwd)/$(PRODUCT_OUT)/obj/bifrost/kernel/include " \
-       EXTRA_CFLAGS+="-Wno-error=larger-than=16384 " \
+       EXTRA_CFLAGS+="-Wno-error=larger-than=16384  -DCONFIG_MALI_DMA_BUF_MAP_ON_DEMAND=1 -DCONFIG_MALI_DMA_BUF_LEGACY_COMPAT=0" \
        EXTRA_LDFLAGS+="--strip-debug" \
        CONFIG_MALI_MIDGARD=m CONFIG_MALI_PLATFORM_DEVICETREE=y CONFIG_MALI_MIDGARD_DVFS=y CONFIG_MALI_BACKEND=gpu