summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon/r600_hdmi.c
diff options
context:
space:
mode:
authorChristian König <deathsimple@vodafone.de>2010-04-06 00:14:55 +0400
committerDave Airlie <airlied@redhat.com>2010-04-23 08:11:17 +0400
commit58bd086313ea0eda037f65b9bda2b3decb959a31 (patch)
tree7d82481314d6e3c27a3639f99e115dd672a6ac6e /drivers/gpu/drm/radeon/r600_hdmi.c
parent61cf059325a30995a78c5001db2ed2a8ab1d4c36 (diff)
downloadlinux-58bd086313ea0eda037f65b9bda2b3decb959a31.tar.xz
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.c17
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
/*
* update settings with current parameters from audio engine
*/
-void r600_hdmi_update_audio_settings(struct drm_encoder *encoder,
- int channels,
- int rate,
- int bps,
- uint8_t status_bits,
- uint8_t category_code)
+void r600_hdmi_update_audio_settings(struct drm_encoder *encoder)
{
struct drm_device *dev = encoder->dev;
struct radeon_device *rdev = dev->dev_private;
uint32_t offset = to_radeon_encoder(encoder)->hdmi_offset;
+ int channels = r600_audio_channels(rdev);
+ int rate = r600_audio_rate(rdev);
+ int bps = r600_audio_bits_per_sample(rdev);
+ uint8_t status_bits = r600_audio_status_bits(rdev);
+ uint8_t category_code = r600_audio_category_code(rdev);
+
uint32_t iec;
if (!offset)
@@ -518,6 +519,8 @@ void r600_hdmi_enable(struct drm_encoder *encoder)
}
}
+ r600_audio_enable_polling(encoder);
+
DRM_DEBUG("Enabling HDMI interface @ 0x%04X for encoder 0x%x\n",
radeon_encoder->hdmi_offset, radeon_encoder->encoder_id);
}
@@ -539,6 +542,8 @@ void r600_hdmi_disable(struct drm_encoder *encoder)
return;
}
+ r600_audio_disable_polling(encoder);
+
DRM_DEBUG("Disabling HDMI interface @ 0x%04X for encoder 0x%x\n",
radeon_encoder->hdmi_offset, radeon_encoder->encoder_id);