Commit 3eea71e3 authored by Dmytro Laktyushkin's avatar Dmytro Laktyushkin Committed by Alex Deucher
Browse files

drm/amd/display: Minor update to DML

parent f63d8906
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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,
+0 −6
Original line number Diff line number Diff line
@@ -127,17 +127,11 @@ static void set_ip_params(struct _vcs_dpi_ip_params_st *ip, enum dml_project pro
	}
}

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;
	}
}
+0 −1
Original line number Diff line number Diff line
@@ -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;
+2 −5
Original line number Diff line number Diff line
@@ -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_prefetch_param_st display_dlg_prefetch_param
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];
+1 −8
Original line number Diff line number Diff line
@@ -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);
Loading