* [PATCH] drm/amd/display: Allow building DC with clang on RISC-V
@ 2023-07-17 22:29 Samuel Holland
2023-07-18 16:39 ` Nathan Chancellor
0 siblings, 1 reply; 3+ messages in thread
From: Samuel Holland @ 2023-07-17 22:29 UTC (permalink / raw)
To: Harry Wentland, Leo Li, Rodrigo Siqueira, Alex Deucher,
Christian König
Cc: llvm, Tom Rix, Pan, Xinhui, Nick Desaulniers, linux-kernel,
amd-gfx, Samuel Holland, Nathan Chancellor, dri-devel
clang on RISC-V appears to be unaffected by the bug causing excessive
stack usage in calculate_bandwidth(). clang 16 with -fstack-usage
reports a 304 byte stack frame size with CONFIG_ARCH_RV32I, and 512
bytes with CONFIG_ARCH_RV64I.
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
---
drivers/gpu/drm/amd/display/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/Kconfig b/drivers/gpu/drm/amd/display/Kconfig
index bf0a655d009e..901d1961b739 100644
--- a/drivers/gpu/drm/amd/display/Kconfig
+++ b/drivers/gpu/drm/amd/display/Kconfig
@@ -5,7 +5,7 @@ menu "Display Engine Configuration"
config DRM_AMD_DC
bool "AMD DC - Enable new display engine"
default y
- depends on BROKEN || !CC_IS_CLANG || X86_64 || SPARC64 || ARM64
+ depends on BROKEN || !CC_IS_CLANG || ARM64 || RISCV || SPARC64 || X86_64
select SND_HDA_COMPONENT if SND_HDA_CORE
# !CC_IS_CLANG: https://github.com/ClangBuiltLinux/linux/issues/1752
select DRM_AMD_DC_FP if (X86 || LOONGARCH || (PPC64 && ALTIVEC) || (ARM64 && KERNEL_MODE_NEON && !CC_IS_CLANG))
--
2.40.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/amd/display: Allow building DC with clang on RISC-V
2023-07-17 22:29 [PATCH] drm/amd/display: Allow building DC with clang on RISC-V Samuel Holland
@ 2023-07-18 16:39 ` Nathan Chancellor
2023-07-19 12:54 ` Alex Deucher
0 siblings, 1 reply; 3+ messages in thread
From: Nathan Chancellor @ 2023-07-18 16:39 UTC (permalink / raw)
To: Samuel Holland
Cc: Nick Desaulniers, llvm, Leo Li, Pan, Xinhui, Rodrigo Siqueira,
linux-kernel, amd-gfx, dri-devel, Tom Rix, Alex Deucher,
Christian König
On Mon, Jul 17, 2023 at 03:29:23PM -0700, Samuel Holland wrote:
> clang on RISC-V appears to be unaffected by the bug causing excessive
> stack usage in calculate_bandwidth(). clang 16 with -fstack-usage
> reports a 304 byte stack frame size with CONFIG_ARCH_RV32I, and 512
> bytes with CONFIG_ARCH_RV64I.
>
> Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
I built ARCH=riscv allmodconfig drivers/gpu/drm/amd/amdgpu/ (confirming
that CONFIG_DRM_AMD_DC gets enabled) with LLVM 11 through 17 with and
without CONFIG_KASAN=y and I never saw the -Wframe-larger-than instance
that this was disabled for, so I agree.
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
>
> drivers/gpu/drm/amd/display/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/Kconfig b/drivers/gpu/drm/amd/display/Kconfig
> index bf0a655d009e..901d1961b739 100644
> --- a/drivers/gpu/drm/amd/display/Kconfig
> +++ b/drivers/gpu/drm/amd/display/Kconfig
> @@ -5,7 +5,7 @@ menu "Display Engine Configuration"
> config DRM_AMD_DC
> bool "AMD DC - Enable new display engine"
> default y
> - depends on BROKEN || !CC_IS_CLANG || X86_64 || SPARC64 || ARM64
> + depends on BROKEN || !CC_IS_CLANG || ARM64 || RISCV || SPARC64 || X86_64
> select SND_HDA_COMPONENT if SND_HDA_CORE
> # !CC_IS_CLANG: https://github.com/ClangBuiltLinux/linux/issues/1752
> select DRM_AMD_DC_FP if (X86 || LOONGARCH || (PPC64 && ALTIVEC) || (ARM64 && KERNEL_MODE_NEON && !CC_IS_CLANG))
> --
> 2.40.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/amd/display: Allow building DC with clang on RISC-V
2023-07-18 16:39 ` Nathan Chancellor
@ 2023-07-19 12:54 ` Alex Deucher
0 siblings, 0 replies; 3+ messages in thread
From: Alex Deucher @ 2023-07-19 12:54 UTC (permalink / raw)
To: Nathan Chancellor
Cc: llvm, Leo Li, Nick Desaulniers, Pan, Xinhui, Rodrigo Siqueira,
linux-kernel, amd-gfx, Samuel Holland, dri-devel, Tom Rix,
Alex Deucher, Christian König
Applied. Thanks!
On Tue, Jul 18, 2023 at 12:40 PM Nathan Chancellor <nathan@kernel.org> wrote:
>
> On Mon, Jul 17, 2023 at 03:29:23PM -0700, Samuel Holland wrote:
> > clang on RISC-V appears to be unaffected by the bug causing excessive
> > stack usage in calculate_bandwidth(). clang 16 with -fstack-usage
> > reports a 304 byte stack frame size with CONFIG_ARCH_RV32I, and 512
> > bytes with CONFIG_ARCH_RV64I.
> >
> > Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
>
> I built ARCH=riscv allmodconfig drivers/gpu/drm/amd/amdgpu/ (confirming
> that CONFIG_DRM_AMD_DC gets enabled) with LLVM 11 through 17 with and
> without CONFIG_KASAN=y and I never saw the -Wframe-larger-than instance
> that this was disabled for, so I agree.
>
> Reviewed-by: Nathan Chancellor <nathan@kernel.org>
> Tested-by: Nathan Chancellor <nathan@kernel.org>
>
> >
> > drivers/gpu/drm/amd/display/Kconfig | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/amd/display/Kconfig b/drivers/gpu/drm/amd/display/Kconfig
> > index bf0a655d009e..901d1961b739 100644
> > --- a/drivers/gpu/drm/amd/display/Kconfig
> > +++ b/drivers/gpu/drm/amd/display/Kconfig
> > @@ -5,7 +5,7 @@ menu "Display Engine Configuration"
> > config DRM_AMD_DC
> > bool "AMD DC - Enable new display engine"
> > default y
> > - depends on BROKEN || !CC_IS_CLANG || X86_64 || SPARC64 || ARM64
> > + depends on BROKEN || !CC_IS_CLANG || ARM64 || RISCV || SPARC64 || X86_64
> > select SND_HDA_COMPONENT if SND_HDA_CORE
> > # !CC_IS_CLANG: https://github.com/ClangBuiltLinux/linux/issues/1752
> > select DRM_AMD_DC_FP if (X86 || LOONGARCH || (PPC64 && ALTIVEC) || (ARM64 && KERNEL_MODE_NEON && !CC_IS_CLANG))
> > --
> > 2.40.1
> >
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-07-19 12:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-17 22:29 [PATCH] drm/amd/display: Allow building DC with clang on RISC-V Samuel Holland
2023-07-18 16:39 ` Nathan Chancellor
2023-07-19 12:54 ` Alex Deucher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).