drm/radeon: Fix "slow" audio over DP on DCE8+
DP audio is derived from the dfs clock. Signed-off-by: Slava Grigorev <slava.grigorev@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
This commit is contained in:

committed by
Alex Deucher

parent
ee1782c3f2
commit
ac4a9350ab
@@ -301,6 +301,22 @@ void dce6_dp_audio_set_dto(struct radeon_device *rdev,
|
||||
* is the numerator, DCCG_AUDIO_DTOx_MODULE is the denominator
|
||||
*/
|
||||
if (ASIC_IS_DCE8(rdev)) {
|
||||
unsigned int div = (RREG32(DENTIST_DISPCLK_CNTL) &
|
||||
DENTIST_DPREFCLK_WDIVIDER_MASK) >>
|
||||
DENTIST_DPREFCLK_WDIVIDER_SHIFT;
|
||||
|
||||
if (div < 128 && div >= 96)
|
||||
div -= 64;
|
||||
else if (div >= 64)
|
||||
div = div / 2 - 16;
|
||||
else if (div >= 8)
|
||||
div /= 4;
|
||||
else
|
||||
div = 0;
|
||||
|
||||
if (div)
|
||||
clock = rdev->clock.gpupll_outputfreq * 10 / div;
|
||||
|
||||
WREG32(DCE8_DCCG_AUDIO_DTO1_PHASE, 24000);
|
||||
WREG32(DCE8_DCCG_AUDIO_DTO1_MODULE, clock);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user