drm/amd/display: Add DC debug option to force LTTPR mode
authorMichael Strauss <michael.strauss@amd.com>
Wed, 17 Aug 2022 14:57:10 +0000 (10:57 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 29 Aug 2022 21:58:47 +0000 (17:58 -0400)
[WHY]
Useful for external teams debugging LTTPR issues

Reviewed-by: George Shen <George.Shen@amd.com>
Acked-by: Brian Chang <Brian.Chang@amd.com>
Signed-off-by: Michael Strauss <michael.strauss@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/core/dc_link_dp.c
drivers/gpu/drm/amd/display/dc/dc.h

index 4c04b5f..d2bdf39 100644 (file)
@@ -5032,6 +5032,10 @@ static void determine_lttpr_mode(struct dc_link *link)
        bool vbios_lttpr_enable = link->dc->caps.vbios_lttpr_enable;
        bool vbios_lttpr_interop = link->dc->caps.vbios_lttpr_aware;
 
+       if (link->ctx->dc->debug.lttpr_mode_override != 0) {
+               link->lttpr_mode = link->ctx->dc->debug.lttpr_mode_override;
+               return;
+       }
 
        if ((link->dc->config.allow_lttpr_non_transparent_mode.bits.DP2_0 &&
                        link->dpcd_caps.channel_coding_cap.bits.DP_128b_132b_SUPPORTED)) {
index 2362d5e..473e6a0 100644 (file)
@@ -846,6 +846,7 @@ struct dc_debug_options {
        bool exit_idle_opt_for_cursor_updates;
        bool enable_single_display_2to1_odm_policy;
        bool enable_dp_dig_pixel_rate_div_policy;
+       enum lttpr_mode lttpr_mode_override;
 };
 
 struct gpu_info_soc_bounding_box_v1_0;