<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:#0000FF;margin:5pt;" align="Left">
[AMD Official Use Only]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi Isabbasso, </div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
The patch fails to compile when there is No DCN because the calc object files fail to generate since dml depends on the CONFIG_DRM_AMD_DC_DCN being enabled (Makefile inside dc folder):</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
ifdef CONFIG_DRM_AMD_DC_DCN
<div>DC_LIBS += dcn20</div>
<div>DC_LIBS += dsc</div>
<div>DC_LIBS += dcn10 dml</div>
<div>DC_LIBS += dcn21</div>
<div>DC_LIBS += dcn30</div>
<div>DC_LIBS += dcn301</div>
<div>DC_LIBS += dcn302</div>
<div>DC_LIBS += dcn303</div>
endif<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
A few changes need to be made to the patch, which are:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
-The Makefile in dc needs the line: <span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">DC_LIBS+= dml/calcs</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
-the Makefile in the calcs folder that the patch deletes can be placed inside of dc/dml/calcs instead of adding it to the Makefiles in dc/dml </div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Could you revise your patch based on these changes. </div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Regards, </div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Jasdeep</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> isabbasso@riseup.net <isabbasso@riseup.net><br>
<b>Sent:</b> December 20, 2021 6:23 PM<br>
<b>To:</b> Deucher, Alexander <Alexander.Deucher@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>; daniel@ffwll.ch <daniel@ffwll.ch>; Wentland, Harry <Harry.Wentland@amd.com>; Siqueira, Rodrigo <Rodrigo.Siqueira@amd.com>; Li, Sun peng (Leo) <Sunpeng.Li@amd.com>;
 Pan, Xinhui <Xinhui.Pan@amd.com>; Zhuo, Qingqing (Lillian) <Qingqing.Zhuo@amd.com>; Dhillon, Jasdeep <Jasdeep.Dhillon@amd.com>; mwen@igalia.com <mwen@igalia.com><br>
<b>Cc:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; ~lkcamp/patches@lists.sr.ht <~lkcamp/patches@lists.sr.ht><br>
<b>Subject:</b> Re: [PATCH v2] drm/amd/display: move calcs folder into DML</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">On 2021-12-20 20:20, Isabella Basso wrote:<br>
> The calcs folder has FPU code on it, which should be isolated inside the<br>
> DML folder as per <a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchwork.freedesktop.org%2Fseries%2F93042%2F&amp;data=04%7C01%7Cjasdeep.dhillon%40amd.com%7C01959e019f6e45e25a6208d9c40fc233%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637756394247493762%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=bB4zotGMArbsTzZNDr0u2uw3VBD4jxNornJMol9YJlA%3D&amp;reserved=0">
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchwork.freedesktop.org%2Fseries%2F93042%2F&amp;data=04%7C01%7Cjasdeep.dhillon%40amd.com%7C01959e019f6e45e25a6208d9c40fc233%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637756394247493762%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=bB4zotGMArbsTzZNDr0u2uw3VBD4jxNornJMol9YJlA%3D&amp;reserved=0</a>.<br>
> <br>
> This commit aims single-handedly to correct the location of such FPU<br>
> code and does not refactor any functions.<br>
> <br>
> Signed-off-by: Isabella Basso <isabbasso@riseup.net><br>
> ---<br>
>  drivers/gpu/drm/amd/display/dc/Makefile       |  2 +-<br>
>  drivers/gpu/drm/amd/display/dc/calcs/Makefile | 68 -------------------<br>
>  drivers/gpu/drm/amd/display/dc/dml/Makefile   | 13 +++-<br>
>  .../amd/display/dc/{ => dml}/calcs/bw_fixed.c |  0<br>
>  .../display/dc/{ => dml}/calcs/calcs_logger.h |  0<br>
>  .../display/dc/{ => dml}/calcs/custom_float.c |  0<br>
>  .../display/dc/{ => dml}/calcs/dce_calcs.c    |  0<br>
>  .../dc/{ => dml}/calcs/dcn_calc_auto.c        |  0<br>
>  .../dc/{ => dml}/calcs/dcn_calc_auto.h        |  0<br>
>  .../dc/{ => dml}/calcs/dcn_calc_math.c        |  0<br>
>  .../display/dc/{ => dml}/calcs/dcn_calcs.c    |  0<br>
>  11 files changed, 13 insertions(+), 70 deletions(-)<br>
>  delete mode 100644 drivers/gpu/drm/amd/display/dc/calcs/Makefile<br>
>  rename drivers/gpu/drm/amd/display/dc/{ => dml}/calcs/bw_fixed.c (100%)<br>
>  rename drivers/gpu/drm/amd/display/dc/{ => dml}/calcs/calcs_logger.h (100%)<br>
>  rename drivers/gpu/drm/amd/display/dc/{ => dml}/calcs/custom_float.c (100%)<br>
>  rename drivers/gpu/drm/amd/display/dc/{ => dml}/calcs/dce_calcs.c (100%)<br>
>  rename drivers/gpu/drm/amd/display/dc/{ => dml}/calcs/dcn_calc_auto.c (100%)<br>
>  rename drivers/gpu/drm/amd/display/dc/{ => dml}/calcs/dcn_calc_auto.h (100%)<br>
>  rename drivers/gpu/drm/amd/display/dc/{ => dml}/calcs/dcn_calc_math.c (100%)<br>
>  rename drivers/gpu/drm/amd/display/dc/{ => dml}/calcs/dcn_calcs.c (100%)<br>
> <br>
> diff --git a/drivers/gpu/drm/amd/display/dc/Makefile<br>
> b/drivers/gpu/drm/amd/display/dc/Makefile<br>
> index b1f0d6260226..1872adc96a00 100644<br>
> --- a/drivers/gpu/drm/amd/display/dc/Makefile<br>
> +++ b/drivers/gpu/drm/amd/display/dc/Makefile<br>
> @@ -23,7 +23,7 @@<br>
>  # Makefile for Display Core (dc) component.<br>
>  #<br>
>  <br>
> -DC_LIBS = basics bios calcs clk_mgr dce gpio irq virtual<br>
> +DC_LIBS = basics bios clk_mgr dce gpio irq virtual<br>
>  <br>
>  ifdef CONFIG_DRM_AMD_DC_DCN<br>
>  DC_LIBS += dcn20<br>
> diff --git a/drivers/gpu/drm/amd/display/dc/calcs/Makefile<br>
> b/drivers/gpu/drm/amd/display/dc/calcs/Makefile<br>
> deleted file mode 100644<br>
> index f3c00f479e1c..000000000000<br>
> --- a/drivers/gpu/drm/amd/display/dc/calcs/Makefile<br>
> +++ /dev/null<br>
> @@ -1,68 +0,0 @@<br>
> -#<br>
> -# Copyright 2017 Advanced Micro Devices, Inc.<br>
> -# Copyright 2019 Raptor Engineering, LLC<br>
> -#<br>
> -# Permission is hereby granted, free of charge, to any person obtaining a<br>
> -# copy of this software and associated documentation files (the "Software"),<br>
> -# to deal in the Software without restriction, including without limitation<br>
> -# the rights to use, copy, modify, merge, publish, distribute, sublicense,<br>
> -# and/or sell copies of the Software, and to permit persons to whom the<br>
> -# Software is furnished to do so, subject to the following conditions:<br>
> -#<br>
> -# The above copyright notice and this permission notice shall be included in<br>
> -# all copies or substantial portions of the Software.<br>
> -#<br>
> -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR<br>
> -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,<br>
> -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL<br>
> -# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR<br>
> -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,<br>
> -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR<br>
> -# OTHER DEALINGS IN THE SOFTWARE.<br>
> -#<br>
> -#<br>
> -# Makefile for the 'calcs' sub-component of DAL.<br>
> -# It calculates Bandwidth and Watermarks values for HW programming<br>
> -#<br>
> -<br>
> -ifdef CONFIG_X86<br>
> -calcs_ccflags := -mhard-float -msse<br>
> -endif<br>
> -<br>
> -ifdef CONFIG_PPC64<br>
> -calcs_ccflags := -mhard-float -maltivec<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>
> -calcs_ccflags += -mpreferred-stack-boundary=4<br>
> -else<br>
> -calcs_ccflags += -msse2<br>
> -endif<br>
> -endif<br>
> -<br>
> -CFLAGS_$(AMDDALPATH)/dc/calcs/dcn_calcs.o := $(calcs_ccflags)<br>
> -CFLAGS_$(AMDDALPATH)/dc/calcs/dcn_calc_auto.o := $(calcs_ccflags)<br>
> -CFLAGS_$(AMDDALPATH)/dc/calcs/dcn_calc_math.o := $(calcs_ccflags)<br>
> -Wno-tautological-compare<br>
> -CFLAGS_REMOVE_$(AMDDALPATH)/dc/calcs/dcn_calcs.o := $(calcs_rcflags)<br>
> -CFLAGS_REMOVE_$(AMDDALPATH)/dc/calcs/dcn_calc_auto.o := $(calcs_rcflags)<br>
> -CFLAGS_REMOVE_$(AMDDALPATH)/dc/calcs/dcn_calc_math.o := $(calcs_rcflags)<br>
> -<br>
> -BW_CALCS = dce_calcs.o bw_fixed.o custom_float.o<br>
> -<br>
> -ifdef CONFIG_DRM_AMD_DC_DCN<br>
> -BW_CALCS += dcn_calcs.o dcn_calc_math.o dcn_calc_auto.o<br>
> -endif<br>
> -<br>
> -AMD_DAL_BW_CALCS = $(addprefix $(AMDDALPATH)/dc/calcs/,$(BW_CALCS))<br>
> -<br>
> -AMD_DISPLAY_FILES += $(AMD_DAL_BW_CALCS)<br>
> diff --git a/drivers/gpu/drm/amd/display/dc/dml/Makefile<br>
> b/drivers/gpu/drm/amd/display/dc/dml/Makefile<br>
> index eee6672bd32d..82f26da6778e 100644<br>
> --- a/drivers/gpu/drm/amd/display/dc/dml/Makefile<br>
> +++ b/drivers/gpu/drm/amd/display/dc/dml/Makefile<br>
> @@ -73,6 +73,11 @@<br>
> CFLAGS_$(AMDDALPATH)/dc/dml/dcn31/display_rq_dlg_calc_31.o :=<br>
> $(dml_ccflags)<br>
>  CFLAGS_$(AMDDALPATH)/dc/dml/dcn301/dcn301_fpu.o := $(dml_ccflags)<br>
>  CFLAGS_$(AMDDALPATH)/dc/dml/dsc/rc_calc_fpu.o := $(dml_ccflags)<br>
>  CFLAGS_$(AMDDALPATH)/dc/dml/display_mode_lib.o := $(dml_ccflags)<br>
> +<br>
> +CFLAGS_$(AMDDALPATH)/dc/dml/calcs/dcn_calcs.o := $(dml_ccflags)<br>
> +CFLAGS_$(AMDDALPATH)/dc/dml/calcs/dcn_calc_auto.o := $(dml_ccflags)<br>
> +CFLAGS_$(AMDDALPATH)/dc/dml/calcs/dcn_calc_math.o := $(dml_ccflags)<br>
> -Wno-tautological-compare<br>
> +<br>
>  CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml/display_mode_vba.o := $(dml_rcflags)<br>
>  CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml/dcn2x/dcn2x.o := $(dml_rcflags)<br>
>  CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml/dcn20/display_mode_vba_20.o :=<br>
> $(dml_rcflags)<br>
> @@ -94,7 +99,11 @@<br>
> CFLAGS_$(AMDDALPATH)/dc/dml/display_rq_dlg_helpers.o := $(dml_ccflags)<br>
>  CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml/dml1_display_rq_dlg_calc.o := $(dml_rcflags)<br>
>  CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml/display_rq_dlg_helpers.o := $(dml_rcflags)<br>
>  <br>
> -DML = display_mode_lib.o display_rq_dlg_helpers.o dml1_display_rq_dlg_calc.o \<br>
> +CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml/calcs/dcn_calcs.o := $(dml_rcflags)<br>
> +CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml/calcs/dcn_calc_auto.o := $(dml_rcflags)<br>
> +CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml/calcs/dcn_calc_math.o := $(dml_rcflags)<br>
> +<br>
> +DML = display_mode_lib.o display_rq_dlg_helpers.o dml1_display_rq_dlg_calc.o<br>
>  <br>
>  ifdef CONFIG_DRM_AMD_DC_DCN<br>
>  DML += dcn20/dcn20_fpu.o<br>
> @@ -105,6 +114,8 @@ DML += dcn30/display_mode_vba_30.o<br>
> dcn30/display_rq_dlg_calc_30.o<br>
>  DML += dcn31/display_mode_vba_31.o dcn31/display_rq_dlg_calc_31.o<br>
>  DML += dcn301/dcn301_fpu.o<br>
>  DML += dsc/rc_calc_fpu.o<br>
> +DML += calcs/dce_calcs.o calcs/bw_fixed.o calcs/custom_float.o<br>
> +DML += calcs/dcn_calcs.o calcs/dcn_calc_math.o calcs/dcn_calc_auto.o<br>
>  endif<br>
>  <br>
>  AMD_DAL_DML = $(addprefix $(AMDDALPATH)/dc/dml/,$(DML))<br>
> diff --git a/drivers/gpu/drm/amd/display/dc/calcs/bw_fixed.c<br>
> b/drivers/gpu/drm/amd/display/dc/dml/calcs/bw_fixed.c<br>
> similarity index 100%<br>
> rename from drivers/gpu/drm/amd/display/dc/calcs/bw_fixed.c<br>
> rename to drivers/gpu/drm/amd/display/dc/dml/calcs/bw_fixed.c<br>
> diff --git a/drivers/gpu/drm/amd/display/dc/calcs/calcs_logger.h<br>
> b/drivers/gpu/drm/amd/display/dc/dml/calcs/calcs_logger.h<br>
> similarity index 100%<br>
> rename from drivers/gpu/drm/amd/display/dc/calcs/calcs_logger.h<br>
> rename to drivers/gpu/drm/amd/display/dc/dml/calcs/calcs_logger.h<br>
> diff --git a/drivers/gpu/drm/amd/display/dc/calcs/custom_float.c<br>
> b/drivers/gpu/drm/amd/display/dc/dml/calcs/custom_float.c<br>
> similarity index 100%<br>
> rename from drivers/gpu/drm/amd/display/dc/calcs/custom_float.c<br>
> rename to drivers/gpu/drm/amd/display/dc/dml/calcs/custom_float.c<br>
> diff --git a/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c<br>
> b/drivers/gpu/drm/amd/display/dc/dml/calcs/dce_calcs.c<br>
> similarity index 100%<br>
> rename from drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c<br>
> rename to drivers/gpu/drm/amd/display/dc/dml/calcs/dce_calcs.c<br>
> diff --git a/drivers/gpu/drm/amd/display/dc/calcs/dcn_calc_auto.c<br>
> b/drivers/gpu/drm/amd/display/dc/dml/calcs/dcn_calc_auto.c<br>
> similarity index 100%<br>
> rename from drivers/gpu/drm/amd/display/dc/calcs/dcn_calc_auto.c<br>
> rename to drivers/gpu/drm/amd/display/dc/dml/calcs/dcn_calc_auto.c<br>
> diff --git a/drivers/gpu/drm/amd/display/dc/calcs/dcn_calc_auto.h<br>
> b/drivers/gpu/drm/amd/display/dc/dml/calcs/dcn_calc_auto.h<br>
> similarity index 100%<br>
> rename from drivers/gpu/drm/amd/display/dc/calcs/dcn_calc_auto.h<br>
> rename to drivers/gpu/drm/amd/display/dc/dml/calcs/dcn_calc_auto.h<br>
> diff --git a/drivers/gpu/drm/amd/display/dc/calcs/dcn_calc_math.c<br>
> b/drivers/gpu/drm/amd/display/dc/dml/calcs/dcn_calc_math.c<br>
> similarity index 100%<br>
> rename from drivers/gpu/drm/amd/display/dc/calcs/dcn_calc_math.c<br>
> rename to drivers/gpu/drm/amd/display/dc/dml/calcs/dcn_calc_math.c<br>
> diff --git a/drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c<br>
> b/drivers/gpu/drm/amd/display/dc/dml/calcs/dcn_calcs.c<br>
> similarity index 100%<br>
> rename from drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c<br>
> rename to drivers/gpu/drm/amd/display/dc/dml/calcs/dcn_calcs.c<br>
<br>
Hi all,<br>
<br>
This isn't a v2, but actually a v1, I apologize for the mistake.<br>
<br>
--<br>
Isabella Basso<br>
</div>
</span></font></div>
</div>
</body>
</html>