diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2011-10-14 10:51:22 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-10-18 05:12:51 -0400 |
commit | 6ddddfe7341a6fa2db22d63084bfb1df9cce0724 (patch) | |
tree | a21b66710dbcce73a4471d8fd0e5b033c1256ce3 /drivers/gpu/drm/radeon/rv770.c | |
parent | fb3d9e97e1ad5f2c19b68fe5a0c6a95bf57c65c3 (diff) |
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.c | 12 |
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) | |||
1238 | 1238 | ||
1239 | int rv770_suspend(struct radeon_device *rdev) | 1239 | int rv770_suspend(struct radeon_device *rdev) |
1240 | { | 1240 | { |
1241 | int r; | ||
1242 | |||
1243 | r600_audio_fini(rdev); | 1241 | r600_audio_fini(rdev); |
1244 | /* FIXME: we should wait for ring to be empty */ | 1242 | /* FIXME: we should wait for ring to be empty */ |
1245 | r700_cp_stop(rdev); | 1243 | r700_cp_stop(rdev); |
@@ -1247,14 +1245,8 @@ int rv770_suspend(struct radeon_device *rdev) | |||
1247 | r600_irq_suspend(rdev); | 1245 | r600_irq_suspend(rdev); |
1248 | radeon_wb_disable(rdev); | 1246 | radeon_wb_disable(rdev); |
1249 | rv770_pcie_gart_disable(rdev); | 1247 | rv770_pcie_gart_disable(rdev); |
1250 | /* unpin shaders bo */ | 1248 | r600_blit_suspend(rdev); |
1251 | if (rdev->r600_blit.shader_obj) { | 1249 | |
1252 | r = radeon_bo_reserve(rdev->r600_blit.shader_obj, false); | ||
1253 | if (likely(r == 0)) { | ||
1254 | radeon_bo_unpin(rdev->r600_blit.shader_obj); | ||
1255 | radeon_bo_unreserve(rdev->r600_blit.shader_obj); | ||
1256 | } | ||
1257 | } | ||
1258 | return 0; | 1250 | return 0; |
1259 | } | 1251 | } |
1260 | 1252 | ||