>From 7226ccea04d48383fbf00577b8861461bcae2b02 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Christian=20K=C3=B6nig?= <chrissi@zweiundvierzig.(none)>
Date: Tue, 30 Mar 2010 19:19:20 +0200
Subject: [PATCH] drm/radeon/kms: disable HDMI encoders when audio codec is disabled
Also disable the HDMI encoders if the audio codec is disabled by the module option.
This fixes a strange bug, where an enabled HDMI encoder disables an external audio input at the TV.
---
drivers/gpu/drm/radeon/radeon_encoders.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
@@ -611,7 +611,7 @@ atombios_get_encoder_mode(struct drm_encoder *encoder)
switch (connector->connector_type) {
case DRM_MODE_CONNECTOR_DVII:
case DRM_MODE_CONNECTOR_HDMIB: /* HDMI-B is basically DL-DVI; analog works fine */
- if (drm_detect_hdmi_monitor(radeon_connector->edid))
+ if (drm_detect_hdmi_monitor(radeon_connector->edid) && radeon_audio)
return ATOM_ENCODER_MODE_HDMI;
else if (radeon_connector->use_digital)
return ATOM_ENCODER_MODE_DVI;
@@ -621,7 +621,7 @@ atombios_get_encoder_mode(struct drm_encoder *encoder)
case DRM_MODE_CONNECTOR_DVID:
case DRM_MODE_CONNECTOR_HDMIA:
default:
- if (drm_detect_hdmi_monitor(radeon_connector->edid))
+ if (drm_detect_hdmi_monitor(radeon_connector->edid) && radeon_audio)
return ATOM_ENCODER_MODE_HDMI;
else
return ATOM_ENCODER_MODE_DVI;
@@ -635,7 +635,7 @@ atombios_get_encoder_mode(struct drm_encoder *encoder)
if ((dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT) ||
(dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_eDP))
return ATOM_ENCODER_MODE_DP;
- else if (drm_detect_hdmi_monitor(radeon_connector->edid))
+ else if (drm_detect_hdmi_monitor(radeon_connector->edid) && radeon_audio)
return ATOM_ENCODER_MODE_HDMI;
else
return ATOM_ENCODER_MODE_DVI;
--
1.6.3.3