1. 30 Apr, 2024 38 commits
  2. 26 Apr, 2024 2 commits
    • Nathan Chancellor's avatar
      drm/amd/display: Fix CFLAGS for dml2_core_dcn4_calcs.o · aa463cc8
      Nathan Chancellor authored
      -Wframe-larger-than=2048 is a part of both CFLAGS and CFLAGS_REMOVE for
      dml2_core_dcn4_calcs.o, which means that it ultimately gets removed
      altogether for 64-bit targets, as 2048 is the default FRAME_WARN value
      for 64-bit platforms, resulting in no -Wframe-larger-than coverage for
      this file.
      
      Remove -Wframe-larger-than from CFLAGS_REMOVE_dml2_core_dcn4_calcs.o and
      move to $(frame_warn_flag) for CFLAGS_dml2_core_dcn4_calcs.o, as that
      accounts for the fact that -Wframe-larger-than may need to be larger
      than 2048 in certain situations, such as when the sanitizers are
      enabled.
      
      Fixes: 00c39110 ("drm/amd/display: Add misc DC changes for DCN401")
      Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
      Reviewed-by: default avatarAurabindo Pillai <aurabindo.pillai@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      aa463cc8
    • Nathan Chancellor's avatar
      drm/amd/display: Add frame_warn_flag to dml2_core_shared.o · 9f4c6256
      Nathan Chancellor authored
      When building with tip of tree Clang, there are some new instances of
      -Wframe-larger-than from the new display code (which become fatal with
      CONFIG_WERROR=y):
      
        drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_core/dml2_core_shared.c:754:6: error: stack frame size (2488) exceeds limit (2048) in 'dml2_core_shared_mode_support' [-Werror,-Wframe-larger-than]
          754 | bool dml2_core_shared_mode_support(struct dml2_core_calcs_mode_support_ex *in_out_params)
              |      ^
        drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_core/dml2_core_shared.c:9834:6: error: stack frame size (2152) exceeds limit (2048) in 'dml2_core_shared_mode_programming' [-Werror,-Wframe-larger-than]
         9834 | bool dml2_core_shared_mode_programming(struct dml2_core_calcs_mode_programming_ex *in_out_params)
              |      ^
        2 errors generated.
      
      These warnings do not occur when CONFIG_K{A,C,M}SAN are disabled, so add
      $(frame_warn_flag) to dml2_core_shared.o's CFLAGS, which was added in
      commit 6740ec97 ("drm/amd/display: Increase frame warning limit with
      KASAN or KCSAN in dml2") to account for this situation.
      
      Fixes: 00c39110 ("drm/amd/display: Add misc DC changes for DCN401")
      Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
      Reviewed-by: default avatarAurabindo Pillai <aurabindo.pillai@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      9f4c6256