]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Reduce stack size for dml31_ModeSupportAndSystemConfigurationFull
authorMichel Dänzer <mdaenzer@redhat.com>
Thu, 9 Dec 2021 16:46:43 +0000 (17:46 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 13 Dec 2021 21:33:17 +0000 (16:33 -0500)
commitec9ef31c78d8257dba09cdf89dbede4acf0268f4
treef17bb66e06600048f89e9e0b36e6dd2bf1a0bd32
parenta1f97ce8a3332bc75c38b902a6cc8592a43ed2f4
drm/amd/display: Reduce stack size for dml31_ModeSupportAndSystemConfigurationFull

Move code using the Pipe struct to a new helper function.

Works around[0] this warning (resulting in failure to build a RHEL debug
kernel with Werror enabled):

../drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn31/display_mode_vba_31.c: In function ‘dml31_ModeSupportAndSystemConfigurationFull’:
../drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn31/display_mode_vba_31.c:5740:1: warning: the frame size of 2144 bytes is larger than 2048 bytes [-Wframe-larger-than=]

The culprit seems to be the Pipe struct, so pull the relevant block out
into its own sub-function. (This is porting
commit 2c9db9bd1b06 ("drm/amd/display: Reduce stack size for dml21_ModeSupportAndSystemConfigurationFull")
from dml31 to dml21)

[0] AFAICT this doesn't actually reduce the total amount of stack which
can be used, just moves some of it from
dml31_ModeSupportAndSystemConfigurationFull to the new helper function,
so the former happens to no longer exceed the limit for a single
function.

Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Michel Dänzer <mdaenzer@redhat.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dml/dcn31/display_mode_vba_31.c