Skip to content

Commit 41012d7

Browse files
nathanchancealexdeucher
authored andcommitted
drm/amd/display: Mark dml30's UseMinimumDCFCLK() as noinline for stack usage
This function consumes a lot of stack space and it blows up the size of dml30_ModeSupportAndSystemConfigurationFull() with clang: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn30/display_mode_vba_30.c:3542:6: error: stack frame size (2200) exceeds limit (2048) in 'dml30_ModeSupportAndSystemConfigurationFull' [-Werror,-Wframe-larger-than] void dml30_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_lib) ^ 1 error generated. Commit a0f7e7f ("drm/amd/display: fix i386 frame size warning") aimed to address this for i386 but it did not help x86_64. To reduce the amount of stack space that dml30_ModeSupportAndSystemConfigurationFull() uses, mark UseMinimumDCFCLK() as noinline, using the _for_stack variant for documentation. While this will increase the total amount of stack usage between the two functions (1632 and 1304 bytes respectively), it will make sure both stay below the limit of 2048 bytes for these files. The aforementioned change does help reduce UseMinimumDCFCLK()'s stack usage so it should not be reverted in favor of this change. Link: ClangBuiltLinux#1681 Reported-by: "Sudip Mukherjee (Codethink)" <[email protected]> Tested-by: Maíra Canal <[email protected]> Reviewed-by: Rodrigo Siqueira <[email protected]> Signed-off-by: Nathan Chancellor <[email protected]> Signed-off-by: Rodrigo Siqueira <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 21485d3 commit 41012d7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6610,8 +6610,7 @@ static double CalculateUrgentLatency(
66106610
return ret;
66116611
}
66126612

6613-
6614-
static void UseMinimumDCFCLK(
6613+
static noinline_for_stack void UseMinimumDCFCLK(
66156614
struct display_mode_lib *mode_lib,
66166615
int MaxInterDCNTileRepeaters,
66176616
int MaxPrefetchMode,

0 commit comments

Comments
 (0)