drm/amd/display: guard otg disable w/a for test
authorMuhammad Ahmed <ahmed.ahmed@amd.com>
Wed, 31 Jul 2024 22:55:57 +0000 (18:55 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 13 Aug 2024 14:32:41 +0000 (10:32 -0400)
[why & how]
HW removed this w/a, but we will still keep it to avoid regression.
but return in test mode.

Reviewed-by: Charlene Liu <charlene.liu@amd.com>
Signed-off-by: Muhammad Ahmed <ahmed.ahmed@amd.com>
Signed-off-by: Tom Chung <chiahsuan.chung@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/clk_mgr/dcn35/dcn35_clk_mgr.c

index e075b27..e2d9063 100644 (file)
@@ -126,6 +126,9 @@ static void dcn35_disable_otg_wa(struct clk_mgr *clk_mgr_base, struct dc_state *
        struct dc *dc = clk_mgr_base->ctx->dc;
        int i;
 
+       if (dc->ctx->dce_environment == DCE_ENV_DIAG)
+               return;
+
        for (i = 0; i < dc->res_pool->pipe_count; ++i) {
                struct pipe_ctx *old_pipe = &dc->current_state->res_ctx.pipe_ctx[i];
                struct pipe_ctx *new_pipe = &context->res_ctx.pipe_ctx[i];