diff mbox series

drm/amd/display: Increase frame-larger-than warning limit for DCN401

Message ID 20241231000257.8533-2-palmer@rivosinc.com (mailing list archive)
State New
Headers show
Series drm/amd/display: Increase frame-larger-than warning limit for DCN401 | expand

Commit Message

Palmer Dabbelt Dec. 31, 2024, 12:02 a.m. UTC
From: Palmer Dabbelt <palmer@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@rivosinc.com>
---
 drivers/gpu/drm/amd/display/dc/resource/Makefile | 8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox series

Patch

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