]> git.itanic.dy.fi Git - linux-stable/commit
drm/amd/display: Reduce number of arguments of dml314's CalculateWatermarksAndDRAMSpe...
authorNathan Chancellor <nathan@kernel.org>
Fri, 16 Sep 2022 21:06:57 +0000 (14:06 -0700)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 21 Sep 2022 21:36:49 +0000 (17:36 -0400)
commitfaed5d0182480556cddb8343d9bad968387848f4
treed6a99f00127bf0c09da80bc481ee6c6e766b5264
parentabbc7a3dafb91b9d4ec56b70ec9a7520f8e13334
drm/amd/display: Reduce number of arguments of dml314's CalculateWatermarksAndDRAMSpeedChangeSupport()

Most of the arguments are identical between the two call sites and they
can be accessed through the 'struct vba_vars_st' pointer. This reduces
the total amount of stack space that
dml314_ModeSupportAndSystemConfigurationFull() uses by 240 bytes with
LLVM 16 (2216 -> 1976), helping clear up the following clang warning:

  drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn314/display_mode_vba_314.c:4020:6: error: stack frame size (2216) exceeds limit (2048) in 'dml314_ModeSupportAndSystemConfigurationFull' [-Werror,-Wframe-larger-than]
  void dml314_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_lib)
       ^
  1 error generated.

Link: https://github.com/ClangBuiltLinux/linux/issues/1710
Reported-by: "kernelci.org bot" <bot@kernelci.org>
Tested-by: MaĆ­ra Canal <mairacanal@riseup.net>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dml/dcn314/display_mode_vba_314.c