Commit 7acc487a authored by Alex Deucher's avatar Alex Deucher

drm/amd/display: reduce stack size in dcn32 dml (v2)

Move additional dummy structures off the stack and into
the dummy vars structure.

Fixes the following:
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_mode_vba_32.c: In function 'DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerformanceCalculation':
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_mode_vba_32.c:1659:1: error: the frame size of 2144 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]
 1659 | }
      | ^
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_mode_vba_32.c: In function 'dml32_ModeSupportAndSystemConfigurationFull':
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_mode_vba_32.c:3799:1: error: the frame size of 2464 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]
 3799 | } // ModeSupportAndSystemConfigurationFull
      | ^

v2: move more stuff to dummy structure, fix init order (Alex)
Acked-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
parent 74097f9f
...@@ -196,6 +196,13 @@ struct DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerformanceCal ...@@ -196,6 +196,13 @@ struct DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerformanceCal
unsigned int ReorderBytes; unsigned int ReorderBytes;
unsigned int VMDataOnlyReturnBW; unsigned int VMDataOnlyReturnBW;
double HostVMInefficiencyFactor; double HostVMInefficiencyFactor;
DmlPipe myPipe;
SOCParametersList mmSOCParameters;
double dummy_unit_vector[DC__NUM_DPP__MAX];
double dummy_single[2];
enum clock_change_support dummy_dramchange_support;
enum dm_fclock_change_support dummy_fclkchange_support;
bool dummy_USRRetrainingSupport;
}; };
struct dml32_ModeSupportAndSystemConfigurationFull { struct dml32_ModeSupportAndSystemConfigurationFull {
...@@ -211,6 +218,35 @@ struct dml32_ModeSupportAndSystemConfigurationFull { ...@@ -211,6 +218,35 @@ struct dml32_ModeSupportAndSystemConfigurationFull {
double DSTXAfterScaler[DC__NUM_DPP__MAX]; double DSTXAfterScaler[DC__NUM_DPP__MAX];
double MaxTotalVActiveRDBandwidth; double MaxTotalVActiveRDBandwidth;
bool dummy_boolean_array[2][DC__NUM_DPP__MAX]; bool dummy_boolean_array[2][DC__NUM_DPP__MAX];
enum odm_combine_mode dummy_odm_mode[DC__NUM_DPP__MAX];
DmlPipe myPipe;
unsigned int dummy_integer[4];
unsigned int TotalNumberOfActiveOTG;
unsigned int TotalNumberOfActiveHDMIFRL;
unsigned int TotalNumberOfActiveDP2p0;
unsigned int TotalNumberOfActiveDP2p0Outputs;
unsigned int TotalDSCUnitsRequired;
unsigned int ReorderingBytes;
unsigned int TotalSlots;
unsigned int NumberOfDPPDSC;
unsigned int NumberOfDPPNoDSC;
unsigned int NextPrefetchModeState;
bool MPCCombineMethodAsNeededForPStateChangeAndVoltage;
bool MPCCombineMethodAsPossible;
bool FullFrameMALLPStateMethod;
bool SubViewportMALLPStateMethod;
bool PhantomPipeMALLPStateMethod;
bool NoChroma;
bool TotalAvailablePipesSupportNoDSC;
bool TotalAvailablePipesSupportDSC;
enum odm_combine_mode ODMModeNoDSC;
enum odm_combine_mode ODMModeDSC;
double RequiredDISPCLKPerSurfaceNoDSC;
double RequiredDISPCLKPerSurfaceDSC;
double BWOfNonCombinedSurfaceOfMaximumBandwidth;
double VMDataOnlyReturnBWPerState;
double HostVMInefficiencyFactor;
bool dummy_boolean[2];
}; };
struct dummy_vars { struct dummy_vars {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment