diff options
author | Christian König <deathsimple@vodafone.de> | 2010-04-05 16:14:55 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-04-23 00:11:17 -0400 |
commit | 58bd086313ea0eda037f65b9bda2b3decb959a31 (patch) | |
tree | 7d82481314d6e3c27a3639f99e115dd672a6ac6e /drivers/gpu/drm/radeon/r600_hdmi.c | |
parent | 61cf059325a30995a78c5001db2ed2a8ab1d4c36 (diff) |
drm/radeon/kms: rework audio polling timer
Rework HDMI audio polling timer, only enable it when
at least one HDMI encoder needs it. Preparation for
replacing it with irq support.
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_hdmi.c')
-rw-r--r-- | drivers/gpu/drm/radeon/r600_hdmi.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/gpu/drm/radeon/r600_hdmi.c b/drivers/gpu/drm/radeon/r600_hdmi.c index 2616b822ba68..d014472d0d3f 100644 --- a/drivers/gpu/drm/radeon/r600_hdmi.c +++ b/drivers/gpu/drm/radeon/r600_hdmi.c | |||
@@ -353,17 +353,18 @@ void r600_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode *mod | |||
353 | /* | 353 | /* |
354 | * update settings with current parameters from audio engine | 354 | * update settings with current parameters from audio engine |
355 | */ | 355 | */ |
356 | void r600_hdmi_update_audio_settings(struct drm_encoder *encoder, | 356 | void r600_hdmi_update_audio_settings(struct drm_encoder *encoder) |
357 | int channels, | ||
358 | int rate, | ||
359 | int bps, | ||
360 | uint8_t status_bits, | ||
361 | uint8_t category_code) | ||
362 | { | 357 | { |
363 | struct drm_device *dev = encoder->dev; | 358 | struct drm_device *dev = encoder->dev; |
364 | struct radeon_device *rdev = dev->dev_private; | 359 | struct radeon_device *rdev = dev->dev_private; |
365 | uint32_t offset = to_radeon_encoder(encoder)->hdmi_offset; | 360 | uint32_t offset = to_radeon_encoder(encoder)->hdmi_offset; |
366 | 361 | ||
362 | int channels = r600_audio_channels(rdev); | ||
363 | int rate = r600_audio_rate(rdev); | ||
364 | int bps = r600_audio_bits_per_sample(rdev); | ||
365 | uint8_t status_bits = r600_audio_status_bits(rdev); | ||
366 | uint8_t category_code = r600_audio_category_code(rdev); | ||
367 | |||
367 | uint32_t iec; | 368 | uint32_t iec; |
368 | 369 | ||
369 | if (!offset) | 370 | if (!offset) |
@@ -518,6 +519,8 @@ void r600_hdmi_enable(struct drm_encoder *encoder) | |||
518 | } | 519 | } |
519 | } | 520 | } |
520 | 521 | ||
522 | r600_audio_enable_polling(encoder); | ||
523 | |||
521 | DRM_DEBUG("Enabling HDMI interface @ 0x%04X for encoder 0x%x\n", | 524 | DRM_DEBUG("Enabling HDMI interface @ 0x%04X for encoder 0x%x\n", |
522 | radeon_encoder->hdmi_offset, radeon_encoder->encoder_id); | 525 | radeon_encoder->hdmi_offset, radeon_encoder->encoder_id); |
523 | } | 526 | } |
@@ -539,6 +542,8 @@ void r600_hdmi_disable(struct drm_encoder *encoder) | |||
539 | return; | 542 | return; |
540 | } | 543 | } |
541 | 544 | ||
545 | r600_audio_disable_polling(encoder); | ||
546 | |||
542 | DRM_DEBUG("Disabling HDMI interface @ 0x%04X for encoder 0x%x\n", | 547 | DRM_DEBUG("Disabling HDMI interface @ 0x%04X for encoder 0x%x\n", |
543 | radeon_encoder->hdmi_offset, radeon_encoder->encoder_id); | 548 | radeon_encoder->hdmi_offset, radeon_encoder->encoder_id); |
544 | 549 | ||