Skip to contentSkip to conversation

SWDEV-311259 - dc: move FPU associated DCN302 code to DML

PATCH In review Jasdeep Dhillon 2 participants 2 messages Dec 23, 2021 – Jan 4, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 SWDEV-311259 - dc: move FPU associated DCN302 code to DML

[Why & How]
As part of the FPU isolation work documented in
https://patchwork.freedesktop.org/series/93042/, isolate code that uses FPU in DCN302 to DML, where all FPU code should locate.

---
 CMakeLists.txt              |   1 +
 dc/dcn302/Makefile          |  43 ++--
 dc/dcn302/dcn302_resource.c | 340 +-------------------------------
 dc/dcn302/dcn302_resource.h |   3 +
 dc/dml/Makefile             |   2 +
 dc/dml/dcn302/dcn302_fpu.c  | 381 ++++++++++++++++++++++++++++++++++++
 dc/dml/dcn302/dcn302_fpu.h  |  32 +++
 7 files changed, 448 insertions(+), 354 deletions(-)
 create mode 100644 dc/dml/dcn302/dcn302_fpu.c
 create mode 100644 dc/dml/dcn302/dcn302_fpu.h
CMakeLists.txt +1 -0
index 01c6724df..dfee2cd38 100644
@@ -243,6 +243,7 @@ list (APPEND srcs "dc/dcn301/dcn301_hubbub.c")
 list (APPEND srcs "dc/dcn302/dcn302_init.c")
 list (APPEND srcs "dc/dcn302/dcn302_hwseq.c")
 list (APPEND srcs "dc/dcn302/dcn302_resource.c")
+list (APPEND srcs "dc/dml/dcn302/dcn302_fpu.c")
 list (APPEND srcs "dc/dcn303/dcn303_init.c")
 list (APPEND srcs "dc/dcn303/dcn303_hwseq.c")
 list (APPEND srcs "dc/dcn303/dcn303_resource.c")
dc/dcn302/Makefile +19 -24

61 lines not on this page · raw message

dc/dcn302/dcn302_resource.c +10 -330

374 lines not on this page · raw message

dc/dcn302/dcn302_resource.h +3 -0
index 42d2c73e3..9f24e73b9 100644
@@ -28,6 +28,9 @@
 
 #include "core_types.h"
 
+extern struct _vcs_dpi_ip_params_st dcn3_02_ip;
+extern struct _vcs_dpi_soc_bounding_box_st dcn3_02_soc;
+
 struct resource_pool *dcn302_create_resource_pool(const struct dc_init_data *init_data, struct dc *dc);
 
 void dcn302_update_bw_bounding_box(struct dc *dc, struct clk_bw_params *bw_params);
dc/dml/Makefile +2 -0
index d8e03ca15..f55f28fe3 100644
@@ -73,6 +73,7 @@ CFLAGS_$(AMDDALPATH)/dc/dml/dcn30/frl_cap_chk_30.o := $(dml_ccflags)
 #endif
 endif
 CFLAGS_$(AMDDALPATH)/dc/dml/dcn301/dcn301_fpu.o := $(dml_ccflags)
+CFLAGS_$(AMDDALPATH)/dc/dml/dcn302/dcn302_fpu.o := $(dml_ccflags)
 ifdef CONFIG_DRM_AMD_DC_DCN3_1
 CFLAGS_$(AMDDALPATH)/dc/dml/dcn31/display_mode_vba_31.o := $(dml_ccflags) -Wframe-larger-than=2048
 CFLAGS_$(AMDDALPATH)/dc/dml/dcn31/display_rq_dlg_calc_31.o := $(dml_ccflags)
@@ -103,6 +104,7 @@ DML += dcn30/frl_cap_chk_30.o
 #endif
 endif
 DML += dcn301/dcn301_fpu.o
+DML += dcn302/dcn302_fpu.o
 ifdef CONFIG_DRM_AMD_DC_DCN3_1
 DML += dcn31/display_mode_vba_31.o dcn31/display_rq_dlg_calc_31.o
 endif
dc/dml/dcn302/dcn302_fpu.c new file +381 -0

381 lines not on this page · raw message

dc/dml/dcn302/dcn302_fpu.h new file +32 -0
new file mode 100644
index 000000000..548305d96
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2019-2021 Advanced Micro Devices, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Authors: AMD
+ *
+ */
+
+#ifndef __DCN302_FPU_H__
+#define __DCN302_FPU_H__
+
+void dcn302_fpu_init_soc_bounding_box(struct bp_soc_bb_info bb_info);
+void dcn302_fpu_update_bw_bounding_box(struct dc *dc, struct clk_bw_params *bw_params);
+
+#endif /* __DCN302_FPU_H__*/
Signature · 1 line
2.25.1
#1 lore raw

[AMD Official Use Only]

Please fix the patch title. E.g.,
drm/amdgpu/display: move FPU associated DCN302 code to DML
________________________________
From: amd-gfx <[email protected]> on behalf of Jasdeep Dhillon <[email protected]>
Sent: Thursday, December 23, 2021 1:36 PM
To: [email protected] <[email protected]>
Cc: Wang, Chao-kai (Stylon) <[email protected]>; Chiu, Solomon <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Wentland, Harry <[email protected]>; Zhuo, Qingqing (Lillian) <[email protected]>; Dhillon, Jasdeep <[email protected]>; Siqueira, Rodrigo <[email protected]>; Li, Roman <[email protected]>; [email protected] <[email protected]>; Pillai, Aurabindo <[email protected]>; Lin, Wayne <[email protected]>; Lipski, Mikita <[email protected]>; Lakha, Bhawanpreet <[email protected]>; Koenig, Christian <[email protected]>; Gutierrez, Agustin <[email protected]>; Kotarac, Pavle <[email protected]>
Subject: [PATCH] SWDEV-311259 - dc: move FPU associated DCN302 code to DML

[Why & How]
As part of the FPU isolation work documented in
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchwork.freedesktop.org%2Fseries%2F93042%2F&amp;data=04%7C01%7Calexander.deucher%40amd.com%7C94e344c52d824ae7be1108d9c6432a7a%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637758814062989362%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=XPEcMjZOJ4rGxJ9I3p1pQUChzYcNj86oMgyKFEHPXPA%3D&amp;reserved=0, isolate code that uses FPU in DCN302 to DML, where all FPU code
should locate.

---
 CMakeLists.txt              |   1 +
 dc/dcn302/Makefile          |  43 ++--
 dc/dcn302/dcn302_resource.c | 340 +-------------------------------
 dc/dcn302/dcn302_resource.h |   3 +
 dc/dml/Makefile             |   2 +
 dc/dml/dcn302/dcn302_fpu.c  | 381 ++++++++++++++++++++++++++++++++++++
 dc/dml/dcn302/dcn302_fpu.h  |  32 +++
 7 files changed, 448 insertions(+), 354 deletions(-)
 create mode 100644 dc/dml/dcn302/dcn302_fpu.c
 create mode 100644 dc/dml/dcn302/dcn302_fpu.h
CMakeLists.txt +1 -0
index 01c6724df..dfee2cd38 100644
@@ -243,6 +243,7 @@ list (APPEND srcs "dc/dcn301/dcn301_hubbub.c")
 list (APPEND srcs "dc/dcn302/dcn302_init.c")
 list (APPEND srcs "dc/dcn302/dcn302_hwseq.c")
 list (APPEND srcs "dc/dcn302/dcn302_resource.c")
+list (APPEND srcs "dc/dml/dcn302/dcn302_fpu.c")
 list (APPEND srcs "dc/dcn303/dcn303_init.c")
 list (APPEND srcs "dc/dcn303/dcn303_hwseq.c")
 list (APPEND srcs "dc/dcn303/dcn303_resource.c")
dc/dcn302/Makefile +19 -24

61 lines not on this page · raw message

dc/dcn302/dcn302_resource.c +10 -330

374 lines not on this page · raw message

dc/dcn302/dcn302_resource.h +3 -0
index 42d2c73e3..9f24e73b9 100644
@@ -28,6 +28,9 @@
 
 #include "core_types.h"
 
+extern struct _vcs_dpi_ip_params_st dcn3_02_ip;
+extern struct _vcs_dpi_soc_bounding_box_st dcn3_02_soc;
+
 struct resource_pool *dcn302_create_resource_pool(const struct dc_init_data *init_data, struct dc *dc);
 
 void dcn302_update_bw_bounding_box(struct dc *dc, struct clk_bw_params *bw_params);
dc/dml/Makefile +2 -0
index d8e03ca15..f55f28fe3 100644
@@ -73,6 +73,7 @@ CFLAGS_$(AMDDALPATH)/dc/dml/dcn30/frl_cap_chk_30.o := $(dml_ccflags)
 #endif
 endif
 CFLAGS_$(AMDDALPATH)/dc/dml/dcn301/dcn301_fpu.o := $(dml_ccflags)
+CFLAGS_$(AMDDALPATH)/dc/dml/dcn302/dcn302_fpu.o := $(dml_ccflags)
 ifdef CONFIG_DRM_AMD_DC_DCN3_1
 CFLAGS_$(AMDDALPATH)/dc/dml/dcn31/display_mode_vba_31.o := $(dml_ccflags) -Wframe-larger-than=2048
 CFLAGS_$(AMDDALPATH)/dc/dml/dcn31/display_rq_dlg_calc_31.o := $(dml_ccflags)
@@ -103,6 +104,7 @@ DML += dcn30/frl_cap_chk_30.o
 #endif
 endif
 DML += dcn301/dcn301_fpu.o
+DML += dcn302/dcn302_fpu.o
 ifdef CONFIG_DRM_AMD_DC_DCN3_1
 DML += dcn31/display_mode_vba_31.o dcn31/display_rq_dlg_calc_31.o
 endif
dc/dml/dcn302/dcn302_fpu.c new file +381 -0

381 lines not on this page · raw message

dc/dml/dcn302/dcn302_fpu.h new file +32 -0
new file mode 100644
index 000000000..548305d96
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2019-2021 Advanced Micro Devices, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Authors: AMD
+ *
+ */
+
+#ifndef __DCN302_FPU_H__
+#define __DCN302_FPU_H__
+
+void dcn302_fpu_init_soc_bounding_box(struct bp_soc_bb_info bb_info);
+void dcn302_fpu_update_bw_bounding_box(struct dc *dc, struct clk_bw_params *bw_params);
+
+#endif /* __DCN302_FPU_H__*/

--
2.25.1