]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amd/display: Reduce number of arguments of dcn30's CalculateWatermarksAndDRAMSpee...
authorNathan Chancellor <nathan@kernel.org>
Sat, 13 Dec 2025 10:58:11 +0000 (19:58 +0900)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 5 Jan 2026 22:22:53 +0000 (17:22 -0500)
commit6ce6fbfddc5b127e4f57c3b5bfdcf40239a4fc2f
tree962ffb074bbe2d3fae1002d66d32bd1aa2aa2afd
parentf54a91f5337cd918eb86cf600320d25b6cfd8209
drm/amd/display: Reduce number of arguments of dcn30's CalculateWatermarksAndDRAMSpeedChangeSupport()

CalculateWatermarksAndDRAMSpeedChangeSupport() has a large number of
parameters, which must be passed on the stack. Most of the parameters
between the two callsites are the same, so they can be accessed through
the existing mode_lib pointer, instead of being passed as explicit
arguments. Doing this reduces the stack size of
dml30_ModeSupportAndSystemConfigurationFull() from 1912 bytes to 1840
bytes building for x86_64 with clang-22, helping stay under the 2048
byte limit for display_mode_vba_30.c.

Additionally, now that there is a pointer to mode_lib->vba available,
use 'v' consistently throughout the entire function.

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 563dfbefdf633c8d958398ddfa3955f9f40e47d9)
drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c