]> www.infradead.org Git - users/hch/configfs.git/commitdiff
drm/amd/display: restore immediate_disable_crtc for w/a
authorCharlene Liu <Charlene.Liu@amd.com>
Tue, 16 Jul 2024 17:47:43 +0000 (13:47 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Sat, 27 Jul 2024 21:32:15 +0000 (17:32 -0400)
[why]
immediate_disable_crtc does not reset ODM.  if switching to disable_crtc
which will disable ODM as well.  i.e. need to restore ODM mem cfg at
reenable it at end of w/a.

Signed-off-by: Charlene Liu <Charlene.Liu@amd.com>
Reviewed-by: Xi (Alex) Liu <xi.liu@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
drivers/gpu/drm/amd/display/dc/optc/dcn31/dcn31_optc.c

index 2d5bd5c7ab94985d36ffe7a2e083f9b49a15f344..e075b2720f964a5e614ddb92a3c9aff500693768 100644 (file)
@@ -149,8 +149,8 @@ static void dcn35_disable_otg_wa(struct clk_mgr *clk_mgr_base, struct dc_state *
                        !pipe->stream->link_enc) && !stream_changed_otg_dig_on) {
                        /* This w/a should not trigger when we have a dig active */
                        if (disable) {
-                               if (pipe->stream_res.tg && pipe->stream_res.tg->funcs->disable_crtc)
-                                       pipe->stream_res.tg->funcs->disable_crtc(pipe->stream_res.tg);
+                               if (pipe->stream_res.tg && pipe->stream_res.tg->funcs->immediate_disable_crtc)
+                                       pipe->stream_res.tg->funcs->immediate_disable_crtc(pipe->stream_res.tg);
 
                                reset_sync_context_for_pipe(dc, context, i);
                        } else {
index 6bbbf313b2bbf6fe7bebacf653f8dd67b128a682..4b6446ed4ce471a0c762f4baefbc238b987a25ae 100644 (file)
@@ -149,7 +149,9 @@ static bool optc31_disable_crtc(struct timing_generator *optc)
 
        return true;
 }
-
+/*
+ * Immediate_Disable_Crtc - this is to temp disable Timing generator without reset ODM.
+ */
 bool optc31_immediate_disable_crtc(struct timing_generator *optc)
 {
        struct optc *optc1 = DCN10TG_FROM_TG(optc);
@@ -162,10 +164,12 @@ bool optc31_immediate_disable_crtc(struct timing_generator *optc)
                        VTG0_ENABLE, 0);
 
        /* CRTC disabled, so disable  clock. */
-       REG_WAIT(OTG_CLOCK_CONTROL,
+       if (optc->ctx->dce_environment != DCE_ENV_DIAG)
+               REG_WAIT(OTG_CLOCK_CONTROL,
                        OTG_BUSY, 0,
                        1, 100000);
 
+
        /* clear the false state */
        optc1_clear_optc_underflow(optc);