gpu: lazy dma map [1/2]
authorJiyu Yang <jiyu.yang@amlogic.com>
Wed, 8 Apr 2020 09:54:02 +0000 (17:54 +0800)
committerJiyu Yang <jiyu.yang@amlogic.com>
Fri, 10 Apr 2020 05:36:23 +0000 (13:36 +0800)
PD#SWPL-21801

Problem:
there is many memory footprint on r10p0

Solution:
add CONFIG_MALI_DMA_BUF_LAZY_MAP

Verify:
P212BT15501

Change-Id: I5e24fb1a84b981c48a9e97be0965e818729ae0ba
Signed-off-by: Jiyu Yang <jiyu.yang@amlogic.com>
gpu-v2.mk
utgard/platform/Kbuild.amlogic

index 9613e7c0b80bcfa23c37583fb64ab691909149d2..2de274a091103fb3accd1b4a89e64dbb3753a57d 100755 (executable)
--- a/gpu-v2.mk
+++ b/gpu-v2.mk
@@ -37,7 +37,8 @@ define utgard-modules
        PATH=$$(cd ./$(TARGET_HOST_TOOL_PATH); pwd):$$PATH \
        $(MAKE) -C $(shell pwd)/$(PRODUCT_OUT)/obj/KERNEL_OBJ M=$(shell pwd)/$(PRODUCT_OUT)/obj/mali  \
        ARCH=$(3) CROSS_COMPILE=$(PREFIX_CROSS_COMPILE) CONFIG_MALI400=m  CONFIG_MALI450=m    \
-       EXTRA_CFLAGS="-DCONFIG_MALI400=m -DCONFIG_MALI450=m" \
+       CONFIG_MALI_DMA_BUF_LAZY_MAP=y \
+       EXTRA_CFLAGS="-DCONFIG_MALI400=m -DCONFIG_MALI450=m -DCONFIG_MALI_DMA_BUF_LAZY_MAP=y" \
        EXTRA_LDFLAGS+="--strip-debug" \
        CONFIG_AM_VDEC_H264_4K2K=y
 
index 51a8d8da66e830d06f020b43a5b63ee880491598..82d1d972b07ac2791e9d4f771029381091a122d3 100644 (file)
@@ -128,32 +128,12 @@ ifndef CONFIG_DMA_SHARED_BUFFER
     ccflags-y += -DCONFIG_DMA_SHARED_BUFFER=y
 endif
 
-ifndef CONFIG_MALI_DMA_BUF_MAP_ON_ATTACH
-    ccflags-y += -DCONFIG_MALI_DMA_BUF_MAP_ON_ATTACH=y
-endif
-
 ccflags-y += -I$(src)/platform/$(TARGET_PLATFORM)
 ccflags-y += -DMALI_FAKE_PLATFORM_DEVICE=1
-#$(warning r7p0/Kbuild.plat ccflags-y is $(ccflags-y))
-
+$(warning r7p0/Kbuild.plat ccflags-y is $(ccflags-y))
 
-#####################################################
-ifeq (true,false)
+ifndef CONFIG_MALI_DMA_BUF_LAZY_MAP
 ifndef CONFIG_MALI_DMA_BUF_MAP_ON_ATTACH
     ccflags-y += -DCONFIG_MALI_DMA_BUF_MAP_ON_ATTACH=y
 endif
-
-ccflags-y += -DCONFIG_MALI_DT=y
-ccflags-y += -DMESON_CPU_TYPE=0x80
-ccflags-y += -DMESON_CPU_TYPE_MESON6=0x60
-ccflags-y += -DMESON_CPU_TYPE_MESON6TVD=0x75
-ccflags-y += -DMESON_CPU_TYPE_MESON8=0x80
-ccflags-y += -DMESON_CPU_TYPE_MESON8B=0x8B
-
-USE_GPPLL?=0
-ifdef CONFIG_AM_VIDEO
-    USE_GPPLL:=1
-endif
-
-ccflags-y += -DAMLOGIC_GPU_USE_GPPLL=$(USE_GPPLL)
 endif