summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon/r600_audio.c
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2012-05-14 18:52:30 +0400
committerDave Airlie <airlied@redhat.com>2012-05-17 15:16:03 +0400
commitcfcbd6d3de7f75f7c5a07d3fac8e1949bbbc79e0 (patch)
tree7e09519d9a45658bb8ff3df52964ce29dcda9f51 /drivers/gpu/drm/radeon/r600_audio.c
parent0783986ad7244e374dd5e86c650811bf4f01290d (diff)
downloadlinux-cfcbd6d3de7f75f7c5a07d3fac8e1949bbbc79e0.tar.xz
drm/radeon/hdmi: use new AFMT structs
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/r600_audio.c')
-rw-r--r--drivers/gpu/drm/radeon/r600_audio.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/r600_audio.c b/drivers/gpu/drm/radeon/r600_audio.c
index b922a3cd90db..b5a602e71c12 100644
--- a/drivers/gpu/drm/radeon/r600_audio.c
+++ b/drivers/gpu/drm/radeon/r600_audio.c
@@ -30,6 +30,29 @@
#include "atom.h"
/*
+ * check if enc_priv stores radeon_encoder_atom_dig
+ */
+static bool radeon_dig_encoder(struct drm_encoder *encoder)
+{
+ struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
+ switch (radeon_encoder->encoder_id) {
+ case ENCODER_OBJECT_ID_INTERNAL_LVDS:
+ case ENCODER_OBJECT_ID_INTERNAL_TMDS1:
+ case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1:
+ case ENCODER_OBJECT_ID_INTERNAL_LVTM1:
+ case ENCODER_OBJECT_ID_INTERNAL_DVO1:
+ case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1:
+ case ENCODER_OBJECT_ID_INTERNAL_DDI:
+ case ENCODER_OBJECT_ID_INTERNAL_UNIPHY:
+ case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA:
+ case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1:
+ case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2:
+ return true;
+ }
+ return false;
+}
+
+/*
* check if the chipset is supported
*/
static int r600_audio_chipset_supported(struct radeon_device *rdev)
@@ -135,6 +158,8 @@ void r600_audio_update_hdmi(struct work_struct *work)
}
list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
+ if (!radeon_dig_encoder(encoder))
+ continue;
if (changes || r600_hdmi_buffer_status_changed(encoder))
r600_hdmi_update_audio_settings(encoder);
}