Blob Blame History Raw
From: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Date: Thu, 12 Oct 2017 22:45:25 -0400
Subject: drm/amd/display: Minor update to DML
Git-commit: 3eea71e36fcd04d0a3e735ee3cf4dbbe9934e3c8
Patch-mainline: v4.15-rc1
References: FATE#326289 FATE#326079 FATE#326049 FATE#322398 FATE#326166

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Petr Tesarik <ptesarik@suse.com>
---
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c |    3 ++-
 drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.c     |    6 ------
 drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.h     |    1 -
 drivers/gpu/drm/amd/display/dc/dml/display_mode_structs.h |    7 ++-----
 drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.c     |    9 +--------
 drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h     |    1 -
 6 files changed, 5 insertions(+), 22 deletions(-)

--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
@@ -2015,10 +2015,11 @@ static void dcn10_power_on_fe(
 				plane_state->dst_rect.height);
 
 		dm_logger_write(dc->ctx->logger, LOG_DC,
-				"Pipe %d: width, height, x, y\n"
+				"Pipe %d: width, height, x, y         format:%d\n"
 				"viewport:%d, %d, %d, %d\n"
 				"recout:  %d, %d, %d, %d\n",
 				pipe_ctx->pipe_idx,
+				plane_state->format,
 				pipe_ctx->plane_res.scl_data.viewport.width,
 				pipe_ctx->plane_res.scl_data.viewport.height,
 				pipe_ctx->plane_res.scl_data.viewport.x,
--- a/drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.c
+++ b/drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.c
@@ -127,17 +127,11 @@ static void set_ip_params(struct _vcs_dp
 	}
 }
 
-static void set_mode_evaluation(struct _vcs_dpi_mode_evaluation_st *me, enum dml_project project)
-{
-	me->voltage_override = dm_vmin;
-}
-
 void dml_init_instance(struct display_mode_lib *lib, enum dml_project project)
 {
 	if (lib->project != project) {
 		set_soc_bounding_box(&lib->soc, project);
 		set_ip_params(&lib->ip, project);
-		set_mode_evaluation(&lib->me, project);
 		lib->project = project;
 	}
 }
--- a/drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.h
+++ b/drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.h
@@ -40,7 +40,6 @@ enum dml_project {
 struct display_mode_lib {
 	struct _vcs_dpi_ip_params_st ip;
 	struct _vcs_dpi_soc_bounding_box_st soc;
-	struct _vcs_dpi_mode_evaluation_st me;
 	enum dml_project project;
 	struct vba_vars_st vba;
 	struct dal_logger *logger;
--- a/drivers/gpu/drm/amd/display/dc/dml/display_mode_structs.h
+++ b/drivers/gpu/drm/amd/display/dc/dml/display_mode_structs.h
@@ -27,7 +27,6 @@
 
 typedef struct _vcs_dpi_voltage_scaling_st	voltage_scaling_st;
 typedef struct _vcs_dpi_soc_bounding_box_st	soc_bounding_box_st;
-typedef struct _vcs_dpi_mode_evaluation_st	mode_evaluation_st;
 typedef struct _vcs_dpi_ip_params_st	ip_params_st;
 typedef struct _vcs_dpi_display_pipe_source_params_st	display_pipe_source_params_st;
 typedef struct _vcs_dpi_display_output_params_st	display_output_params_st;
@@ -60,10 +59,6 @@ typedef struct _vcs_dpi_display_dlg_pref
 typedef struct _vcs_dpi_display_pipe_clock_st	display_pipe_clock_st;
 typedef struct _vcs_dpi_display_arb_params_st	display_arb_params_st;
 
-struct _vcs_dpi_mode_evaluation_st {
-	int voltage_override;
-};
-
 struct _vcs_dpi_voltage_scaling_st {
 	int state;
 	double dscclk_mhz;
@@ -96,6 +91,7 @@ struct	_vcs_dpi_soc_bounding_box_st	{
 	double fabric_datapath_to_dcn_data_return_bytes;
 	double dcn_downspread_percent;
 	double dispclk_dppclk_vco_speed_mhz;
+	double dfs_vco_period_ps;
 	unsigned int	round_trip_ping_latency_dcfclk_cycles;
 	unsigned int	urgent_out_of_order_return_per_channel_bytes;
 	unsigned int	channel_interleave_bytes;
@@ -105,6 +101,7 @@ struct	_vcs_dpi_soc_bounding_box_st	{
 	double	dram_clock_change_latency_us;
 	double	writeback_dram_clock_change_latency_us;
 	unsigned int	return_bus_width_bytes;
+	unsigned int	voltage_override;
 	double	xfc_bus_transport_time_us;
 	double	xfc_xbuf_latency_tolerance_us;
 	struct _vcs_dpi_voltage_scaling_st clock_limits[7];
--- a/drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.c
+++ b/drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.c
@@ -251,19 +251,14 @@ unsigned int dml_get_voltage_level(
 		const display_e2e_pipe_params_st *pipes,
 		unsigned int num_pipes)
 {
-	bool need_recalculate = memcmp(
-			&mode_lib->soc,
-			&mode_lib->vba.soc,
-			sizeof(mode_lib->vba.soc)) != 0
+	bool need_recalculate = memcmp(&mode_lib->soc, &mode_lib->vba.soc, sizeof(mode_lib->vba.soc)) != 0
 			|| memcmp(&mode_lib->ip, &mode_lib->vba.ip, sizeof(mode_lib->vba.ip)) != 0
-			|| memcmp(&mode_lib->me, &mode_lib->vba.me, sizeof(mode_lib->vba.me)) != 0
 			|| num_pipes != mode_lib->vba.cache_num_pipes
 			|| memcmp(pipes, mode_lib->vba.cache_pipes,
 					sizeof(display_e2e_pipe_params_st) * num_pipes) != 0;
 
 	mode_lib->vba.soc = mode_lib->soc;
 	mode_lib->vba.ip = mode_lib->ip;
-	mode_lib->vba.me = mode_lib->me;
 	memcpy(mode_lib->vba.cache_pipes, pipes, sizeof(*pipes) * num_pipes);
 	mode_lib->vba.cache_num_pipes = num_pipes;
 
@@ -772,7 +767,6 @@ static void recalculate_params(
 	// This is only safe to use memcmp because there are non-POD types in struct display_mode_lib
 	if (memcmp(&mode_lib->soc, &mode_lib->vba.soc, sizeof(mode_lib->vba.soc)) != 0
 			|| memcmp(&mode_lib->ip, &mode_lib->vba.ip, sizeof(mode_lib->vba.ip)) != 0
-			|| memcmp(&mode_lib->me, &mode_lib->vba.me, sizeof(mode_lib->vba.me)) != 0
 			|| num_pipes != mode_lib->vba.cache_num_pipes
 			|| memcmp(
 					pipes,
@@ -780,7 +774,6 @@ static void recalculate_params(
 					sizeof(display_e2e_pipe_params_st) * num_pipes) != 0) {
 		mode_lib->vba.soc = mode_lib->soc;
 		mode_lib->vba.ip = mode_lib->ip;
-		mode_lib->vba.me = mode_lib->me;
 		memcpy(mode_lib->vba.cache_pipes, pipes, sizeof(*pipes) * num_pipes);
 		mode_lib->vba.cache_num_pipes = num_pipes;
 		recalculate(mode_lib);
--- a/drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h
+++ b/drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h
@@ -98,7 +98,6 @@ bool Calculate256BBlockSizes(
 struct vba_vars_st {
 	ip_params_st	ip;
 	soc_bounding_box_st	soc;
-	mode_evaluation_st me;
 
 	unsigned int MaximumMaxVStartupLines;
 	double cursor_bw[DC__NUM_DPP__MAX];