OSDN Git Service

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)
commitc1e003d3ff6973aa896eef4e6a6d432e6afbff60
treef17bb66e06600048f89e9e0b36e6dd2bf1a0bd32
parentba6f8c135af02f8a38fb9856cfce6351a90f1ea4
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 a62427ef9b55 ("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