linux5.10: fix dcn30 ppc64 patch on musl

since musl uses 64-bit ldbl, this will trigger the soft vs hard
float linker nonsense, so apply the same hack as for renoir
This commit is contained in:
q66 2021-01-30 19:39:42 +01:00
parent 854ed7af20
commit 9547bb18ef

View File

@ -1,12 +1,13 @@
From 3a75ebe236580073d77ad69730fc1d8980e130c2 Mon Sep 17 00:00:00 2001
From 295ba06fc80af54595c604ca6bab5f3e9c9ef154 Mon Sep 17 00:00:00 2001
From: Daniel Kolesa <daniel@octaforge.org>
Date: Fri, 29 Jan 2021 22:25:29 +0100
Subject: [PATCH] amd/display: enable dcn30 for ppc64
---
drivers/gpu/drm/amd/display/Kconfig | 2 +-
drivers/gpu/drm/amd/display/dc/dcn30/Makefile | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/Kconfig | 2 +-
drivers/gpu/drm/amd/display/dc/clk_mgr/Makefile | 10 ++++++++++
drivers/gpu/drm/amd/display/dc/dcn30/Makefile | 2 ++
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/Kconfig b/drivers/gpu/drm/amd/display/Kconfig
index 3c410d2..a749cc7 100644
@ -21,6 +22,27 @@ index 3c410d2..a749cc7 100644
depends on DRM_AMD_DC_DCN
help
Choose this option if you want to have
diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/Makefile b/drivers/gpu/drm/amd/display/dc/clk_mgr/Makefile
index 52b1ce7..adf3919 100644
--- a/drivers/gpu/drm/amd/display/dc/clk_mgr/Makefile
+++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/Makefile
@@ -114,6 +114,16 @@ ifdef CONFIG_DRM_AMD_DC_DCN3_0
###############################################################################
CLK_MGR_DCN30 = dcn30_clk_mgr.o dcn30_clk_mgr_smu_msg.o
+# see above
+# technically it should not matter that this file is soft-float since all it
+# does is read doubles from a struct and write them somewhere else; this is not
+# passing between hard-float and soft-float APIs via registers (which would be
+# problematic because of different calling convention), and the memory layout
+# is always the same (IEEE double precision) so the error is probably harmless
+ifdef CONFIG_PPC64
+CFLAGS_$(AMDDALPATH)/dc/clk_mgr/dcn30/dcn30_clk_mgr.o := $(call cc-option,-mno-gnu-attribute)
+endif
+
AMD_DAL_CLK_MGR_DCN30 = $(addprefix $(AMDDALPATH)/dc/clk_mgr/dcn30/,$(CLK_MGR_DCN30))
AMD_DISPLAY_FILES += $(AMD_DAL_CLK_MGR_DCN30)
diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/Makefile b/drivers/gpu/drm/amd/display/dc/dcn30/Makefile
index bd2a068..248c271 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn30/Makefile