Skip to contentSkip to conversation

drm/amdgpu/display: extend DCN guard in dal_bios_parser_init_cmd_tbl_helper2

PATCH In review Alex Deucher 3 participants 11 messages Feb 12, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 drm/amdgpu/display: extend DCN guard in dal_bios_parser_init_cmd_tbl_helper2

To cover DCN 2.x.

---
 .../drm/amd/display/dc/bios/command_table_helper2.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)
drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c +3 -10
index 7388c987c595..204d7942a6e5 100644
@@ -53,25 +53,18 @@ bool dal_bios_parser_init_cmd_tbl_helper2(
 
 	case DCE_VERSION_11_2:
 	case DCE_VERSION_11_22:
+	case DCE_VERSION_12_0:
+	case DCE_VERSION_12_1:
 		*h = dal_cmd_tbl_helper_dce112_get_table2();
 		return true;
 #if defined(CONFIG_DRM_AMD_DC_DCN)
 	case DCN_VERSION_1_0:
 	case DCN_VERSION_1_01:
-		*h = dal_cmd_tbl_helper_dce112_get_table2();
-		return true;
-#endif
-
 	case DCN_VERSION_2_0:
-		*h = dal_cmd_tbl_helper_dce112_get_table2();
-		return true;
 	case DCN_VERSION_2_1:
 		*h = dal_cmd_tbl_helper_dce112_get_table2();
 		return true;
-	case DCE_VERSION_12_0:
-	case DCE_VERSION_12_1:
-		*h = dal_cmd_tbl_helper_dce112_get_table2();
-		return true;
+#endif
 
 	default:
 		/* Unsupported DCE */
Signature · 6 lines
2.24.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#1 lore raw

PATCH 2/3 drm/amdgpu/display: extend DCN guards

to cover dcn2.x related headers.

---
 drivers/gpu/drm/amd/display/dc/core/dc_resource.c  | 4 ++--
 drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c   | 2 +-
 drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +2 -2
index a65a1e7820d6..c02e5994d32b 100644
@@ -46,12 +46,12 @@
 #include "dce100/dce100_resource.h"
 #include "dce110/dce110_resource.h"
 #include "dce112/dce112_resource.h"
+#include "dce120/dce120_resource.h"
 #if defined(CONFIG_DRM_AMD_DC_DCN)
 #include "dcn10/dcn10_resource.h"
-#endif
 #include "dcn20/dcn20_resource.h"
 #include "dcn21/dcn21_resource.h"
-#include "dce120/dce120_resource.h"
+#endif
 
 #define DC_LOGGER_INIT(logger)
 
drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c +1 -1
index d2d36d48caaa..f252af1947c3 100644
@@ -47,9 +47,9 @@
 #include "dce120/hw_factory_dce120.h"
 #if defined(CONFIG_DRM_AMD_DC_DCN)
 #include "dcn10/hw_factory_dcn10.h"
-#endif
 #include "dcn20/hw_factory_dcn20.h"
 #include "dcn21/hw_factory_dcn21.h"
+#endif
 
 #include "diagnostics/hw_factory_diag.h"
 
drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c +1 -1
index 5d396657a1ee..04e2c0f74cb0 100644
@@ -45,9 +45,9 @@
 #include "dce120/hw_translate_dce120.h"
 #if defined(CONFIG_DRM_AMD_DC_DCN)
 #include "dcn10/hw_translate_dcn10.h"
-#endif
 #include "dcn20/hw_translate_dcn20.h"
 #include "dcn21/hw_translate_dcn21.h"
+#endif
 
 #include "diagnostics/hw_translate_diag.h"
 
Signature · 6 lines
2.24.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by on v1 2/3
#2 lore raw

RE: [PATCH 2/3] drm/amdgpu/display: extend DCN guards

Quoted 10 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: 2020/February/11, Tuesday 11:33 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH 2/3] drm/amdgpu/display: extend DCN guards

Quoted 3 lines

to cover dcn2.x related headers.

This patch is:

Quoted 61 lines
---
 drivers/gpu/drm/amd/display/dc/core/dc_resource.c  | 4 ++--
 drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c   | 2 +-
 drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +2 -2
index a65a1e7820d6..c02e5994d32b 100644
@@ -46,12 +46,12 @@
 #include "dce100/dce100_resource.h"
 #include "dce110/dce110_resource.h"
 #include "dce112/dce112_resource.h"
+#include "dce120/dce120_resource.h"
 #if defined(CONFIG_DRM_AMD_DC_DCN)
 #include "dcn10/dcn10_resource.h"
-#endif
 #include "dcn20/dcn20_resource.h"
 #include "dcn21/dcn21_resource.h"
-#include "dce120/dce120_resource.h"
+#endif
 
 #define DC_LOGGER_INIT(logger)
 
drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c +1 -1
index d2d36d48caaa..f252af1947c3 100644
@@ -47,9 +47,9 @@
 #include "dce120/hw_factory_dce120.h"
 #if defined(CONFIG_DRM_AMD_DC_DCN)
 #include "dcn10/hw_factory_dcn10.h"
-#endif
 #include "dcn20/hw_factory_dcn20.h"
 #include "dcn21/hw_factory_dcn21.h"
+#endif
 
 #include "diagnostics/hw_factory_diag.h"
 
drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c +1 -2
index 5d396657a1ee..04e2c0f74cb0 100644
@@ -45,9 +45,9 @@
 #include "dce120/hw_translate_dce120.h"
 #if defined(CONFIG_DRM_AMD_DC_DCN)
 #include "dcn10/hw_translate_dcn10.h"
-#endif
 #include "dcn20/hw_translate_dcn20.h"
 #include "dcn21/hw_translate_dcn21.h"
+#endif
 
 #include "diagnostics/hw_translate_diag.h"
 
--

2.24.1

Quoted 3 lines

_______________________________________________
amd-gfx mailing list
[email protected]

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Tested-by on v1 2/3
#3 lore raw

Re: [PATCH 2/3] drm/amdgpu/display: extend DCN guards

In reply to Alex Deucher
Quoted 65 lines · Alex Deucher

to cover dcn2.x related headers.

---
 drivers/gpu/drm/amd/display/dc/core/dc_resource.c  | 4 ++--
 drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c   | 2 +-
 drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +2 -2
index a65a1e7820d6..c02e5994d32b 100644
@@ -46,12 +46,12 @@
 #include "dce100/dce100_resource.h"
 #include "dce110/dce110_resource.h"
 #include "dce112/dce112_resource.h"
+#include "dce120/dce120_resource.h"
 #if defined(CONFIG_DRM_AMD_DC_DCN)
 #include "dcn10/dcn10_resource.h"
-#endif
 #include "dcn20/dcn20_resource.h"
 #include "dcn21/dcn21_resource.h"
-#include "dce120/dce120_resource.h"
+#endif
 
 #define DC_LOGGER_INIT(logger)
 
drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c +1 -1
index d2d36d48caaa..f252af1947c3 100644
@@ -47,9 +47,9 @@
 #include "dce120/hw_factory_dce120.h"
 #if defined(CONFIG_DRM_AMD_DC_DCN)
 #include "dcn10/hw_factory_dcn10.h"
-#endif
 #include "dcn20/hw_factory_dcn20.h"
 #include "dcn21/hw_factory_dcn21.h"
+#endif
 
 #include "diagnostics/hw_factory_diag.h"
 
drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c +1 -1
index 5d396657a1ee..04e2c0f74cb0 100644
@@ -45,9 +45,9 @@
 #include "dce120/hw_translate_dce120.h"
 #if defined(CONFIG_DRM_AMD_DC_DCN)
 #include "dcn10/hw_translate_dcn10.h"
-#endif
 #include "dcn20/hw_translate_dcn20.h"
 #include "dcn21/hw_translate_dcn21.h"
+#endif
 
 #include "diagnostics/hw_translate_diag.h"
 
Signature · 6 lines
2.24.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7CRodrigo.Siqueira%40amd.com%7C912d22aa09094b1fb87a08d7af74b20a%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637170788079229843&amp;sdata=45YxJwNoUm5ViV3ouldnO2eCqeD4C3S%2FLyfLY4VRvs0%3D&amp;reserved=0
Signature · 3 lines
Rodrigo Siqueira
Software Engineer, Advanced Micro Devices (AMD)
https://siqueira.tech

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#4 lore raw

PATCH 3/3 drm/amdgpu/display move get_num_odm_splits() into dc_resource.c

In reply to Alex Deucher

It's used by more than just DCN2.0. Fixes missing symbol when amdgpu is built without DCN support.

---
 .../gpu/drm/amd/display/dc/core/dc_resource.c    | 16 ++++++++++++++++
 .../drm/amd/display/dc/dcn20/dcn20_resource.c    | 16 ----------------
 .../drm/amd/display/dc/dcn20/dcn20_resource.h    |  1 -
 drivers/gpu/drm/amd/display/dc/inc/resource.h    |  3 +++
 4 files changed, 19 insertions(+), 17 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +16 -0
index c02e5994d32b..572ce3842535 100644
@@ -532,6 +532,22 @@ static inline void get_vp_scan_direction(
 		*flip_horz_scan_dir = !*flip_horz_scan_dir;
 }
 
+int get_num_odm_splits(struct pipe_ctx *pipe)
+{
+	int odm_split_count = 0;
+	struct pipe_ctx *next_pipe = pipe->next_odm_pipe;
+	while (next_pipe) {
+		odm_split_count++;
+		next_pipe = next_pipe->next_odm_pipe;
+	}
+	pipe = pipe->prev_odm_pipe;
+	while (pipe) {
+		odm_split_count++;
+		pipe = pipe->prev_odm_pipe;
+	}
+	return odm_split_count;
+}
+
 static void calculate_split_count_and_index(struct pipe_ctx *pipe_ctx, int *split_count, int *split_idx)
 {
 	*split_count = get_num_odm_splits(pipe_ctx);
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +0 -16
index 39026df56fa6..1061faccec9c 100644
@@ -1861,22 +1861,6 @@ void dcn20_populate_dml_writeback_from_context(
 
 }
 
-int get_num_odm_splits(struct pipe_ctx *pipe)
-{
-	int odm_split_count = 0;
-	struct pipe_ctx *next_pipe = pipe->next_odm_pipe;
-	while (next_pipe) {
-		odm_split_count++;
-		next_pipe = next_pipe->next_odm_pipe;
-	}
-	pipe = pipe->prev_odm_pipe;
-	while (pipe) {
-		odm_split_count++;
-		pipe = pipe->prev_odm_pipe;
-	}
-	return odm_split_count;
-}
-
 int dcn20_populate_dml_pipes_from_context(
 		struct dc *dc, struct dc_state *context, display_e2e_pipe_params_st *pipes)
 {
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.h +0 -1
index 5180088ab6bc..f5893840b79b 100644
@@ -49,7 +49,6 @@ unsigned int dcn20_calc_max_scaled_time(
 		unsigned int time_per_pixel,
 		enum mmhubbub_wbif_mode mode,
 		unsigned int urgent_watermark);
-int get_num_odm_splits(struct pipe_ctx *pipe);
 int dcn20_populate_dml_pipes_from_context(
 		struct dc *dc, struct dc_state *context, display_e2e_pipe_params_st *pipes);
 struct pipe_ctx *dcn20_acquire_idle_pipe_for_layer(
drivers/gpu/drm/amd/display/dc/inc/resource.h +3 -0
index 5ae8ada154ef..ca4c36c0c9bc 100644
@@ -179,4 +179,7 @@ unsigned int resource_pixel_format_to_bpp(enum surface_pixel_format format);
 
 void get_audio_check(struct audio_info *aud_modes,
 	struct audio_check *aud_chk);
+
+int get_num_odm_splits(struct pipe_ctx *pipe);
+
 #endif /* DRIVERS_GPU_DRM_AMD_DC_DEV_DC_INC_RESOURCE_H_ */
Signature · 6 lines
2.24.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#5 lore raw

RE: [PATCH 3/3] drm/amdgpu/display move get_num_odm_splits() into dc_resource.c

Please find my reply inline.

Thanks,
Zhan

Quoted 80 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: 2020/February/11, Tuesday 11:33 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH 3/3] drm/amdgpu/display move get_num_odm_splits() into dc_resource.c

It's used by more than just DCN2.0. Fixes missing symbol when amdgpu is built without DCN support.

---
 .../gpu/drm/amd/display/dc/core/dc_resource.c    | 16 ++++++++++++++++
 .../drm/amd/display/dc/dcn20/dcn20_resource.c    | 16 ----------------
 .../drm/amd/display/dc/dcn20/dcn20_resource.h    |  1 -
 drivers/gpu/drm/amd/display/dc/inc/resource.h    |  3 +++
 4 files changed, 19 insertions(+), 17 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +15 -0
index c02e5994d32b..572ce3842535 100644
@@ -532,6 +532,22 @@ static inline void get_vp_scan_direction(
 		*flip_horz_scan_dir = !*flip_horz_scan_dir;  }
 
+int get_num_odm_splits(struct pipe_ctx *pipe) {
+	int odm_split_count = 0;
+	struct pipe_ctx *next_pipe = pipe->next_odm_pipe;
+	while (next_pipe) {
+		odm_split_count++;
+		next_pipe = next_pipe->next_odm_pipe;
+	}
+	pipe = pipe->prev_odm_pipe;
+	while (pipe) {
+		odm_split_count++;
+		pipe = pipe->prev_odm_pipe;
+	}
+	return odm_split_count;
+}
+
 static void calculate_split_count_and_index(struct pipe_ctx *pipe_ctx, int
 *split_count, int *split_idx)  {
 	*split_count = get_num_odm_splits(pipe_ctx); diff --git

a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c index 39026df56fa6..1061faccec9c 100644

drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +0 -0
@@ -1861,22 +1861,6 @@ void

dcn20_populate_dml_writeback_from_context(

}

drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +0 -15
-int get_num_odm_splits(struct pipe_ctx *pipe) -{
-	int odm_split_count = 0;
-	struct pipe_ctx *next_pipe = pipe->next_odm_pipe;
-	while (next_pipe) {
-		odm_split_count++;
-		next_pipe = next_pipe->next_odm_pipe;
-	}
-	pipe = pipe->prev_odm_pipe;
-	while (pipe) {
-		odm_split_count++;
-		pipe = pipe->prev_odm_pipe;
-	}
-	return odm_split_count;
-}
-
 int dcn20_populate_dml_pipes_from_context(
 		struct dc *dc, struct dc_state *context,

display_e2e_pipe_params_st *pipes) { diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.h b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.h index 5180088ab6bc..f5893840b79b 100644

drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.h unsigned int dcn20_calc_max_scaled_time( · line 52

Quoted 4 lines
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.h +0 -1
@@ -49,7 +49,6 @@ unsigned int dcn20_calc_max_scaled_time(
 		unsigned int time_per_pixel,
 		enum mmhubbub_wbif_mode mode,
 		unsigned int urgent_watermark);
-int get_num_odm_splits(struct pipe_ctx *pipe);  int

Seems like the "int" at the end of this line actually belongs to the next line. I am wondering is it a typo or a format-patch glitch?

Quoted 21 lines

dcn20_populate_dml_pipes_from_context(
struct dc *dc, struct dc_state *context,
display_e2e_pipe_params_st *pipes); struct pipe_ctx *dcn20_acquire_idle_pipe_for_layer(

drivers/gpu/drm/amd/display/dc/inc/resource.h +3 -0
index 5ae8ada154ef..ca4c36c0c9bc 100644
@@ -179,4 +179,7 @@ unsigned int resource_pixel_format_to_bpp(enum
 surface_pixel_format format);
 
 void get_audio_check(struct audio_info *aud_modes,
 	struct audio_check *aud_chk);
+
+int get_num_odm_splits(struct pipe_ctx *pipe);
+

#endif /* DRIVERS_GPU_DRM_AMD_DC_DEV_DC_INC_RESOURCE_H_ */
--
2.24.1

Quoted 3 lines

_______________________________________________
amd-gfx mailing list
[email protected]

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#6 lore raw

Re: [PATCH 3/3] drm/amdgpu/display move get_num_odm_splits() into dc_resource.c

Quoted 85 lines · Zhan

Please find my reply inline.

Thanks,
Zhan

Quoted 79 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: 2020/February/11, Tuesday 11:33 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH 3/3] drm/amdgpu/display move get_num_odm_splits() into dc_resource.c

It's used by more than just DCN2.0. Fixes missing symbol when amdgpu is built without DCN support.

---
 .../gpu/drm/amd/display/dc/core/dc_resource.c    | 16 ++++++++++++++++
 .../drm/amd/display/dc/dcn20/dcn20_resource.c    | 16 ----------------
 .../drm/amd/display/dc/dcn20/dcn20_resource.h    |  1 -
 drivers/gpu/drm/amd/display/dc/inc/resource.h    |  3 +++
 4 files changed, 19 insertions(+), 17 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +15 -0
index c02e5994d32b..572ce3842535 100644
@@ -532,6 +532,22 @@ static inline void get_vp_scan_direction(
              *flip_horz_scan_dir = !*flip_horz_scan_dir;  }
 
+int get_num_odm_splits(struct pipe_ctx *pipe) {
+     int odm_split_count = 0;
+     struct pipe_ctx *next_pipe = pipe->next_odm_pipe;
+     while (next_pipe) {
+             odm_split_count++;
+             next_pipe = next_pipe->next_odm_pipe;
+     }
+     pipe = pipe->prev_odm_pipe;
+     while (pipe) {
+             odm_split_count++;
+             pipe = pipe->prev_odm_pipe;
+     }
+     return odm_split_count;
+}
+
 static void calculate_split_count_and_index(struct pipe_ctx *pipe_ctx, int
 *split_count, int *split_idx)  {
      *split_count = get_num_odm_splits(pipe_ctx); diff --git

a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c index 39026df56fa6..1061faccec9c 100644

drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +0 -0
@@ -1861,22 +1861,6 @@ void

dcn20_populate_dml_writeback_from_context(

}

drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +0 -15
-int get_num_odm_splits(struct pipe_ctx *pipe) -{
-     int odm_split_count = 0;
-     struct pipe_ctx *next_pipe = pipe->next_odm_pipe;
-     while (next_pipe) {
-             odm_split_count++;
-             next_pipe = next_pipe->next_odm_pipe;
-     }
-     pipe = pipe->prev_odm_pipe;
-     while (pipe) {
-             odm_split_count++;
-             pipe = pipe->prev_odm_pipe;
-     }
-     return odm_split_count;
-}
-
 int dcn20_populate_dml_pipes_from_context(
              struct dc *dc, struct dc_state *context,

display_e2e_pipe_params_st *pipes) { diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.h b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.h index 5180088ab6bc..f5893840b79b 100644

drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.h +0 -0
Quoted 8 lines

drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.h unsigned int dcn20_calc_max_scaled_time( · line 52

Quoted 5 lines
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.h +0 -1
@@ -49,7 +49,6 @@ unsigned int dcn20_calc_max_scaled_time(
              unsigned int time_per_pixel,
              enum mmhubbub_wbif_mode mode,
              unsigned int urgent_watermark);
-int get_num_odm_splits(struct pipe_ctx *pipe);  int

Seems like the "int" at the end of this line actually belongs to the next line. I am wondering is it a typo or a format-patch glitch?

Actual patch is correct:
https://cgit.freedesktop.org/~agd5f/linux/commit/?h=drm-next&id=c8d2c8eaa3bbcaf8e2bc20f3e3203ed444f90bcc

Quoted 22 lines
Quoted 22 lines

dcn20_populate_dml_pipes_from_context(
struct dc *dc, struct dc_state *context,
display_e2e_pipe_params_st *pipes); struct pipe_ctx *dcn20_acquire_idle_pipe_for_layer(

drivers/gpu/drm/amd/display/dc/inc/resource.h +3 -0
index 5ae8ada154ef..ca4c36c0c9bc 100644
@@ -179,4 +179,7 @@ unsigned int resource_pixel_format_to_bpp(enum
 surface_pixel_format format);
 
 void get_audio_check(struct audio_info *aud_modes,
      struct audio_check *aud_chk);
+
+int get_num_odm_splits(struct pipe_ctx *pipe);
+

#endif /* DRIVERS_GPU_DRM_AMD_DC_DEV_DC_INC_RESOURCE_H_ */
--
2.24.1

Quoted 3 lines
Quoted 3 lines

_______________________________________________
amd-gfx mailing list
[email protected]

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#7 lore raw

RE: [PATCH 3/3] drm/amdgpu/display move get_num_odm_splits() into dc_resource.c

Quoted 106 lines

-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: 2020/February/12, Wednesday 11:05 AM
To: Liu, Zhan <[email protected]>
Cc: [email protected]; Deucher, Alexander <[email protected]>
Subject: Re: [PATCH 3/3] drm/amdgpu/display move get_num_odm_splits() into dc_resource.c

Quoted 21 lines · Zhan

Please find my reply inline.

Thanks,
Zhan

Quoted 15 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: 2020/February/11, Tuesday 11:33 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH 3/3] drm/amdgpu/display move get_num_odm_splits() into dc_resource.c

It's used by more than just DCN2.0. Fixes missing symbol when amdgpu is built without DCN support.

---
 .../gpu/drm/amd/display/dc/core/dc_resource.c    | 16

++++++++++++++++

Quoted 64 lines
Quoted 64 lines
 .../drm/amd/display/dc/dcn20/dcn20_resource.c    | 16 ----------------
 .../drm/amd/display/dc/dcn20/dcn20_resource.h    |  1 -
 drivers/gpu/drm/amd/display/dc/inc/resource.h    |  3 +++
 4 files changed, 19 insertions(+), 17 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +15 -0
index c02e5994d32b..572ce3842535 100644
@@ -532,6 +532,22 @@ static inline void get_vp_scan_direction(
              *flip_horz_scan_dir = !*flip_horz_scan_dir;  }
 
+int get_num_odm_splits(struct pipe_ctx *pipe) {
+     int odm_split_count = 0;
+     struct pipe_ctx *next_pipe = pipe->next_odm_pipe;
+     while (next_pipe) {
+             odm_split_count++;
+             next_pipe = next_pipe->next_odm_pipe;
+     }
+     pipe = pipe->prev_odm_pipe;
+     while (pipe) {
+             odm_split_count++;
+             pipe = pipe->prev_odm_pipe;
+     }
+     return odm_split_count;
+}
+
 static void calculate_split_count_and_index(struct pipe_ctx
 *pipe_ctx, int *split_count, int *split_idx)  {
      *split_count = get_num_odm_splits(pipe_ctx); diff --git

a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c index 39026df56fa6..1061faccec9c 100644

drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +0 -0
@@ -1861,22 +1861,6 @@ void

dcn20_populate_dml_writeback_from_context(

}

drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +0 -15
-int get_num_odm_splits(struct pipe_ctx *pipe) -{
-     int odm_split_count = 0;
-     struct pipe_ctx *next_pipe = pipe->next_odm_pipe;
-     while (next_pipe) {
-             odm_split_count++;
-             next_pipe = next_pipe->next_odm_pipe;
-     }
-     pipe = pipe->prev_odm_pipe;
-     while (pipe) {
-             odm_split_count++;
-             pipe = pipe->prev_odm_pipe;
-     }
-     return odm_split_count;
-}
-
 int dcn20_populate_dml_pipes_from_context(
              struct dc *dc, struct dc_state *context,

display_e2e_pipe_params_st *pipes) { diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.h b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.h index 5180088ab6bc..f5893840b79b 100644

drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.h +0 -0
Quoted 8 lines
Quoted 5 lines
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.h +0 -0
@@ -49,7 +49,6 @@ unsigned int dcn20_calc_max_scaled_time(
              unsigned int time_per_pixel,
              enum mmhubbub_wbif_mode mode,
              unsigned int urgent_watermark); -int

get_num_odm_splits(struct pipe_ctx *pipe); int

Seems like the "int" at the end of this line actually belongs to the next line. I am wondering is it a typo or a format-patch glitch?

Quoted 2 lines

Actual patch is correct:
https://cgit.freedesktop.org/~agd5f/linux/commit/?h=drm-next&id=c8d2c8eaa3bbcaf8e2bc20f3e3203ed444f90bcc

I see. Thx!

This patch (and this patch series) is reviewed by:
Zhan Liu <[email protected]>

Quoted 15 lines
Quoted 12 lines

drivers/gpu/drm/amd/display/dc/inc/resource.h unsigned int

Quoted 12 lines

dcn20_populate_dml_pipes_from_context(
struct dc *dc, struct dc_state *context,
display_e2e_pipe_params_st *pipes); struct pipe_ctx *dcn20_acquire_idle_pipe_for_layer(

drivers/gpu/drm/amd/display/dc/inc/resource.h +0 -0
index 5ae8ada154ef..ca4c36c0c9bc 100644
@@ -179,4 +179,7 @@ unsigned int

resource_pixel_format_to_bpp(enum

Quoted 2 lines
Quoted 2 lines
drivers/gpu/drm/amd/display/dc/inc/resource.h +0 -0
 surface_pixel_format format);
 
Quoted 13 lines
Quoted 6 lines
Quoted 6 lines
drivers/gpu/drm/amd/display/dc/inc/resource.h +3 -0
 void get_audio_check(struct audio_info *aud_modes,
      struct audio_check *aud_chk);
+
+int get_num_odm_splits(struct pipe_ctx *pipe);
+

#endif /* DRIVERS_GPU_DRM_AMD_DC_DEV_DC_INC_RESOURCE_H_

*/

Quoted 6 lines
Quoted 6 lines

--
2.24.1

_______________________________________________
amd-gfx mailing list
[email protected]

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Tested-by on v1 3/3
#8 lore raw

Re: [PATCH 3/3] drm/amdgpu/display move get_num_odm_splits() into dc_resource.c

In reply to Alex Deucher
Quoted 96 lines · Alex Deucher

It's used by more than just DCN2.0. Fixes missing symbol when amdgpu is built without DCN support.

---
 .../gpu/drm/amd/display/dc/core/dc_resource.c    | 16 ++++++++++++++++
 .../drm/amd/display/dc/dcn20/dcn20_resource.c    | 16 ----------------
 .../drm/amd/display/dc/dcn20/dcn20_resource.h    |  1 -
 drivers/gpu/drm/amd/display/dc/inc/resource.h    |  3 +++
 4 files changed, 19 insertions(+), 17 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +16 -0
index c02e5994d32b..572ce3842535 100644
@@ -532,6 +532,22 @@ static inline void get_vp_scan_direction(
 		*flip_horz_scan_dir = !*flip_horz_scan_dir;
 }
 
+int get_num_odm_splits(struct pipe_ctx *pipe)
+{
+	int odm_split_count = 0;
+	struct pipe_ctx *next_pipe = pipe->next_odm_pipe;
+	while (next_pipe) {
+		odm_split_count++;
+		next_pipe = next_pipe->next_odm_pipe;
+	}
+	pipe = pipe->prev_odm_pipe;
+	while (pipe) {
+		odm_split_count++;
+		pipe = pipe->prev_odm_pipe;
+	}
+	return odm_split_count;
+}
+
 static void calculate_split_count_and_index(struct pipe_ctx *pipe_ctx, int *split_count, int *split_idx)
 {
 	*split_count = get_num_odm_splits(pipe_ctx);
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +0 -16
index 39026df56fa6..1061faccec9c 100644
@@ -1861,22 +1861,6 @@ void dcn20_populate_dml_writeback_from_context(
 
 }
 
-int get_num_odm_splits(struct pipe_ctx *pipe)
-{
-	int odm_split_count = 0;
-	struct pipe_ctx *next_pipe = pipe->next_odm_pipe;
-	while (next_pipe) {
-		odm_split_count++;
-		next_pipe = next_pipe->next_odm_pipe;
-	}
-	pipe = pipe->prev_odm_pipe;
-	while (pipe) {
-		odm_split_count++;
-		pipe = pipe->prev_odm_pipe;
-	}
-	return odm_split_count;
-}
-
 int dcn20_populate_dml_pipes_from_context(
 		struct dc *dc, struct dc_state *context, display_e2e_pipe_params_st *pipes)
 {
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.h +0 -1
index 5180088ab6bc..f5893840b79b 100644
@@ -49,7 +49,6 @@ unsigned int dcn20_calc_max_scaled_time(
 		unsigned int time_per_pixel,
 		enum mmhubbub_wbif_mode mode,
 		unsigned int urgent_watermark);
-int get_num_odm_splits(struct pipe_ctx *pipe);
 int dcn20_populate_dml_pipes_from_context(
 		struct dc *dc, struct dc_state *context, display_e2e_pipe_params_st *pipes);
 struct pipe_ctx *dcn20_acquire_idle_pipe_for_layer(
drivers/gpu/drm/amd/display/dc/inc/resource.h +3 -0
index 5ae8ada154ef..ca4c36c0c9bc 100644
@@ -179,4 +179,7 @@ unsigned int resource_pixel_format_to_bpp(enum surface_pixel_format format);
 
 void get_audio_check(struct audio_info *aud_modes,
 	struct audio_check *aud_chk);
+
+int get_num_odm_splits(struct pipe_ctx *pipe);
+
 #endif /* DRIVERS_GPU_DRM_AMD_DC_DEV_DC_INC_RESOURCE_H_ */
Signature · 6 lines
2.24.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7CRodrigo.Siqueira%40amd.com%7Ce2697beeff3847ea057408d7af74b286%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637170788143697503&amp;sdata=XUELq7%2FDPfX%2FifA635o5DUd09JSwzPIXZkYjB107Jk8%3D&amp;reserved=0
Signature · 3 lines
Rodrigo Siqueira
Software Engineer, Advanced Micro Devices (AMD)
https://siqueira.tech

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by on v1 1/3
#9 lore raw
In reply to Alex Deucher
Quoted 10 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: 2020/February/11, Tuesday 11:33 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH 1/3] drm/amdgpu/display: extend DCN guard in dal_bios_parser_init_cmd_tbl_helper2

Quoted 3 lines

To cover DCN 2.x.

This patch is:

Quoted 41 lines
---
 .../drm/amd/display/dc/bios/command_table_helper2.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)
drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c +3 -11
index 7388c987c595..204d7942a6e5 100644
@@ -53,25 +53,18 @@ bool dal_bios_parser_init_cmd_tbl_helper2(
 
 	case DCE_VERSION_11_2:
 	case DCE_VERSION_11_22:
+	case DCE_VERSION_12_0:
+	case DCE_VERSION_12_1:
 		*h = dal_cmd_tbl_helper_dce112_get_table2();
 		return true;
 #if defined(CONFIG_DRM_AMD_DC_DCN)
 	case DCN_VERSION_1_0:
 	case DCN_VERSION_1_01:
-		*h = dal_cmd_tbl_helper_dce112_get_table2();
-		return true;
-#endif
-
 	case DCN_VERSION_2_0:
-		*h = dal_cmd_tbl_helper_dce112_get_table2();
-		return true;
 	case DCN_VERSION_2_1:
 		*h = dal_cmd_tbl_helper_dce112_get_table2();
 		return true;
-	case DCE_VERSION_12_0:
-	case DCE_VERSION_12_1:
-		*h = dal_cmd_tbl_helper_dce112_get_table2();
-		return true;
+#endif
 
 	default:
 		/* Unsupported DCE */
--

2.24.1

Quoted 3 lines

_______________________________________________
amd-gfx mailing list
[email protected]

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Tested-by on v1 1/3
#10 lore raw
In reply to Alex Deucher
Quoted 47 lines · Alex Deucher

To cover DCN 2.x.

---
 .../drm/amd/display/dc/bios/command_table_helper2.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)
drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c +3 -10
index 7388c987c595..204d7942a6e5 100644
@@ -53,25 +53,18 @@ bool dal_bios_parser_init_cmd_tbl_helper2(
 
 	case DCE_VERSION_11_2:
 	case DCE_VERSION_11_22:
+	case DCE_VERSION_12_0:
+	case DCE_VERSION_12_1:
 		*h = dal_cmd_tbl_helper_dce112_get_table2();
 		return true;
 #if defined(CONFIG_DRM_AMD_DC_DCN)
 	case DCN_VERSION_1_0:
 	case DCN_VERSION_1_01:
-		*h = dal_cmd_tbl_helper_dce112_get_table2();
-		return true;
-#endif
-
 	case DCN_VERSION_2_0:
-		*h = dal_cmd_tbl_helper_dce112_get_table2();
-		return true;
 	case DCN_VERSION_2_1:
 		*h = dal_cmd_tbl_helper_dce112_get_table2();
 		return true;
-	case DCE_VERSION_12_0:
-	case DCE_VERSION_12_1:
-		*h = dal_cmd_tbl_helper_dce112_get_table2();
-		return true;
+#endif
 
 	default:
 		/* Unsupported DCE */
Signature · 6 lines
2.24.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7CRodrigo.Siqueira%40amd.com%7Cab3f299a5c754444f05c08d7af74afbd%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637170788041384449&amp;sdata=jsO5pK4dLty0gy%2BNBQxRzJrR%2B9htMcinVWz7oR0fjS8%3D&amp;reserved=0
Signature · 3 lines
Rodrigo Siqueira
Software Engineer, Advanced Micro Devices (AMD)
https://siqueira.tech

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx