]> git.ipfire.org Git - thirdparty/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 20:25:29 +0000 (15:25 -0500)
commitcf841f6abc26e455c68725e071450d6a29a53611
tree964155e1c58aa7919df89b5cd79134bab3ceb227
parenteb296c09805ee37dd4ea520a7fb3ec157c31090f
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>
(cherry picked from commit 29a4dc4b5d82e6b3da343391f9e784cf5c48732c)
drivers/gpu/drm/amd/display/dc/dml2_0/display_mode_core.c