drm/amd/display: mark dml314's UseMinimumDCFCLK() as noinline_for_stack
authorHamza Mahfooz <hamza.mahfooz@amd.com>
Mon, 5 Jun 2023 18:18:49 +0000 (14:18 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Jun 2023 16:41:41 +0000 (12:41 -0400)
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 <alexander.deucher@amd.com>
Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dml/dcn314/display_mode_vba_314.c

index 27b83162ae452d5799fcb57fc105dfa904f4d9e2..1532a7e0ed6c5512b72af9c081e816af961505e1 100644 (file)
@@ -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)