]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amd/display: Move desync error counter operation up.
authorJack Chang <jack.chang@amd.com>
Thu, 19 Dec 2024 08:10:18 +0000 (16:10 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 21 Apr 2025 15:27:32 +0000 (11:27 -0400)
[Why & How]
Move desync error counter operation up to prevent
it from being skipped by force disable desync
error.

Reviewed-by: Robin Chen <robin.chen@amd.com>
Reviewed-by: Aric Cyr <aric.cyr@amd.com>
Signed-off-by: Jack Chang <jack.chang@amd.com>
Signed-off-by: Zaeem Mohamed <zaeem.mohamed@amd.com>
Tested-by: Mark Broadworth <mark.broadworth@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_irq_handler.c

index 5be00e4ce10b31aa303193ac55344c90ed5a60d5..991b8ad4984b6c1e9169364854e7568a824e7600 100644 (file)
@@ -229,6 +229,10 @@ static void handle_hpd_irq_replay_sink(struct dc_link *link)
 
                link->replay_settings.config.replay_error_status.raw |= replay_error_status.raw;
 
+               /* Increment desync error counter if a desync error is detected */
+               if (replay_configuration.bits.DESYNC_ERROR_STATUS)
+                       link->replay_settings.replay_desync_error_fail_count++;
+
                if (link->replay_settings.config.force_disable_desync_error_check)
                        return;
 
@@ -240,9 +244,6 @@ 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,