summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/rv770.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2011-10-14 16:51:22 +0200
committerDave Airlie <airlied@redhat.com>2011-10-18 11:12:51 +0200
commit6ddddfe7341a6fa2db22d63084bfb1df9cce0724 (patch)
treea21b66710dbcce73a4471d8fd0e5b033c1256ce3 /drivers/gpu/drm/radeon/rv770.c
parentdrm/radeon/kms: blit code commoning (diff)
downloadlinux-6ddddfe7341a6fa2db22d63084bfb1df9cce0724.tar.xz
linux-6ddddfe7341a6fa2db22d63084bfb1df9cce0724.zip
drm/radeon/kms: make r600-NI blit suspend code common
r600-NI shared the same blit suspend code. Clean it up and make it a shared function. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/rv770.c')
-rw-r--r--drivers/gpu/drm/radeon/rv770.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c
index 80928f9ff80f..298feaec6d56 100644
--- a/drivers/gpu/drm/radeon/rv770.c
+++ b/drivers/gpu/drm/radeon/rv770.c
@@ -1238,8 +1238,6 @@ int rv770_resume(struct radeon_device *rdev)
int rv770_suspend(struct radeon_device *rdev)
{
- int r;
-
r600_audio_fini(rdev);
/* FIXME: we should wait for ring to be empty */
r700_cp_stop(rdev);
@@ -1247,14 +1245,8 @@ int rv770_suspend(struct radeon_device *rdev)
r600_irq_suspend(rdev);
radeon_wb_disable(rdev);
rv770_pcie_gart_disable(rdev);
- /* unpin shaders bo */
- if (rdev->r600_blit.shader_obj) {
- r = radeon_bo_reserve(rdev->r600_blit.shader_obj, false);
- if (likely(r == 0)) {
- radeon_bo_unpin(rdev->r600_blit.shader_obj);
- radeon_bo_unreserve(rdev->r600_blit.shader_obj);
- }
- }
+ r600_blit_suspend(rdev);
+
return 0;
}