Skip to content

Commit bc87d66

Browse files
Rodrigo Siqueiraalexdeucher
authored andcommitted
drm/amd/display: Add fallback configuration for set DRR in DCN10
Set OTG/OPTC parameters to 0 if something goes wrong on DCN10. Acked-by: Hamza Mahfooz <[email protected]> Signed-off-by: Rodrigo Siqueira <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent d76c0a2 commit bc87d66

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

drivers/gpu/drm/amd/display/dc/optc/dcn10/dcn10_optc.c

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -945,10 +945,19 @@ void optc1_set_drr(
945945
OTG_FORCE_LOCK_ON_EVENT, 0,
946946
OTG_SET_V_TOTAL_MIN_MASK_EN, 0,
947947
OTG_SET_V_TOTAL_MIN_MASK, 0);
948-
}
949948

950-
// Setup manual flow control for EOF via TRIG_A
951-
optc->funcs->setup_manual_trigger(optc);
949+
// Setup manual flow control for EOF via TRIG_A
950+
optc->funcs->setup_manual_trigger(optc);
951+
952+
} else {
953+
REG_UPDATE_4(OTG_V_TOTAL_CONTROL,
954+
OTG_SET_V_TOTAL_MIN_MASK, 0,
955+
OTG_V_TOTAL_MIN_SEL, 0,
956+
OTG_V_TOTAL_MAX_SEL, 0,
957+
OTG_FORCE_LOCK_ON_EVENT, 0);
958+
959+
optc->funcs->set_vtotal_min_max(optc, 0, 0);
960+
}
952961
}
953962

954963
void optc1_set_vtotal_min_max(struct timing_generator *optc, int vtotal_min, int vtotal_max)

0 commit comments

Comments
 (0)