]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amd/display: Refactor dml_core_mode_support to reduce stack frame
authorAlex Hung <alex.hung@amd.com>
Wed, 26 Nov 2025 18:44:35 +0000 (11:44 -0700)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 8 Dec 2025 19:22:51 +0000 (14:22 -0500)
commit29a4dc4b5d82e6b3da343391f9e784cf5c48732c
treef915f964f064cca4226b3350834816cb90a06f32
parentfdcc620b02e2e4af77d5c81f546dddea4eb7971f
drm/amd/display: Refactor dml_core_mode_support to reduce stack frame

[WHAT]
When compiling Linux kernel with clang, the following warning / error
messages pops up:

drivers/gpu/drm/amd/amdgpu/../dal-dev/dc/dml2_0/display_mode_core.c:6853:12:
error: stack frame size (2120) exceeds limit (2056) in
'dml_core_mode_support' [-Werror,-Wframe-larger-than]
 6853 | dml_bool_t dml_core_mode_support(struct display_mode_lib_st
*mode_lib)

[HOW]
Refactoring CalculateVMRowAndSwath_params assignments to a new function
helps reduce the stack frame size in dml_core_mode_support.

Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4733
Reviewed-by: Austin Zheng <austin.zheng@amd.com>
Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dml2_0/display_mode_core.c