diff options
| author | Slava Grigorev <slava.grigorev@amd.com> | 2015-03-02 12:05:29 -0500 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2015-03-03 17:28:26 -0500 |
| commit | 2afa3265b21ada7583bf4a69defe4539ad4df7cf (patch) | |
| tree | 16f07aa17d33f74ae50663949c4443f097a7df15 /drivers/gpu | |
| parent | b983a8f45898245c432afcfd7cf1bb34c5c4e577 (diff) | |
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>
Diffstat (limited to 'drivers/gpu')
| -rw-r--r-- | drivers/gpu/drm/radeon/dce6_afmt.c | 12 | ||||
| -rw-r--r-- | drivers/gpu/drm/radeon/sid.h | 4 |
2 files changed, 12 insertions, 4 deletions
diff --git a/drivers/gpu/drm/radeon/dce6_afmt.c b/drivers/gpu/drm/radeon/dce6_afmt.c index 81a4f5405cd5..3adc2afe32aa 100644 --- a/drivers/gpu/drm/radeon/dce6_afmt.c +++ b/drivers/gpu/drm/radeon/dce6_afmt.c | |||
| @@ -26,6 +26,9 @@ | |||
| 26 | #include "radeon_audio.h" | 26 | #include "radeon_audio.h" |
| 27 | #include "sid.h" | 27 | #include "sid.h" |
| 28 | 28 | ||
| 29 | #define DCE8_DCCG_AUDIO_DTO1_PHASE 0x05b8 | ||
| 30 | #define DCE8_DCCG_AUDIO_DTO1_MODULE 0x05bc | ||
| 31 | |||
| 29 | u32 dce6_endpoint_rreg(struct radeon_device *rdev, | 32 | u32 dce6_endpoint_rreg(struct radeon_device *rdev, |
| 30 | u32 block_offset, u32 reg) | 33 | u32 block_offset, u32 reg) |
| 31 | { | 34 | { |
| @@ -284,8 +287,13 @@ void dce6_dp_audio_set_dto(struct radeon_device *rdev, | |||
| 284 | * number (coefficient of two integer numbers. DCCG_AUDIO_DTOx_PHASE | 287 | * number (coefficient of two integer numbers. DCCG_AUDIO_DTOx_PHASE |
| 285 | * is the numerator, DCCG_AUDIO_DTOx_MODULE is the denominator | 288 | * is the numerator, DCCG_AUDIO_DTOx_MODULE is the denominator |
| 286 | */ | 289 | */ |
| 287 | WREG32(DCCG_AUDIO_DTO1_PHASE, 24000); | 290 | if (ASIC_IS_DCE8(rdev)) { |
| 288 | WREG32(DCCG_AUDIO_DTO1_MODULE, clock); | 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 | } | ||
| 289 | } | 297 | } |
| 290 | 298 | ||
| 291 | void dce6_dp_enable(struct drm_encoder *encoder, bool enable) | 299 | void dce6_dp_enable(struct drm_encoder *encoder, bool enable) |
diff --git a/drivers/gpu/drm/radeon/sid.h b/drivers/gpu/drm/radeon/sid.h index c27118cab16a..99a9835c9f61 100644 --- a/drivers/gpu/drm/radeon/sid.h +++ b/drivers/gpu/drm/radeon/sid.h | |||
| @@ -912,8 +912,8 @@ | |||
| 912 | 912 | ||
| 913 | #define DCCG_AUDIO_DTO0_PHASE 0x05b0 | 913 | #define DCCG_AUDIO_DTO0_PHASE 0x05b0 |
| 914 | #define DCCG_AUDIO_DTO0_MODULE 0x05b4 | 914 | #define DCCG_AUDIO_DTO0_MODULE 0x05b4 |
| 915 | #define DCCG_AUDIO_DTO1_PHASE 0x05b8 | 915 | #define DCCG_AUDIO_DTO1_PHASE 0x05c0 |
| 916 | #define DCCG_AUDIO_DTO1_MODULE 0x05bc | 916 | #define DCCG_AUDIO_DTO1_MODULE 0x05c4 |
| 917 | 917 | ||
| 918 | #define AFMT_AUDIO_SRC_CONTROL 0x713c | 918 | #define AFMT_AUDIO_SRC_CONTROL 0x713c |
| 919 | #define AFMT_AUDIO_SRC_SELECT(x) (((x) & 7) << 0) | 919 | #define AFMT_AUDIO_SRC_SELECT(x) (((x) & 7) << 0) |
