Commit d3a450ae authored by Leon Huang's avatar Leon Huang Committed by Alex Deucher
Browse files

drm/amd/display: Refactor HPD IRQ error checking flow



[Why]
HPD error status does not cover Replay desync error status
while executing autotests and CTS tests.

[How]
Refactor the checking flow, reporting the HPD error based on
different eDP feature.

Reviewed-by: default avatarRobin Chen <robin.chen@amd.com>
Signed-off-by: default avatarLeon Huang <Leon.Huang1@amd.com>
Signed-off-by: default avatarHamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent dfb214ec
Loading
Loading
Loading
Loading
+3 −13
Original line number Diff line number Diff line
@@ -221,21 +221,11 @@ static void handle_hpd_irq_replay_sink(struct dc_link *link)
		&replay_error_status.raw,
		sizeof(replay_error_status.raw));

	link->replay_settings.config.replay_error_status.bits.LINK_CRC_ERROR =
		replay_error_status.bits.LINK_CRC_ERROR;
	link->replay_settings.config.replay_error_status.bits.DESYNC_ERROR =
		replay_configuration.bits.DESYNC_ERROR_STATUS;
	link->replay_settings.config.replay_error_status.bits.STATE_TRANSITION_ERROR =
		replay_configuration.bits.STATE_TRANSITION_ERROR_STATUS;

	if (link->replay_settings.config.replay_error_status.bits.LINK_CRC_ERROR ||
		link->replay_settings.config.replay_error_status.bits.DESYNC_ERROR ||
		link->replay_settings.config.replay_error_status.bits.STATE_TRANSITION_ERROR) {
	if (replay_error_status.bits.LINK_CRC_ERROR ||
		replay_configuration.bits.DESYNC_ERROR_STATUS ||
		replay_configuration.bits.STATE_TRANSITION_ERROR_STATUS) {
		bool allow_active;

		if (link->replay_settings.config.replay_error_status.bits.DESYNC_ERROR)
			link->replay_settings.config.received_desync_error_hpd = 1;

		if (link->replay_settings.config.force_disable_desync_error_check)
			return;