Skip to content

Commit

Permalink
drm/amd/display: mark dml314's UseMinimumDCFCLK() as noinline_for_stack
Browse files Browse the repository at this point in the history
clang reports:
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn314/display_mode_vba_314.c:3892:6: error: stack frame size (2632) exceeds limit (2048) in 'dml314_ModeSupportAndSystemConfigurationFull' [-Werror,-Wframe-larger-than]
 3892 | void dml314_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_lib)
      |      ^
1 error generated.

So, since UseMinimumDCFCLK() consumes a lot of stack space, mark it as
noinline_for_stack to prevent it from blowing up
dml314_ModeSupportAndSystemConfigurationFull()'s stack size.

Acked-by: Alex Deucher <[email protected]>
Signed-off-by: Hamza Mahfooz <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
  • Loading branch information
effective-light authored and alexdeucher committed Jun 9, 2023
1 parent caf0f98 commit 8205494
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7061,7 +7061,7 @@ static double CalculateUrgentLatency(
return ret;
}

static void UseMinimumDCFCLK(
static noinline_for_stack void UseMinimumDCFCLK(
struct display_mode_lib *mode_lib,
int MaxPrefetchMode,
int ReorderingBytes)
Expand Down

0 comments on commit 8205494

Please sign in to comment.