drm/amd/display: Introduce flag for disabling Replay desync recovery
authorDennis Chan <Dennis.Chan@amd.com>
Wed, 3 May 2023 06:20:17 +0000 (14:20 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 7 Nov 2023 16:17:34 +0000 (11:17 -0500)
[why]
It's useful to disable the recovery mechanism when debugging replay
desync errors.

Signed-off-by: Dennis Chan <Dennis.Chan@amd.com>
Acked-by: Hersen Wu <hersenxs.wu@amd.com>
Reviewed-by: Robin Chen <robin.chen@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dc_types.h
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_irq_handler.c

index 40dc51853d62a92334cea5811dce0201f76273cb..bb159b6b1b76218c59463c834c160e10fb732c7e 100644 (file)
@@ -1037,7 +1037,8 @@ struct replay_config {
        bool replay_smu_opt_supported;                  // SMU optimization is supported
        unsigned int replay_enable_option;              // Replay enablement option
        uint32_t debug_flags;                           // Replay debug flags
-       bool replay_timing_sync_supported;             // Replay desync is supported
+       bool replay_timing_sync_supported; // Replay desync is supported
+       bool force_disable_desync_error_check;             // Replay desync is supported
        union replay_error_status replay_error_status; // Replay error status
 };
 
index 34bf8a9ef7380938d063476c466fb902cc974c04..fc14c364414433c63ecb70aafb44596c4745a6bc 100644 (file)
@@ -190,6 +190,9 @@ static bool handle_hpd_irq_replay_sink(struct dc_link *link)
        /*AMD Replay version reuse DP_PSR_ERROR_STATUS for REPLAY_ERROR status.*/
        union psr_error_status replay_error_status;
 
+       if (link->replay_settings.config.force_disable_desync_error_check)
+               return true;
+
        if (!link->replay_settings.replay_feature_enabled)
                return false;