Skip to content

Commit 576a868

Browse files
committed
drm/amd/display: clear optc underflow before turn off odm clock
jira VULN-69260 cve CVE-2022-49969 commit-author Fudong Wang <Fudong.Wang@amd.com> 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 <alvin.lee2@amd.com> Acked-by: Tom Chung <chiahsuan.chung@amd.com> Signed-off-by: Fudong Wang <Fudong.Wang@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit b2a9349) Signed-off-by: Roxana Nicolescu <rnicolescu@ciq.com> Signed-off-by: Roxana Nicolescu <rnicolescu@ciq.com>
1 parent ca47d0b commit 576a868

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
@@ -480,6 +480,11 @@ void optc1_enable_optc_clock(struct timing_generator *optc, bool enable)
480480
OTG_CLOCK_ON, 1,
481481
1, 1000);
482482
} else {
483+
484+
//last chance to clear underflow, otherwise, it will always there due to clock is off.
485+
if (optc->funcs->is_optc_underflow_occurred(optc) == true)
486+
optc->funcs->clear_optc_underflow(optc);
487+
483488
REG_UPDATE_2(OTG_CLOCK_CONTROL,
484489
OTG_CLOCK_GATE_DIS, 0,
485490
OTG_CLOCK_EN, 0);

0 commit comments

Comments
 (0)