Skip to content

Commit 2afa326

Browse files
Slava Grigorevalexdeucher
authored andcommitted
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>
1 parent b983a8f commit 2afa326

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

‎drivers/gpu/drm/radeon/dce6_afmt.c‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
#include "radeon_audio.h"
2727
#include "sid.h"
2828

29+
#define DCE8_DCCG_AUDIO_DTO1_PHASE 0x05b8
30+
#define DCE8_DCCG_AUDIO_DTO1_MODULE 0x05bc
31+
2932
u32 dce6_endpoint_rreg(struct radeon_device *rdev,
3033
u32 block_offset, u32 reg)
3134
{
@@ -284,8 +287,13 @@ void dce6_dp_audio_set_dto(struct radeon_device *rdev,
284287
* number (coefficient of two integer numbers. DCCG_AUDIO_DTOx_PHASE
285288
* is the numerator, DCCG_AUDIO_DTOx_MODULE is the denominator
286289
*/
287-
WREG32(DCCG_AUDIO_DTO1_PHASE, 24000);
288-
WREG32(DCCG_AUDIO_DTO1_MODULE, clock);
290+
if (ASIC_IS_DCE8(rdev)) {
291+
WREG32(DCE8_DCCG_AUDIO_DTO1_PHASE, 24000);
292+
WREG32(DCE8_DCCG_AUDIO_DTO1_MODULE, clock);
293+
} else {
294+
WREG32(DCCG_AUDIO_DTO1_PHASE, 24000);
295+
WREG32(DCCG_AUDIO_DTO1_MODULE, clock);
296+
}
289297
}
290298

291299
void dce6_dp_enable(struct drm_encoder *encoder, bool enable)

‎drivers/gpu/drm/radeon/sid.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -912,8 +912,8 @@
912912

913913
#define DCCG_AUDIO_DTO0_PHASE 0x05b0
914914
#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
917917

918918
#define AFMT_AUDIO_SRC_CONTROL 0x713c
919919
#define AFMT_AUDIO_SRC_SELECT(x) (((x) & 7) << 0)

0 commit comments

Comments
 (0)