diff options
author | Christian Koenig <deathsimple@vodafone.de> | 2010-04-09 21:13:16 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-04-23 00:12:17 -0400 |
commit | f2594933df9719bd2b0aaaa8ea9b2b850d6e1c42 (patch) | |
tree | 25948717c6531226188c3e051fa11edc09426bfb /drivers/gpu/drm/radeon/r600_audio.c | |
parent | 58bd086313ea0eda037f65b9bda2b3decb959a31 (diff) |
drm/radeon/kms: HDMI irq support
Implements irq support for HDMI audio output. Now the polling timer
is only enabled if irq support isn't available.
Signed-off-by: Christian König <deathsimple@vodafone.de>
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.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/gpu/drm/radeon/r600_audio.c b/drivers/gpu/drm/radeon/r600_audio.c index ed8d3989f172..2b26553c352c 100644 --- a/drivers/gpu/drm/radeon/r600_audio.c +++ b/drivers/gpu/drm/radeon/r600_audio.c | |||
@@ -104,6 +104,15 @@ uint8_t r600_audio_category_code(struct radeon_device *rdev) | |||
104 | } | 104 | } |
105 | 105 | ||
106 | /* | 106 | /* |
107 | * schedule next audio update event | ||
108 | */ | ||
109 | void r600_audio_schedule_polling(struct radeon_device *rdev) | ||
110 | { | ||
111 | mod_timer(&rdev->audio_timer, | ||
112 | jiffies + msecs_to_jiffies(AUDIO_TIMER_INTERVALL)); | ||
113 | } | ||
114 | |||
115 | /* | ||
107 | * update all hdmi interfaces with current audio parameters | 116 | * update all hdmi interfaces with current audio parameters |
108 | */ | 117 | */ |
109 | static void r600_audio_update_hdmi(unsigned long param) | 118 | static void r600_audio_update_hdmi(unsigned long param) |
@@ -136,16 +145,12 @@ static void r600_audio_update_hdmi(unsigned long param) | |||
136 | 145 | ||
137 | list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) { | 146 | list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) { |
138 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); | 147 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); |
139 | if (radeon_encoder->audio_polling_active) { | 148 | still_going |= radeon_encoder->audio_polling_active; |
140 | still_going = 1; | 149 | if (changes || r600_hdmi_buffer_status_changed(encoder)) |
141 | if (changes || r600_hdmi_buffer_status_changed(encoder)) | 150 | r600_hdmi_update_audio_settings(encoder); |
142 | r600_hdmi_update_audio_settings(encoder); | ||
143 | } | ||
144 | } | 151 | } |
145 | 152 | ||
146 | if(still_going) | 153 | if(still_going) r600_audio_schedule_polling(rdev); |
147 | mod_timer(&rdev->audio_timer, | ||
148 | jiffies + msecs_to_jiffies(AUDIO_TIMER_INTERVALL)); | ||
149 | } | 154 | } |
150 | 155 | ||
151 | /* | 156 | /* |