drm/amd/display: Program OTG vtotal min/max selectors unconditionally
authorAurabindo Pillai <aurabindo.pillai@amd.com>
Tue, 21 Mar 2023 15:31:22 +0000 (11:31 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 24 Apr 2023 22:36:46 +0000 (18:36 -0400)
OTG_V_TOTAL_MIN/MAX_SEL bits are required to be programmed to 1 if
writes to OTG timing registers need to be honoured. This is usually
needed only when freesync is active. However, SubVP + DRR requires that
we're able to change timing even without freesync being active (but
supported). By unconditionally writing this bit to 1, we remove an
unnecessary dependency so that DMCUB can change OTG timing whenever it wants.

Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_optc.c

index 2ee798965bc2b326aa67fc29cb0feec4ecf99c65..6ef56fb32131dd341beeb8e4fb7732dd6a83f5a3 100644 (file)
@@ -245,16 +245,9 @@ static void optc32_set_drr(
                }
 
                optc->funcs->set_vtotal_min_max(optc, params->vertical_total_min - 1, params->vertical_total_max - 1);
-               optc32_setup_manual_trigger(optc);
-       } else {
-               REG_UPDATE_4(OTG_V_TOTAL_CONTROL,
-                               OTG_SET_V_TOTAL_MIN_MASK, 0,
-                               OTG_V_TOTAL_MIN_SEL, 0,
-                               OTG_V_TOTAL_MAX_SEL, 0,
-                               OTG_FORCE_LOCK_ON_EVENT, 0);
-
-               optc->funcs->set_vtotal_min_max(optc, 0, 0);
        }
+
+       optc32_setup_manual_trigger(optc);
 }
 
 static struct timing_generator_funcs dcn32_tg_funcs = {