summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/r600_hdmi.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2014-02-18 11:07:55 -0500
committerAlex Deucher <alexander.deucher@amd.com>2014-02-27 14:21:31 -0500
commit832eafaf34ff7d0348fe701e417900c6cf1f5656 (patch)
treebd0432faf5edd181b86b3894ad78077bfa5217d8 /drivers/gpu/drm/radeon/r600_hdmi.c
parentd7eb0a0940618f36e5937d81c06ad7bf438a99e2 (diff)
downloadop-kernel-dev-832eafaf34ff7d0348fe701e417900c6cf1f5656.zip
op-kernel-dev-832eafaf34ff7d0348fe701e417900c6cf1f5656.tar.gz
drm/radeon: change audio enable logic
Disable audio around audio hw setup. This may avoid hangs on certain asics. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/r600_hdmi.c')
-rw-r--r--drivers/gpu/drm/radeon/r600_hdmi.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/gpu/drm/radeon/r600_hdmi.c b/drivers/gpu/drm/radeon/r600_hdmi.c
index 3016fc1..ec810cd 100644
--- a/drivers/gpu/drm/radeon/r600_hdmi.c
+++ b/drivers/gpu/drm/radeon/r600_hdmi.c
@@ -460,6 +460,10 @@ void r600_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode *mod
return;
offset = dig->afmt->offset;
+ /* disable audio prior to setting up hw */
+ dig->afmt->pin = r600_audio_get_pin(rdev);
+ r600_audio_enable(rdev, dig->afmt->pin, false);
+
r600_audio_set_dto(encoder, mode->clock);
WREG32(HDMI0_VBI_PACKET_CONTROL + offset,
@@ -531,6 +535,9 @@ void r600_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode *mod
WREG32(HDMI0_RAMP_CONTROL3 + offset, 0x00000001);
r600_hdmi_audio_workaround(encoder);
+
+ /* enable audio after to setting up hw */
+ r600_audio_enable(rdev, dig->afmt->pin, true);
}
/*
@@ -651,11 +658,6 @@ void r600_hdmi_enable(struct drm_encoder *encoder, bool enable)
if (!enable && !dig->afmt->enabled)
return;
- if (enable)
- dig->afmt->pin = r600_audio_get_pin(rdev);
- else
- dig->afmt->pin = NULL;
-
/* Older chipsets require setting HDMI and routing manually */
if (!ASIC_IS_DCE3(rdev)) {
if (enable)
OpenPOWER on IntegriCloud