drm/radeon/si: add missing radeon_bo_unreserve in si_rlc_init()
Subsystems (2)
PATCH 1/1 drm/radeon/si: add missing radeon_bo_unreserve in si_rlc_init()
From: Alex Deucher <[email protected]>
Forget to unreserve after pinning. This can lead to problems in soft reset and resume.
--- drivers/gpu/drm/radeon/si.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/gpu/drm/radeon/si.c +2 -1
@@ -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 ; }
Signature · 1 line
1.7.7.5
Quoted 6 lines · On Don, 2012-04-12 at 16:13 -0400, [email protected] wrote:
From: Alex Deucher <[email protected]>
Forget to unreserve after pinning. This can lead to problems in soft reset and resume.
Signed-off-by Alex Deucher <[email protected]>
[...]
Quoted 4 lines
drivers/gpu/drm/radeon/si.c +0
-0@@ -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) {
drivers/gpu/drm/radeon/si.c int si_rlc_init(struct radeon_device *rdev) · line 3036
Quoted 10 lines
drivers/gpu/drm/radeon/si.c +1
-1-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 ; }
Instead of these two radeon_bo_unreserve calls, there could be one between the radeon_bo_pin call and the test of its return value.
Either way,
Signature · 6 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Debian, X and DRI developer _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 1/1 drm/radeon/si: add missing radeon_bo_unreserve in si_rlc_init() v2
From: Alex Deucher <[email protected]>
Forget to unreserve after pinning. This can lead to problems in soft reset and resume.
v2: rework patch as per Michel's suggestion.
--- drivers/gpu/drm/radeon/si.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-)
drivers/gpu/drm/radeon/si.c +2 -3
@@ -2999,8 +2999,8 @@ int si_rlc_init(struct radeon_device *rdev) } r =radeon_bo_pin (rdev->rlc.save_restore_obj,RADEON_GEM_DOMAIN_VRAM , &rdev->rlc.save_restore_gpu_addr); +radeon_bo_unreserve (rdev->rlc.save_restore_obj);if (r) { -radeon_bo_unreserve (rdev->rlc.save_restore_obj);dev_warn (rdev->dev,"(%d) pin RLC sr bo failed\n" , r);si_rlc_fini (rdev);return r;
@@ -3023,9 +3023,8 @@ 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); +radeon_bo_unreserve (rdev->rlc.clear_state_obj);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;
Signature · 6 lines
1.7.7.5 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel