diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/radeon/r600_audio.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon.h | 1 |
2 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/r600_audio.c b/drivers/gpu/drm/radeon/r600_audio.c index 2b26553c352c..631e1edc373a 100644 --- a/drivers/gpu/drm/radeon/r600_audio.c +++ b/drivers/gpu/drm/radeon/r600_audio.c | |||
@@ -160,6 +160,7 @@ static void r600_audio_engine_enable(struct radeon_device *rdev, bool enable) | |||
160 | { | 160 | { |
161 | DRM_INFO("%s audio support", enable ? "Enabling" : "Disabling"); | 161 | DRM_INFO("%s audio support", enable ? "Enabling" : "Disabling"); |
162 | WREG32_P(R600_AUDIO_ENABLE, enable ? 0x81000000 : 0x0, ~0x81000000); | 162 | WREG32_P(R600_AUDIO_ENABLE, enable ? 0x81000000 : 0x0, ~0x81000000); |
163 | rdev->audio_enabled = enable; | ||
163 | } | 164 | } |
164 | 165 | ||
165 | /* | 166 | /* |
@@ -200,7 +201,8 @@ void r600_audio_enable_polling(struct drm_encoder *encoder) | |||
200 | return; | 201 | return; |
201 | 202 | ||
202 | radeon_encoder->audio_polling_active = 1; | 203 | radeon_encoder->audio_polling_active = 1; |
203 | mod_timer(&rdev->audio_timer, jiffies + 1); | 204 | if (rdev->audio_enabled) |
205 | mod_timer(&rdev->audio_timer, jiffies + 1); | ||
204 | } | 206 | } |
205 | 207 | ||
206 | /* | 208 | /* |
@@ -266,7 +268,7 @@ void r600_audio_set_clock(struct drm_encoder *encoder, int clock) | |||
266 | */ | 268 | */ |
267 | void r600_audio_fini(struct radeon_device *rdev) | 269 | void r600_audio_fini(struct radeon_device *rdev) |
268 | { | 270 | { |
269 | if (!radeon_audio || !r600_audio_chipset_supported(rdev)) | 271 | if (!rdev->audio_enabled) |
270 | return; | 272 | return; |
271 | 273 | ||
272 | del_timer(&rdev->audio_timer); | 274 | del_timer(&rdev->audio_timer); |
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index be8420e65f01..03141755c2ea 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h | |||
@@ -1084,6 +1084,7 @@ struct radeon_device { | |||
1084 | struct mutex vram_mutex; | 1084 | struct mutex vram_mutex; |
1085 | 1085 | ||
1086 | /* audio stuff */ | 1086 | /* audio stuff */ |
1087 | bool audio_enabled; | ||
1087 | struct timer_list audio_timer; | 1088 | struct timer_list audio_timer; |
1088 | int audio_channels; | 1089 | int audio_channels; |
1089 | int audio_rate; | 1090 | int audio_rate; |