Skip to content

Commit 06a990b

Browse files
mpeakpm00
authored andcommitted
drm/amd/display: only use hard-float, not altivec on powerpc
The compiler flags enable altivec, but that is not required; hard-float is sufficient for the code to build and function. Drop altivec from the compiler flags and adjust the enable/disable code to only enable FPU use. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Michael Ellerman <[email protected]> Signed-off-by: Samuel Holland <[email protected]> Acked-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]> Cc: Borislav Petkov (AMD) <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Huacai Chen <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jonathan Corbet <[email protected]> Cc: Masahiro Yamada <[email protected]> Cc: Nathan Chancellor <[email protected]> Cc: Nicolas Schier <[email protected]> Cc: Palmer Dabbelt <[email protected]> Cc: Russell King <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: WANG Xuerui <[email protected]> Cc: Will Deacon <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 77acc6b commit 06a990b

File tree

3 files changed

+4
-12
lines changed

3 files changed

+4
-12
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,7 @@ void dc_fpu_begin(const char *function_name, const int line)
9292
#if defined(CONFIG_X86) || defined(CONFIG_LOONGARCH)
9393
kernel_fpu_begin();
9494
#elif defined(CONFIG_PPC64)
95-
if (cpu_has_feature(CPU_FTR_VSX_COMP))
96-
enable_kernel_vsx();
97-
else if (cpu_has_feature(CPU_FTR_ALTIVEC_COMP))
98-
enable_kernel_altivec();
99-
else if (!cpu_has_feature(CPU_FTR_FPU_UNAVAILABLE))
95+
if (!cpu_has_feature(CPU_FTR_FPU_UNAVAILABLE))
10096
enable_kernel_fp();
10197
#elif defined(CONFIG_ARM64)
10298
kernel_neon_begin();
@@ -125,11 +121,7 @@ void dc_fpu_end(const char *function_name, const int line)
125121
#if defined(CONFIG_X86) || defined(CONFIG_LOONGARCH)
126122
kernel_fpu_end();
127123
#elif defined(CONFIG_PPC64)
128-
if (cpu_has_feature(CPU_FTR_VSX_COMP))
129-
disable_kernel_vsx();
130-
else if (cpu_has_feature(CPU_FTR_ALTIVEC_COMP))
131-
disable_kernel_altivec();
132-
else if (!cpu_has_feature(CPU_FTR_FPU_UNAVAILABLE))
124+
if (!cpu_has_feature(CPU_FTR_FPU_UNAVAILABLE))
133125
disable_kernel_fp();
134126
#elif defined(CONFIG_ARM64)
135127
kernel_neon_end();

drivers/gpu/drm/amd/display/dc/dml/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ dml_ccflags := $(dml_ccflags-y) -msse
3131
endif
3232

3333
ifdef CONFIG_PPC64
34-
dml_ccflags := -mhard-float -maltivec
34+
dml_ccflags := -mhard-float
3535
endif
3636

3737
ifdef CONFIG_ARM64

drivers/gpu/drm/amd/display/dc/dml2/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ dml2_ccflags := $(dml2_ccflags-y) -msse
3030
endif
3131

3232
ifdef CONFIG_PPC64
33-
dml2_ccflags := -mhard-float -maltivec
33+
dml2_ccflags := -mhard-float
3434
endif
3535

3636
ifdef CONFIG_ARM64

0 commit comments

Comments
 (0)