Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-Wframe-larger-than in drivers/gpu/drm/amd/display/dc/dml/dcn314/display_mode_vba_314.c (only clang 16) #1917

Closed
vadorovsky opened this issue Aug 16, 2023 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@vadorovsky
Copy link
Member

I'm getting the following errors when both the latest stable kernel (6.4.10) and mainline:

drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn31/display_mode_vba_31.c:3797:6: error: stack frame size (2536) exceeds limit (2048) in 'dml31_ModeSupportAndSystemConfigurationFull' [-Werror,-Wframe-larger-than]
void dml31_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_lib)
     ^
1369/2536 (53.98%) spills, 1167/2536 (46.02%) variables
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn314/display_mode_vba_314.c:3892:6: error: stack frame size (2536) exceeds limit (2048) in 'dml314_ModeSupportAndSystemConfigurationFull' [-Werror,-Wframe-larger-than]
void dml314_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_lib)
     ^
1352/2536 (53.31%) spills, 1184/2536 (46.69%) variables

It happens only with clang 16, the workaround for me was to use clang 15 instead.

(Happy to look at that and try to fix myself if nobody beats me up to it.)

@nathanchance
Copy link
Member

Thanks for the report, this is a duplicate of #1754, so let's continue over there. Could you comment in that issue with the configuration that triggers this (since I cannot get it to trigger with either LLVM 16.0.6 or 18.0.0 and the configurations that were listed in that thread) and see if applying this series helps? You can either use b4's am or shazam command or you could use something like this bash one-liner:

for num in $(seq 2 10); do curl -LSs https://lore.kernel.org/all/20230110154325.3350916-"$num"-Rodrigo.Siqueira@amd.com/raw | git am || break; done

@nathanchance nathanchance closed this as not planned Won't fix, can't repro, duplicate, stale Aug 16, 2023
@vadorovsky
Copy link
Member Author

Sorry for opening a redundant issue and thanks for quick reply!

Actually I pulled the latest master (on Linus' tree) and it works, After brief look at git log I think that I got changes from this series, which was mainlined.

I hope it gets included in the next stable release.

If I have any further problems, I will let you know in 1754 and include the config.

@nickdesaulniers nickdesaulniers added the duplicate This issue or pull request already exists label Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants