summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/evergreen_hdmi.c
diff options
context:
space:
mode:
authorSlava Grigorev <slava.grigorev@amd.com>2014-12-03 21:29:53 +0100
committerAlex Deucher <alexander.deucher@amd.com>2015-01-22 16:42:08 +0100
commit8bf598207efb35ea17075b11bf116043c18aca40 (patch)
tree22f33e3df794f6117eda5053ddc420963475d46a /drivers/gpu/drm/radeon/evergreen_hdmi.c
parentradeon/audio: consolidate select_pin() functions (diff)
downloadlinux-8bf598207efb35ea17075b11bf116043c18aca40.tar.xz
linux-8bf598207efb35ea17075b11bf116043c18aca40.zip
radeon/audio: consolidate audio_enable() functions
Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Slava Grigorev <slava.grigorev@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/evergreen_hdmi.c')
-rw-r--r--drivers/gpu/drm/radeon/evergreen_hdmi.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/gpu/drm/radeon/evergreen_hdmi.c b/drivers/gpu/drm/radeon/evergreen_hdmi.c
index 6bd113bc6551..2f29918ee49f 100644
--- a/drivers/gpu/drm/radeon/evergreen_hdmi.c
+++ b/drivers/gpu/drm/radeon/evergreen_hdmi.c
@@ -34,7 +34,7 @@
#include "atom.h"
/* enable the audio stream */
-static void dce4_audio_enable(struct radeon_device *rdev,
+void dce4_audio_enable(struct radeon_device *rdev,
struct r600_audio_pin *pin,
u8 enable_mask)
{
@@ -300,11 +300,7 @@ void evergreen_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode
/* disable audio prior to setting up hw */
dig->afmt->pin = radeon_audio_get_pin(encoder);
- if (ASIC_IS_DCE6(rdev)) {
- dce6_audio_enable(rdev, dig->afmt->pin, 0);
- } else {
- dce4_audio_enable(rdev, dig->afmt->pin, 0);
- }
+ radeon_audio_enable(rdev, dig->afmt->pin, 0);
evergreen_audio_set_dto(encoder, mode->clock);
@@ -435,10 +431,7 @@ void evergreen_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode
WREG32(AFMT_RAMP_CONTROL3 + offset, 0x00000001);
/* enable audio after to setting up hw */
- if (ASIC_IS_DCE6(rdev))
- dce6_audio_enable(rdev, dig->afmt->pin, 1);
- else
- dce4_audio_enable(rdev, dig->afmt->pin, 0xf);
+ radeon_audio_enable(rdev, dig->afmt->pin, 0xf);
}
void evergreen_hdmi_enable(struct drm_encoder *encoder, bool enable)
@@ -458,10 +451,7 @@ void evergreen_hdmi_enable(struct drm_encoder *encoder, bool enable)
return;
if (!enable && dig->afmt->pin) {
- if (ASIC_IS_DCE6(rdev))
- dce6_audio_enable(rdev, dig->afmt->pin, 0);
- else
- dce4_audio_enable(rdev, dig->afmt->pin, 0);
+ radeon_audio_enable(rdev, dig->afmt->pin, 0);
dig->afmt->pin = NULL;
}