summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_audio.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2015-02-27 14:43:47 -0500
committerAlex Deucher <alexander.deucher@amd.com>2015-03-03 17:28:24 -0500
commitaeefd07e90e277f9ac5c242c8b2e6797373021a3 (patch)
tree7bd95b42786b2ec92a2b00715f0ca08dd6960f06 /drivers/gpu/drm/radeon/radeon_audio.c
parentb20932dd62f77a96124ec8f0c7ad0908b5584526 (diff)
downloadblackbird-op-linux-aeefd07e90e277f9ac5c242c8b2e6797373021a3.tar.gz
blackbird-op-linux-aeefd07e90e277f9ac5c242c8b2e6797373021a3.zip
drm/radeon: properly set dto for dp on DCE4/5
If DCPLL or ext PLL is used, use the disp clk. If PPLL is used, use the dp clock. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_audio.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_audio.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_audio.c b/drivers/gpu/drm/radeon/radeon_audio.c
index 31de59271007..b21ef69a34ac 100644
--- a/drivers/gpu/drm/radeon/radeon_audio.c
+++ b/drivers/gpu/drm/radeon/radeon_audio.c
@@ -724,6 +724,10 @@ static void radeon_audio_dp_mode_set(struct drm_encoder *encoder,
struct radeon_device *rdev = dev->dev_private;
struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv;
+ struct drm_connector *connector = radeon_get_connector_for_encoder(encoder);
+ struct radeon_connector *radeon_connector = to_radeon_connector(connector);
+ struct radeon_connector_atom_dig *dig_connector =
+ radeon_connector->con_priv;
if (!dig || !dig->afmt)
return;
@@ -731,7 +735,10 @@ static void radeon_audio_dp_mode_set(struct drm_encoder *encoder,
radeon_audio_write_speaker_allocation(encoder);
radeon_audio_write_sad_regs(encoder);
radeon_audio_write_latency_fields(encoder, mode);
- radeon_audio_set_dto(encoder, rdev->clock.default_dispclk * 10);
+ if (rdev->clock.dp_extclk || ASIC_IS_DCE5(rdev))
+ radeon_audio_set_dto(encoder, rdev->clock.default_dispclk * 10);
+ else
+ radeon_audio_set_dto(encoder, dig_connector->dp_clock);
radeon_audio_set_audio_packet(encoder);
radeon_audio_select_pin(encoder);
OpenPOWER on IntegriCloud