Skip to content

Commit 1f4400a

Browse files
committed
drm/amd/display: clear optc underflow before turn off odm clock
jira VULN-69264 cve CVE-2022-49969 commit-author Fudong Wang <[email protected]> commit b2a9349 [Why] After ODM clock off, optc underflow bit will be kept there always and clear not work. We need to clear that before clock off. [How] Clear that if have when clock off. Reviewed-by: Alvin Lee <[email protected]> Acked-by: Tom Chung <[email protected]> Signed-off-by: Fudong Wang <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]> (cherry picked from commit b2a9349) Signed-off-by: Jonathan Maple <[email protected]>
1 parent 68d123a commit 1f4400a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,11 @@ void optc1_enable_optc_clock(struct timing_generator *optc, bool enable)
464464
OTG_CLOCK_ON, 1,
465465
1, 1000);
466466
} else {
467+
468+
//last chance to clear underflow, otherwise, it will always there due to clock is off.
469+
if (optc->funcs->is_optc_underflow_occurred(optc) == true)
470+
optc->funcs->clear_optc_underflow(optc);
471+
467472
REG_UPDATE_2(OTG_CLOCK_CONTROL,
468473
OTG_CLOCK_GATE_DIS, 0,
469474
OTG_CLOCK_EN, 0);

0 commit comments

Comments
 (0)