1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/gpu/drm/amd/display/dc/dml/dcn30
Nathan Chancellor b0f4b23fc3 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 a0f7e7f759 ("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: https://github.com/ClangBuiltLinux/linux/issues/1681
Reported-by: "Sudip Mukherjee (Codethink)" <sudipm.mukherjee@gmail.com>
Tested-by: Maíra Canal <mairacanal@riseup.net>
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2022-09-13 14:33:01 -04:00
..
dcn30_fpu.c drm/amd/display: Clean up some inconsistent indenting 2022-07-28 16:05:16 -04:00
dcn30_fpu.h drm/amd/display: Create patch bounding box function for isolate FPU 2022-07-25 17:16:20 -04:00
display_mode_vba_30.c drm/amd/display: Mark dml30's UseMinimumDCFCLK() as noinline for stack usage 2022-09-13 14:33:01 -04:00
display_mode_vba_30.h drm/amd/display: Remove duplicate code across dcn30 and dcn31 2022-07-05 16:18:27 -04:00
display_rq_dlg_calc_30.c drm/amd/display: Remove duplicate code across dcn30 and dcn31 2022-07-05 16:18:27 -04:00
display_rq_dlg_calc_30.h drm/amd/display: Pass display_pipe_params_st as const in DML 2021-09-23 15:17:29 -04:00