aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4293-drm-amd-display-fix-dcn21-Makefile-for-clang.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4293-drm-amd-display-fix-dcn21-Makefile-for-clang.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4293-drm-amd-display-fix-dcn21-Makefile-for-clang.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4293-drm-amd-display-fix-dcn21-Makefile-for-clang.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4293-drm-amd-display-fix-dcn21-Makefile-for-clang.patch
new file mode 100644
index 00000000..77d796ed
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4293-drm-amd-display-fix-dcn21-Makefile-for-clang.patch
@@ -0,0 +1,47 @@
+From 903e7f10e44dd02e43a9ff9fcd3f98a934adf422 Mon Sep 17 00:00:00 2001
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Wed, 2 Oct 2019 14:01:25 +0200
+Subject: [PATCH 4293/4736] drm/amd/display: fix dcn21 Makefile for clang
+
+Just like all the other variants, this one passes invalid
+compile-time options with clang after the new code got
+merged:
+
+clang: error: unknown argument: '-mpreferred-stack-boundary=4'
+scripts/Makefile.build:265: recipe for target 'drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.o' failed
+
+Use the same variant that we have for dcn20 to fix compilation.
+
+Fixes: eced51f9babb ("drm/amd/display: Add hubp block for Renoir (v2)")
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/display/dc/dcn21/Makefile | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/amd/display/dc/dcn21/Makefile b/drivers/gpu/drm/amd/display/dc/dcn21/Makefile
+index b7a9285348fb..4ddd4037c1f8 100644
+--- a/drivers/gpu/drm/amd/display/dc/dcn21/Makefile
++++ b/drivers/gpu/drm/amd/display/dc/dcn21/Makefile
+@@ -3,7 +3,17 @@
+
+ DCN21 = dcn21_hubp.o dcn21_hubbub.o dcn21_resource.o dcn21_hwseq.o dcn21_link_encoder.o
+
+-CFLAGS_dcn21_resource.o := -mhard-float -msse -mpreferred-stack-boundary=4
++ifneq ($(call cc-option, -mpreferred-stack-boundary=4),)
++ cc_stack_align := -mpreferred-stack-boundary=4
++else ifneq ($(call cc-option, -mstack-alignment=16),)
++ cc_stack_align := -mstack-alignment=16
++endif
++
++CFLAGS_dcn21_resource.o := -mhard-float -msse $(cc_stack_align)
++
++ifdef CONFIG_CC_IS_CLANG
++CFLAGS_dcn21_resource.o += -msse2
++endif
+
+ AMD_DAL_DCN21 = $(addprefix $(AMDDALPATH)/dc/dcn21/,$(DCN21))
+
+--
+2.17.1
+