[PATCH] drm/amd/display: Increase frame-larger-than warning limit for DCN401
Palmer Dabbelt
palmer at rivosinc.com
Tue Dec 31 00:02:58 UTC 2024
From: Palmer Dabbelt <palmer at rivosinc.com>
Without this I get
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/resource/dcn401/dcn401_resource.o
drivers/gpu/drm/amd/amdgpu/../display/dc/resource/dcn401/dcn401_resource.c: In function ‘dcn401_dpp_create’:
drivers/gpu/drm/amd/amdgpu/../display/dc/resource/dcn401/dcn401_resource.c:936:1: error: the frame size of 2720 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]
936 | }
| ^
when building for RISC-V/allmodconfig.
Signed-off-by: Palmer Dabbelt <palmer at rivosinc.com>
---
drivers/gpu/drm/amd/display/dc/resource/Makefile | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/gpu/drm/amd/display/dc/resource/Makefile b/drivers/gpu/drm/amd/display/dc/resource/Makefile
index 09320344d8e9..c2700a184f06 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/Makefile
+++ b/drivers/gpu/drm/amd/display/dc/resource/Makefile
@@ -22,6 +22,13 @@
# Makefile for the 'resource' sub-component of DAL.
#
+ifneq ($(CONFIG_FRAME_WARN),0)
+ifeq ($(filter y,$(CONFIG_KASAN)$(CONFIG_KCSAN)),y)
+frame_warn_flag := -Wframe-larger-than=4096
+else
+frame_warn_flag := -Wframe-larger-than=3072
+endif
+endif
###############################################################################
# DCE
@@ -203,5 +210,6 @@ RESOURCE_DCN401 = dcn401_resource.o
AMD_DAL_RESOURCE_DCN401 = $(addprefix $(AMDDALPATH)/dc/resource/dcn401/,$(RESOURCE_DCN401))
AMD_DISPLAY_FILES += $(AMD_DAL_RESOURCE_DCN401)
+CFLAGS_$(AMD_DAL_RESOURCE_DCN401) := $(frame_warn_flag)
endif
--
2.45.1
More information about the dri-devel
mailing list