aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2015-03-31 11:38:48 -0400
committerAlex Deucher <alexander.deucher@amd.com>2015-04-27 09:54:53 -0400
commit12428327bbd1180b5d8ef83fdf9482b878d0502a (patch)
tree99b5e6aa0fb988602908ad6a12807843a133704e
parent304f07e9c8d302cf3183248cbabb40598eb5b732 (diff)
drm/radeon: drop dce6_dp_enable
It's mostly duplicated with evergreen_dp_enable. This is a prerequisite for fix implemented in another patch. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
-rw-r--r--drivers/gpu/drm/radeon/dce6_afmt.c25
-rw-r--r--drivers/gpu/drm/radeon/evergreen_hdmi.c2
-rw-r--r--drivers/gpu/drm/radeon/radeon_audio.c3
3 files changed, 2 insertions, 28 deletions
diff --git a/drivers/gpu/drm/radeon/dce6_afmt.c b/drivers/gpu/drm/radeon/dce6_afmt.c
index 3adc2afe32aa..68fd9fc677e3 100644
--- a/drivers/gpu/drm/radeon/dce6_afmt.c
+++ b/drivers/gpu/drm/radeon/dce6_afmt.c
@@ -295,28 +295,3 @@ void dce6_dp_audio_set_dto(struct radeon_device *rdev,
295 WREG32(DCCG_AUDIO_DTO1_MODULE, clock); 295 WREG32(DCCG_AUDIO_DTO1_MODULE, clock);
296 } 296 }
297} 297}
298
299void dce6_dp_enable(struct drm_encoder *encoder, bool enable)
300{
301 struct drm_device *dev = encoder->dev;
302 struct radeon_device *rdev = dev->dev_private;
303 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
304 struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv;
305
306 if (!dig || !dig->afmt)
307 return;
308
309 if (enable) {
310 WREG32(EVERGREEN_DP_SEC_TIMESTAMP + dig->afmt->offset,
311 EVERGREEN_DP_SEC_TIMESTAMP_MODE(1));
312 WREG32(EVERGREEN_DP_SEC_CNTL + dig->afmt->offset,
313 EVERGREEN_DP_SEC_ASP_ENABLE | /* Audio packet transmission */
314 EVERGREEN_DP_SEC_ATP_ENABLE | /* Audio timestamp packet transmission */
315 EVERGREEN_DP_SEC_AIP_ENABLE | /* Audio infoframe packet transmission */
316 EVERGREEN_DP_SEC_STREAM_ENABLE); /* Master enable for secondary stream engine */
317 } else {
318 WREG32(EVERGREEN_DP_SEC_CNTL + dig->afmt->offset, 0);
319 }
320
321 dig->afmt->enabled = enable;
322}
diff --git a/drivers/gpu/drm/radeon/evergreen_hdmi.c b/drivers/gpu/drm/radeon/evergreen_hdmi.c
index 237997949a7c..7264ccd337af 100644
--- a/drivers/gpu/drm/radeon/evergreen_hdmi.c
+++ b/drivers/gpu/drm/radeon/evergreen_hdmi.c
@@ -437,7 +437,7 @@ void evergreen_dp_enable(struct drm_encoder *encoder, bool enable)
437 WREG32(EVERGREEN_DP_SEC_TIMESTAMP + dig->afmt->offset, 437 WREG32(EVERGREEN_DP_SEC_TIMESTAMP + dig->afmt->offset,
438 EVERGREEN_DP_SEC_TIMESTAMP_MODE(1)); 438 EVERGREEN_DP_SEC_TIMESTAMP_MODE(1));
439 439
440 if (radeon_connector->con_priv) { 440 if (!ASIC_IS_DCE6(rdev) && radeon_connector->con_priv) {
441 dig_connector = radeon_connector->con_priv; 441 dig_connector = radeon_connector->con_priv;
442 val = RREG32(EVERGREEN_DP_SEC_AUD_N + dig->afmt->offset); 442 val = RREG32(EVERGREEN_DP_SEC_AUD_N + dig->afmt->offset);
443 val &= ~EVERGREEN_DP_SEC_N_BASE_MULTIPLE(0xf); 443 val &= ~EVERGREEN_DP_SEC_N_BASE_MULTIPLE(0xf);
diff --git a/drivers/gpu/drm/radeon/radeon_audio.c b/drivers/gpu/drm/radeon/radeon_audio.c
index 48d49e651a30..2c17df978d61 100644
--- a/drivers/gpu/drm/radeon/radeon_audio.c
+++ b/drivers/gpu/drm/radeon/radeon_audio.c
@@ -102,7 +102,6 @@ static void radeon_audio_dp_mode_set(struct drm_encoder *encoder,
102void r600_hdmi_enable(struct drm_encoder *encoder, bool enable); 102void r600_hdmi_enable(struct drm_encoder *encoder, bool enable);
103void evergreen_hdmi_enable(struct drm_encoder *encoder, bool enable); 103void evergreen_hdmi_enable(struct drm_encoder *encoder, bool enable);
104void evergreen_dp_enable(struct drm_encoder *encoder, bool enable); 104void evergreen_dp_enable(struct drm_encoder *encoder, bool enable);
105void dce6_dp_enable(struct drm_encoder *encoder, bool enable);
106 105
107static const u32 pin_offsets[7] = 106static const u32 pin_offsets[7] =
108{ 107{
@@ -240,7 +239,7 @@ static struct radeon_audio_funcs dce6_dp_funcs = {
240 .set_avi_packet = evergreen_set_avi_packet, 239 .set_avi_packet = evergreen_set_avi_packet,
241 .set_audio_packet = dce4_set_audio_packet, 240 .set_audio_packet = dce4_set_audio_packet,
242 .mode_set = radeon_audio_dp_mode_set, 241 .mode_set = radeon_audio_dp_mode_set,
243 .dpms = dce6_dp_enable, 242 .dpms = evergreen_dp_enable,
244}; 243};
245 244
246static void radeon_audio_interface_init(struct radeon_device *rdev) 245static void radeon_audio_interface_init(struct radeon_device *rdev)