On Mon, Jun 08, 2026 at 01:24:32PM +0200, Thorsten Leemhuis wrote:
> On 6/5/26 06:23, Randy Dunlap wrote:
> > [adding amd-gfx]
> 
> [+Nathan -- I'm also wondering if we should CC the amdgpu maintainers,
> but lets wait with that for a moment]

Thanks for the CC. Bringing in more folks based on my bisect below.

> Nathan afaics saw this problem a few weeks ago already and filed and
> issue for tracking: https://github.com/ClangBuiltLinux/linux/issues/2161
> 
> To quote from there: ""After LLVM commit 8ac9461e48e0 ("[SLP] Reject
> 2-element vectorization when vector inst count exceeds scalar",
> 2026-04-11), I am seeing two new -Wframe-larger-than instances from
> drivers/gpu/drm/amd/display […]""
> 
> Side note: I wonder if that LLVM commit somehow made it to the KernelCI
> env, or if something in the amdgpu code in -next changed and made the
> problem worse.

So I think these are two separate but perhaps related issues (i.e., the
latter of the "side note" comment), as that LLVM commit is only in LLVM
main (currently 23.0.0) but this instance that KernelCI flags is visible
with clang-21.

With clang-22 and a distribution configuration, I see:

  
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn30/display_mode_vba_30.c:3381:6:
 warning: stack frame size (2312) exceeds limit (2048) in 
'dml30_ModeSupportAndSystemConfigurationFull' [-Wframe-larger-than]
   3381 | void dml30_ModeSupportAndSystemConfigurationFull(struct 
display_mode_lib *mode_lib)
        |      ^
  1 warning generated.
  
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn31/display_mode_vba_31.c:3800:6:
 warning: stack frame size (2128) exceeds limit (2048) in 
'dml31_ModeSupportAndSystemConfigurationFull' [-Wframe-larger-than]
   3800 | void dml31_ModeSupportAndSystemConfigurationFull(struct 
display_mode_lib *mode_lib)
        |      ^
  1 warning generated.
  
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn314/display_mode_vba_314.c:3892:6:
 warning: stack frame size (2136) exceeds limit (2048) in 
'dml314_ModeSupportAndSystemConfigurationFull' [-Wframe-larger-than]
   3892 | void dml314_ModeSupportAndSystemConfigurationFull(struct 
display_mode_lib *mode_lib)
        |      ^
  1 warning generated.

My bisect lands on commit faaeeecef94a ("drm/amd/display: Fix type
mismatches in DML and normalize loop bounds") in -next, which makes
sense. I have not looked into this super closely but I suspect that
change makes it easier for LLVM to inline or unroll loops, which can
result in more stack usage (especially as this code has some functions
with many tens of parameters). It is rather hard to look at and modify
this drm/amd/display code so I have not prioritized it...

I wonder if

  https://github.com/llvm/llvm-project/issues/115862
  https://github.com/llvm/llvm-project/issues/143908

are related, even if KASAN is not enabled here.

> > On 6/4/26 10:59 AM, KernelCI bot wrote:
> >> Hello,
> >>
> >> New build issue found on next/master:
> >>
> >> ---
> >>  stack frame size (2088) exceeds limit (2048) in 
> >> 'dml31_ModeSupportAndSystemConfigurationFull' 
> >> [-Werror,-Wframe-larger-than] in 
> >> drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn31/display_mode_vba_31.o 
> >> (drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn31/display_mode_vba_31.c) 
> >> [logspec:kbuild,kbuild.compiler.error]
> >> ---
> >>
> >> - dashboard: 
> >> https://d.kernelci.org/i/maestro:96417cd30041ab8f3153128d0120c6cd70782d99
> >> - giturl: 
> >> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> >> - commit HEAD:  b99ae45861eccff1e1d8c7b05a13650be805d437
> >> - tags: next-20260604
> >>
> >> Please include the KernelCI tag when submitting a fix:
> >>
> >> Reported-by: kernelci.org bot <[email protected]>
> >>
> >>
> >> Log excerpt:
> >> =====================================================
> >> /tmp/kci/linux/drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn31/display_mode_vba_31.c:3872:6:
> >>  error: stack frame size (2088) exceeds limit (2048) in 
> >> 'dml31_ModeSupportAndSystemConfigurationFull' [-Werror,-Wframe-larger-than]
> >>  3872 | void dml31_ModeSupportAndSystemConfigurationFull(struct 
> >> display_mode_lib *mode_lib)
> >>       |      ^
> >> 1 error generated.
> >>
> >> =====================================================
> >>
> >>
> >> # Builds where the incident occurred:
> >>
> >> ## x86_64_defconfig+kselftest+x86-board on (x86_64):
> >> - compiler: clang-21
> >> - config: None
> >> - dashboard: https://d.kernelci.org/build/maestro:6a21abf22cc72b6e94bf3c60
> >>
> >>
> >> #kernelci issue maestro:96417cd30041ab8f3153128d0120c6cd70782d99
> >>
> >> --
> >> This is an experimental report format. Please send feedback in!
> >> Talk to us at [email protected]
> >>
> >> Made with love by the KernelCI team - https://kernelci.org
> >>
> > 
> 

-- 
Cheers,
Nathan

Reply via email to