<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Arial;font-size:10pt;color:#317100;margin:15pt;" align="Left">
[AMD Public Use]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Series is:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Reviewed-by: Alex Deucher <alexander.deucher@amd.com><br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com><br>
<b>Sent:</b> Thursday, October 15, 2020 2:20 PM<br>
<b>To:</b> Kazlauskas, Nicholas <Nicholas.Kazlauskas@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com><br>
<b>Cc:</b> rodrigo.siqOFueira@amd.com <rodrigo.siqOFueira@amd.com>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; Lakha, Bhawanpreet <Bhawanpreet.Lakha@amd.com><br>
<b>Subject:</b> [PATCH 2/2] drm/amd/display: Fix DCN302 makefile</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Some setups will fail to build. So copy dcn301 makefile setup<br>
which is known to work<br>
<br>
Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com><br>
---<br>
.../gpu/drm/amd/display/dc/dcn302/Makefile | 29 +++++++++++++++++++<br>
1 file changed, 29 insertions(+)<br>
<br>
diff --git a/drivers/gpu/drm/amd/display/dc/dcn302/Makefile b/drivers/gpu/drm/amd/display/dc/dcn302/Makefile<br>
index 3ea9bff27912..36e44e1b07fa 100644<br>
--- a/drivers/gpu/drm/amd/display/dc/dcn302/Makefile<br>
+++ b/drivers/gpu/drm/amd/display/dc/dcn302/Makefile<br>
@@ -12,6 +12,35 @@<br>
<br>
DCN3_02 = dcn302_init.o dcn302_hwseq.o dcn302_resource.o<br>
<br>
+ifdef CONFIG_X86<br>
+CFLAGS_$(AMDDALPATH)/dc/dcn302/dcn302_resource.o := -mhard-float -msse<br>
+endif<br>
+<br>
+ifdef CONFIG_PPC64<br>
+CFLAGS_$(AMDDALPATH)/dc/dcn302/dcn302_resource.o := -mhard-float -maltivec<br>
+endif<br>
+<br>
+ifdef CONFIG_ARM64<br>
+CFLAGS_REMOVE_$(AMDDALPATH)/dc/dcn302/dcn302_resource.o := -mgeneral-regs-only<br>
+endif<br>
+<br>
+ifdef CONFIG_CC_IS_GCC<br>
+ifeq ($(call cc-ifversion, -lt, 0701, y), y)<br>
+IS_OLD_GCC = 1<br>
+endif<br>
+endif<br>
+<br>
+ifdef CONFIG_X86<br>
+ifdef IS_OLD_GCC<br>
+# Stack alignment mismatch, proceed with caution.<br>
+# GCC < 7.1 cannot compile code using `double` and -mpreferred-stack-boundary=3<br>
+# (8B stack alignment).<br>
+CFLAGS_$(AMDDALPATH)/dc/dcn302/dcn302_resource.o += -mpreferred-stack-boundary=4<br>
+else<br>
+CFLAGS_$(AMDDALPATH)/dc/dcn302/dcn302_resource.o += -msse2<br>
+endif<br>
+endif<br>
+<br>
AMD_DAL_DCN3_02 = $(addprefix $(AMDDALPATH)/dc/dcn302/,$(DCN3_02))<br>
<br>
AMD_DISPLAY_FILES += $(AMD_DAL_DCN3_02)<br>
-- <br>
2.25.1<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>