Commit 7d8a4bff authored by Jack Chang's avatar Jack Chang Committed by Alex Deucher
Browse files

drm/amd/display: Add replay desync error count tracking and reset functionality



[Why & How]
Build-up get/reset desync error count interface and implement the functions.

Reviewed-by: default avatarChunTao Tso <chuntao.tso@amd.com>
Reviewed-by: default avatarRobin Chen <robin.chen@amd.com>
Signed-off-by: default avatarJack Chang <jack.chang@amd.com>
Signed-off-by: default avatarTom Chung <chiahsuan.chung@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 59fb2d06
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1147,6 +1147,8 @@ struct replay_settings {
	uint16_t abm_with_ips_on_full_screen_video_pseudo_vtotal;
	/* Replay last pseudo vtotal set to DMUB */
	uint16_t last_pseudo_vtotal;
	/* Replay desync error */
	uint32_t replay_desync_error_fail_count;
};

/* To split out "global" and "per-panel" config settings.
+3 −0
Original line number Diff line number Diff line
@@ -239,6 +239,9 @@ static void handle_hpd_irq_replay_sink(struct dc_link *link)
			&replay_configuration.raw,
			sizeof(replay_configuration.raw));

		/* Update desync error counter */
		link->replay_settings.replay_desync_error_fail_count++;

		/* Acknowledge and clear error bits */
		dm_helpers_dp_write_dpcd(
			link->ctx,
+5 −0
Original line number Diff line number Diff line
@@ -1039,3 +1039,8 @@ bool fill_custom_backlight_caps(unsigned int config_no, struct dm_acpi_atif_back
	memcpy(caps->data_points, custom_backlight_profiles[config_no].data_points, data_points_size);
	return true;
}

void reset_replay_dsync_error_count(struct dc_link *link)
{
	link->replay_settings.replay_desync_error_fail_count = 0;
}
+1 −0
Original line number Diff line number Diff line
@@ -78,4 +78,5 @@ bool psr_su_set_dsc_slice_height(struct dc *dc, struct dc_link *link,

bool fill_custom_backlight_caps(unsigned int config_no,
		struct dm_acpi_atif_backlight_caps *caps);
void reset_replay_dsync_error_count(struct dc_link *link);
#endif /* MODULES_POWER_POWER_HELPERS_H_ */