Skip to content

Commit e3615bd

Browse files
committed
drm/amd/display: fix corruption with high refresh rates on DCN 3.0
This reverts commit bc87d66 and the register changes from commit 6d4279c. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3412 Cc: [email protected] Cc: Rodrigo Siqueira <[email protected]> Tested-by: Mikhail Gavrilov <[email protected]> Reviewed-by: Rodrigo Siqueira <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected] # 6.10.x
1 parent 4b0eb9c commit e3615bd

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

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

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -945,19 +945,10 @@ 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-
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);
960948
}
949+
950+
// Setup manual flow control for EOF via TRIG_A
951+
optc->funcs->setup_manual_trigger(optc);
961952
}
962953

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

drivers/gpu/drm/amd/display/dc/optc/dcn20/dcn20_optc.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,16 @@ void optc2_setup_manual_trigger(struct timing_generator *optc)
453453
{
454454
struct optc *optc1 = DCN10TG_FROM_TG(optc);
455455

456+
/* Set the min/max selectors unconditionally so that
457+
* DMCUB fw may change OTG timings when necessary
458+
* TODO: Remove the w/a after fixing the issue in DMCUB firmware
459+
*/
460+
REG_UPDATE_4(OTG_V_TOTAL_CONTROL,
461+
OTG_V_TOTAL_MIN_SEL, 1,
462+
OTG_V_TOTAL_MAX_SEL, 1,
463+
OTG_FORCE_LOCK_ON_EVENT, 0,
464+
OTG_SET_V_TOTAL_MIN_MASK, (1 << 1)); /* TRIGA */
465+
456466
REG_SET_8(OTG_TRIGA_CNTL, 0,
457467
OTG_TRIGA_SOURCE_SELECT, 21,
458468
OTG_TRIGA_SOURCE_PIPE_SELECT, optc->inst,

0 commit comments

Comments
 (0)