Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

radeon/audio: fix DP audio on DCE6

Split DCE6 and DCE8 programming of DCCG_AUDIO_DTO1
registers to properly enable DP audio for both DCE
revisions.

Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Slava Grigorev and committed by
Alex Deucher
2afa3265 b983a8f4

+12 -4
+10 -2
drivers/gpu/drm/radeon/dce6_afmt.c
··· 26 26 #include "radeon_audio.h" 27 27 #include "sid.h" 28 28 29 + #define DCE8_DCCG_AUDIO_DTO1_PHASE 0x05b8 30 + #define DCE8_DCCG_AUDIO_DTO1_MODULE 0x05bc 31 + 29 32 u32 dce6_endpoint_rreg(struct radeon_device *rdev, 30 33 u32 block_offset, u32 reg) 31 34 { ··· 287 284 * number (coefficient of two integer numbers. DCCG_AUDIO_DTOx_PHASE 288 285 * is the numerator, DCCG_AUDIO_DTOx_MODULE is the denominator 289 286 */ 290 - WREG32(DCCG_AUDIO_DTO1_PHASE, 24000); 291 - WREG32(DCCG_AUDIO_DTO1_MODULE, clock); 287 + if (ASIC_IS_DCE8(rdev)) { 288 + WREG32(DCE8_DCCG_AUDIO_DTO1_PHASE, 24000); 289 + WREG32(DCE8_DCCG_AUDIO_DTO1_MODULE, clock); 290 + } else { 291 + WREG32(DCCG_AUDIO_DTO1_PHASE, 24000); 292 + WREG32(DCCG_AUDIO_DTO1_MODULE, clock); 293 + } 292 294 } 293 295 294 296 void dce6_dp_enable(struct drm_encoder *encoder, bool enable)
+2 -2
drivers/gpu/drm/radeon/sid.h
··· 912 912 913 913 #define DCCG_AUDIO_DTO0_PHASE 0x05b0 914 914 #define DCCG_AUDIO_DTO0_MODULE 0x05b4 915 - #define DCCG_AUDIO_DTO1_PHASE 0x05b8 916 - #define DCCG_AUDIO_DTO1_MODULE 0x05bc 915 + #define DCCG_AUDIO_DTO1_PHASE 0x05c0 916 + #define DCCG_AUDIO_DTO1_MODULE 0x05c4 917 917 918 918 #define AFMT_AUDIO_SRC_CONTROL 0x713c 919 919 #define AFMT_AUDIO_SRC_SELECT(x) (((x) & 7) << 0)