linux/drivers/gpu/drm/amd/display/dc/dml2
Nathan Chancellor 6740ec97bc drm/amd/display: Increase frame warning limit with KASAN or KCSAN in dml2
When building ARCH=x86_64 allmodconfig with clang, which will typically
have sanitizers enabled, there is a warning about a large stack frame.

  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/display_mode_core.c:6265:13: error: stack frame size (2520) exceeds limit (2048) in 'dml_prefetch_check' [-Werror,-Wframe-larger-than]
   6265 | static void dml_prefetch_check(struct display_mode_lib_st *mode_lib)
        |             ^
  1 error generated.

Notably, GCC 13.2.0 does not do too much of a better job, as it is right
at the current limit of 2048 (and others have reported being over with
older GCC versions):

  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/display_mode_core.c: In function 'dml_prefetch_check':
  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/display_mode_core.c:6705:1: error: the frame size of 2048 bytes is larger than 1800 bytes [-Werror=frame-larger-than=]
   6705 | }
        | ^

In the past, these warnings have been avoided by reducing the number of
parameters to various functions so that not as many arguments need to be
passed on the stack. However, these patches take a good amount of effort
to write despite being mechanical due to code structure and complexity
and they are never carried forward to new generations of the code so
that effort has to be expended every new hardware generation, which
becomes harder to justify as time goes on.

To avoid having a noticeable or lengthy breakage in all{mod,yes}config,
which are easy testing targets that have -Werror enabled, increase the
limit for configurations that have KASAN or KCSAN enabled by 50% so that
cases of extremely poor code generation can still be caught while not
breaking the majority of builds. CONFIG_KMSAN also causes high stack
usage but the frame limit is already set to zero when it is enabled,
which is accounted for by the check for CONFIG_FRAME_WARN=0 in the dml2
Makefile.

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2023-11-03 11:59:52 -04:00
..
Makefile drm/amd/display: Increase frame warning limit with KASAN or KCSAN in dml2 2023-11-03 11:59:52 -04:00
cmntypes.h drm/amd/display: Fix copyright notice in DML2 code 2023-10-26 18:41:22 -04:00
display_mode_core.c drm/amd/display: Fix copyright notice in DML2 code 2023-10-26 18:41:22 -04:00
display_mode_core.h drm/amd/display: Add z8_marks in dml 2023-10-09 16:50:12 -04:00
display_mode_core_structs.h drm/amd/display: Fix copyright notice in DML2 code 2023-10-26 18:41:22 -04:00
display_mode_lib_defines.h drm/amd/display: Fix copyright notice in DML2 code 2023-10-26 18:41:22 -04:00
display_mode_util.c drm/amd/display: Fix copyright notice in DML2 code 2023-10-26 18:41:22 -04:00
display_mode_util.h drm/amd/display: Fix copyright notice in DML2 code 2023-10-26 18:41:22 -04:00
dml2_dc_resource_mgmt.c drm/amd/display: implement map dc pipe with callback in DML2 2023-10-26 18:57:51 -04:00
dml2_dc_resource_mgmt.h drm/amd/display: Fix copyright notice in DML2 code 2023-10-26 18:41:22 -04:00
dml2_dc_types.h drm/amd/display: Fix copyright notice in DML2 code 2023-10-26 18:41:22 -04:00
dml2_internal_types.h drm/amd/display: Fix copyright notice in DML2 code 2023-10-26 18:41:22 -04:00
dml2_mall_phantom.c drm/amd/display: Fix copyright notice in DML2 code 2023-10-26 18:41:22 -04:00
dml2_mall_phantom.h drm/amd/display: Fix copyright notice in DML2 code 2023-10-26 18:41:22 -04:00
dml2_policy.c drm/amd/display: Fix copyright notice in DML2 code 2023-10-26 18:41:22 -04:00
dml2_policy.h
dml2_translation_helper.c drm/amd/display: Fix HDMI framepack 3D test issue 2023-10-26 18:58:07 -04:00
dml2_translation_helper.h drm/amd/display: Fix copyright notice in DML2 code 2023-10-26 18:41:22 -04:00
dml2_utils.c drm/amd/display: Fix copyright notice in DML2 code 2023-10-26 18:41:22 -04:00
dml2_utils.h drm/amd/display: Move stereo timing check to helper 2023-10-09 16:50:53 -04:00
dml2_wrapper.c drm/amd/display: Fix copyright notice in DML2 code 2023-10-26 18:41:22 -04:00
dml2_wrapper.h drm/amd/display: implement map dc pipe with callback in DML2 2023-10-26 18:57:51 -04:00
dml_assert.h drm/amd/display: Fix copyright notice in DML2 code 2023-10-26 18:41:22 -04:00
dml_depedencies.h drm/amd/display: Fix copyright notice in DML2 code 2023-10-26 18:41:22 -04:00
dml_display_rq_dlg_calc.c
dml_display_rq_dlg_calc.h
dml_logging.h drm/amd/display: Fix copyright notice in DML2 code 2023-10-26 18:41:22 -04:00