aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/r600_audio.c
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2012-05-14 10:52:30 -0400
committerDave Airlie <airlied@redhat.com>2012-05-17 07:16:03 -0400
commitcfcbd6d3de7f75f7c5a07d3fac8e1949bbbc79e0 (patch)
tree7e09519d9a45658bb8ff3df52964ce29dcda9f51 /drivers/gpu/drm/radeon/r600_audio.c
parent0783986ad7244e374dd5e86c650811bf4f01290d (diff)
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 @@
30#include "atom.h" 30#include "atom.h"
31 31
32/* 32/*
33 * check if enc_priv stores radeon_encoder_atom_dig
34 */
35static bool radeon_dig_encoder(struct drm_encoder *encoder)
36{
37 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
38 switch (radeon_encoder->encoder_id) {
39 case ENCODER_OBJECT_ID_INTERNAL_LVDS:
40 case ENCODER_OBJECT_ID_INTERNAL_TMDS1:
41 case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1:
42 case ENCODER_OBJECT_ID_INTERNAL_LVTM1:
43 case ENCODER_OBJECT_ID_INTERNAL_DVO1:
44 case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1:
45 case ENCODER_OBJECT_ID_INTERNAL_DDI:
46 case ENCODER_OBJECT_ID_INTERNAL_UNIPHY:
47 case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA:
48 case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1:
49 case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2:
50 return true;
51 }
52 return false;
53}
54
55/*
33 * check if the chipset is supported 56 * check if the chipset is supported
34 */ 57 */
35static int r600_audio_chipset_supported(struct radeon_device *rdev) 58static int r600_audio_chipset_supported(struct radeon_device *rdev)
@@ -135,6 +158,8 @@ void r600_audio_update_hdmi(struct work_struct *work)
135 } 158 }
136 159
137 list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) { 160 list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
161 if (!radeon_dig_encoder(encoder))
162 continue;
138 if (changes || r600_hdmi_buffer_status_changed(encoder)) 163 if (changes || r600_hdmi_buffer_status_changed(encoder))
139 r600_hdmi_update_audio_settings(encoder); 164 r600_hdmi_update_audio_settings(encoder);
140 } 165 }