From 695ebbcb232c5ec54b3f7402a4ca1aaa797c45af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Sun, 9 May 2010 20:40:15 +0200 Subject: [PATCH 3/3] drm/radeon/kms: add missing calls to r600_audio init/fini r600_audio init/fini were called only in r600.c and rv770.c. Also add it to rs600.c and rs690.c. --- drivers/gpu/drm/radeon/rs600.c | 9 +++++++++ drivers/gpu/drm/radeon/rs690.c | 11 +++++++++++ drivers/gpu/drm/radeon/rv770.c | 1 + 3 files changed, 21 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/radeon/rs600.c b/drivers/gpu/drm/radeon/rs600.c index a81bc7a..5cfb87d 100644 --- a/drivers/gpu/drm/radeon/rs600.c +++ b/drivers/gpu/drm/radeon/rs600.c @@ -612,11 +612,15 @@ int rs600_resume(struct radeon_device *rdev) rv515_clock_startup(rdev); /* Initialize surface registers */ radeon_surface_init(rdev); + if (r600_audio_init(rdev)) { + DRM_ERROR("radeon: audio resume failed\n"); + } return rs600_startup(rdev); } int rs600_suspend(struct radeon_device *rdev) { + r600_audio_fini(rdev); r100_cp_disable(rdev); r100_wb_disable(rdev); rs600_irq_disable(rdev); @@ -627,6 +631,7 @@ int rs600_suspend(struct radeon_device *rdev) void rs600_fini(struct radeon_device *rdev) { radeon_pm_fini(rdev); + r600_audio_fini(rdev); r100_cp_fini(rdev); r100_wb_fini(rdev); r100_ib_fini(rdev); @@ -708,5 +713,9 @@ int rs600_init(struct radeon_device *rdev) radeon_irq_kms_fini(rdev); rdev->accel_working = false; } + r = r600_audio_init(rdev); + if (r) + return r; + return 0; } diff --git a/drivers/gpu/drm/radeon/rs690.c b/drivers/gpu/drm/radeon/rs690.c index bbf3da7..67966f5 100644 --- a/drivers/gpu/drm/radeon/rs690.c +++ b/drivers/gpu/drm/radeon/rs690.c @@ -664,11 +664,17 @@ int rs690_resume(struct radeon_device *rdev) rv515_clock_startup(rdev); /* Initialize surface registers */ radeon_surface_init(rdev); + + if (r600_audio_init(rdev)) { + DRM_ERROR("radeon: audio resume failed\n"); + } + return rs690_startup(rdev); } int rs690_suspend(struct radeon_device *rdev) { + r600_audio_fini(rdev); r100_cp_disable(rdev); r100_wb_disable(rdev); rs600_irq_disable(rdev); @@ -679,6 +685,7 @@ int rs690_suspend(struct radeon_device *rdev) void rs690_fini(struct radeon_device *rdev) { radeon_pm_fini(rdev); + r600_audio_fini(rdev); r100_cp_fini(rdev); r100_wb_fini(rdev); r100_ib_fini(rdev); @@ -761,5 +768,9 @@ int rs690_init(struct radeon_device *rdev) radeon_irq_kms_fini(rdev); rdev->accel_working = false; } + r = r600_audio_init(rdev); + if (r) + return r; + return 0; } diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c index 97958a6..5926ef1 100644 --- a/drivers/gpu/drm/radeon/rv770.c +++ b/drivers/gpu/drm/radeon/rv770.c @@ -1165,6 +1165,7 @@ int rv770_init(struct radeon_device *rdev) void rv770_fini(struct radeon_device *rdev) { radeon_pm_fini(rdev); + r600_audio_fini(rdev); r600_blit_fini(rdev); r600_cp_fini(rdev); r600_wb_fini(rdev); -- 1.7.0.4