diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2012-04-13 10:26:36 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-04-16 08:42:04 -0400 |
commit | 5273db706f8b673902638fee7f907909ed6ae3f9 (patch) | |
tree | 2560f045e71db2a2b498277505133602d45faa1f /drivers/gpu | |
parent | 16a5e32b83fd946312b9b13590c75d20c95c5202 (diff) |
drm/radeon/si: add missing radeon_bo_unreserve in si_rlc_init() v2
Forget to unreserve after pinning. This can lead to problems in
soft reset and resume.
v2: rework patch as per Michel's suggestion.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/radeon/si.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c index ac7a199ffece..27bda986fc2b 100644 --- a/drivers/gpu/drm/radeon/si.c +++ b/drivers/gpu/drm/radeon/si.c | |||
@@ -2999,8 +2999,8 @@ int si_rlc_init(struct radeon_device *rdev) | |||
2999 | } | 2999 | } |
3000 | r = radeon_bo_pin(rdev->rlc.save_restore_obj, RADEON_GEM_DOMAIN_VRAM, | 3000 | r = radeon_bo_pin(rdev->rlc.save_restore_obj, RADEON_GEM_DOMAIN_VRAM, |
3001 | &rdev->rlc.save_restore_gpu_addr); | 3001 | &rdev->rlc.save_restore_gpu_addr); |
3002 | radeon_bo_unreserve(rdev->rlc.save_restore_obj); | ||
3002 | if (r) { | 3003 | if (r) { |
3003 | radeon_bo_unreserve(rdev->rlc.save_restore_obj); | ||
3004 | dev_warn(rdev->dev, "(%d) pin RLC sr bo failed\n", r); | 3004 | dev_warn(rdev->dev, "(%d) pin RLC sr bo failed\n", r); |
3005 | si_rlc_fini(rdev); | 3005 | si_rlc_fini(rdev); |
3006 | return r; | 3006 | return r; |
@@ -3023,9 +3023,8 @@ int si_rlc_init(struct radeon_device *rdev) | |||
3023 | } | 3023 | } |
3024 | r = radeon_bo_pin(rdev->rlc.clear_state_obj, RADEON_GEM_DOMAIN_VRAM, | 3024 | r = radeon_bo_pin(rdev->rlc.clear_state_obj, RADEON_GEM_DOMAIN_VRAM, |
3025 | &rdev->rlc.clear_state_gpu_addr); | 3025 | &rdev->rlc.clear_state_gpu_addr); |
3026 | radeon_bo_unreserve(rdev->rlc.clear_state_obj); | ||
3026 | if (r) { | 3027 | if (r) { |
3027 | |||
3028 | radeon_bo_unreserve(rdev->rlc.clear_state_obj); | ||
3029 | dev_warn(rdev->dev, "(%d) pin RLC c bo failed\n", r); | 3028 | dev_warn(rdev->dev, "(%d) pin RLC c bo failed\n", r); |
3030 | si_rlc_fini(rdev); | 3029 | si_rlc_fini(rdev); |
3031 | return r; | 3030 | return r; |