[PATCH] drm/radeon/si: add missing radeon_bo_unreserve in si_rlc_init()

alexdeucher at gmail.com alexdeucher at gmail.com
Thu Apr 12 13:13:55 PDT 2012


From: Alex Deucher <alexander.deucher at amd.com>

Forget to unreserve after pinning.  This can lead to problems in
soft reset and resume.

Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
 drivers/gpu/drm/radeon/si.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c
index ac7a199..23a114c 100644
--- a/drivers/gpu/drm/radeon/si.c
+++ b/drivers/gpu/drm/radeon/si.c
@@ -3005,6 +3005,7 @@ int si_rlc_init(struct radeon_device *rdev)
 		si_rlc_fini(rdev);
 		return r;
 	}
+	radeon_bo_unreserve(rdev->rlc.save_restore_obj);
 
 	/* clear state block */
 	if (rdev->rlc.clear_state_obj == NULL) {
@@ -3024,12 +3025,12 @@ int si_rlc_init(struct radeon_device *rdev)
 	r = radeon_bo_pin(rdev->rlc.clear_state_obj, RADEON_GEM_DOMAIN_VRAM,
 			  &rdev->rlc.clear_state_gpu_addr);
 	if (r) {
-
 		radeon_bo_unreserve(rdev->rlc.clear_state_obj);
 		dev_warn(rdev->dev, "(%d) pin RLC c bo failed\n", r);
 		si_rlc_fini(rdev);
 		return r;
 	}
+	radeon_bo_unreserve(rdev->rlc.clear_state_obj);
 
 	return 0;
 }
-- 
1.7.7.5



More information about the dri-devel mailing list