From 0e2d066358c3d3a518f1a3db7286c099619c3065 Mon Sep 17 00:00:00 2001 From: Jiyu Yang Date: Wed, 8 Apr 2020 17:54:02 +0800 Subject: [PATCH] gpu: lazy dma map [1/2] 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 --- gpu-v2.mk | 3 ++- utgard/platform/Kbuild.amlogic | 24 ++---------------------- 2 files changed, 4 insertions(+), 23 deletions(-) diff --git a/gpu-v2.mk b/gpu-v2.mk index 9613e7c..2de274a 100755 --- 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 diff --git a/utgard/platform/Kbuild.amlogic b/utgard/platform/Kbuild.amlogic index 51a8d8d..82d1d97 100644 --- a/utgard/platform/Kbuild.amlogic +++ b/utgard/platform/Kbuild.amlogic @@ -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 -- 2.20.1