diff options
author | Christian Koenig <deathsimple@vodafone.de> | 2010-04-10 03:13:16 +0200 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-04-23 14:12:17 +1000 |
commit | f2594933df9719bd2b0aaaa8ea9b2b850d6e1c42 (patch) | |
tree | 25948717c6531226188c3e051fa11edc09426bfb /drivers/gpu/drm/radeon/r600_audio.c | |
parent | 58bd086313ea0eda037f65b9bda2b3decb959a31 (diff) | |
download | talos-op-linux-f2594933df9719bd2b0aaaa8ea9b2b850d6e1c42.tar.gz talos-op-linux-f2594933df9719bd2b0aaaa8ea9b2b850d6e1c42.zip |
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) } /* + * schedule next audio update event + */ +void r600_audio_schedule_polling(struct radeon_device *rdev) +{ + mod_timer(&rdev->audio_timer, + jiffies + msecs_to_jiffies(AUDIO_TIMER_INTERVALL)); +} + +/* * update all hdmi interfaces with current audio parameters */ static void r600_audio_update_hdmi(unsigned long param) @@ -136,16 +145,12 @@ static void r600_audio_update_hdmi(unsigned long param) list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) { struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); - if (radeon_encoder->audio_polling_active) { - still_going = 1; - if (changes || r600_hdmi_buffer_status_changed(encoder)) - r600_hdmi_update_audio_settings(encoder); - } + still_going |= radeon_encoder->audio_polling_active; + if (changes || r600_hdmi_buffer_status_changed(encoder)) + r600_hdmi_update_audio_settings(encoder); } - if(still_going) - mod_timer(&rdev->audio_timer, - jiffies + msecs_to_jiffies(AUDIO_TIMER_INTERVALL)); + if(still_going) r600_audio_schedule_polling(rdev); } /* |