Skip to content

Commit 4217ef9

Browse files
chenhuacaialexdeucher
authored andcommitted
drm/amd/display: Allow building DC with clang on LoongArch
Clang on LoongArch (18+) appears to be unaffected by the bug causing excessive stack usage in calculate_bandwidth(). But when building DC_FP support the stack frame size can be as large as 2816 bytes, which causes the FRAME_WARN build warnings. So on LoongArch we allow building DC with clang, but disable DC_FP by default. The help message is also updated. Tested-by: Rui Wang <[email protected]> Signed-off-by: Huacai Chen <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 2bc96c9 commit 4217ef9

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

drivers/gpu/drm/amd/display/Kconfig

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,21 @@ menu "Display Engine Configuration"
77
config DRM_AMD_DC
88
bool "AMD DC - Enable new display engine"
99
default y
10-
depends on BROKEN || !CC_IS_CLANG || ARM64 || RISCV || SPARC64 || X86_64
10+
depends on BROKEN || !CC_IS_CLANG || ARM64 || LOONGARCH || RISCV || SPARC64 || X86_64
1111
select SND_HDA_COMPONENT if SND_HDA_CORE
1212
# !CC_IS_CLANG: https://github.com/ClangBuiltLinux/linux/issues/1752
13-
select DRM_AMD_DC_FP if ARCH_HAS_KERNEL_FPU_SUPPORT && !(CC_IS_CLANG && (ARM64 || RISCV))
13+
select DRM_AMD_DC_FP if ARCH_HAS_KERNEL_FPU_SUPPORT && !(CC_IS_CLANG && (ARM64 || LOONGARCH || RISCV))
1414
help
1515
Choose this option if you want to use the new display engine
1616
support for AMDGPU. This adds required support for Vega and
1717
Raven ASICs.
1818

19-
calculate_bandwidth() is presently broken on all !(X86_64 || SPARC64 || ARM64)
20-
architectures built with Clang (all released versions), whereby the stack
21-
frame gets blown up to well over 5k. This would cause an immediate kernel
22-
panic on most architectures. We'll revert this when the following bug report
23-
has been resolved: https://github.com/llvm/llvm-project/issues/41896.
19+
calculate_bandwidth() is presently broken on all !(X86_64 || SPARC64 ||
20+
ARM64 || LOONGARCH || RISCV) architectures built with Clang (all released
21+
versions), whereby the stack frame gets blown up to well over 5k. This
22+
would cause an immediate kernel panic on most architectures. We'll revert
23+
this when the following bug report has been resolved:
24+
https://github.com/llvm/llvm-project/issues/41896.
2425

2526
config DRM_AMD_DC_FP
2627
def_bool n

0 commit comments

Comments
 (0)