summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/gpu/drm/radeon/evergreen_hdmi.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/gpu/drm/radeon/evergreen_hdmi.c')
-rw-r--r--kernel/drivers/gpu/drm/radeon/evergreen_hdmi.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/drivers/gpu/drm/radeon/evergreen_hdmi.c b/kernel/drivers/gpu/drm/radeon/evergreen_hdmi.c
index 9953356fe..3cf04a2f4 100644
--- a/kernel/drivers/gpu/drm/radeon/evergreen_hdmi.c
+++ b/kernel/drivers/gpu/drm/radeon/evergreen_hdmi.c
@@ -289,6 +289,16 @@ void dce4_dp_audio_set_dto(struct radeon_device *rdev,
* number (coefficient of two integer numbers. DCCG_AUDIO_DTOx_PHASE
* is the numerator, DCCG_AUDIO_DTOx_MODULE is the denominator
*/
+ if (ASIC_IS_DCE41(rdev)) {
+ unsigned int div = (RREG32(DCE41_DENTIST_DISPCLK_CNTL) &
+ DENTIST_DPREFCLK_WDIVIDER_MASK) >>
+ DENTIST_DPREFCLK_WDIVIDER_SHIFT;
+ div = radeon_audio_decode_dfs_div(div);
+
+ if (div)
+ clock = 100 * clock / div;
+ }
+
WREG32(DCCG_AUDIO_DTO1_PHASE, 24000);
WREG32(DCCG_AUDIO_DTO1_MODULE, clock);
}