提交 5273db70 编写于 作者: A Alex Deucher 提交者: Dave Airlie

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: NAlex Deucher <alexander.deucher@amd.com>
Reviewed-by: NMichel Dänzer <michel.daenzer@amd.com>
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 16a5e32b
...@@ -2999,8 +2999,8 @@ int si_rlc_init(struct radeon_device *rdev) ...@@ -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, r = radeon_bo_pin(rdev->rlc.save_restore_obj, RADEON_GEM_DOMAIN_VRAM,
&rdev->rlc.save_restore_gpu_addr); &rdev->rlc.save_restore_gpu_addr);
if (r) {
radeon_bo_unreserve(rdev->rlc.save_restore_obj); radeon_bo_unreserve(rdev->rlc.save_restore_obj);
if (r) {
dev_warn(rdev->dev, "(%d) pin RLC sr bo failed\n", r); dev_warn(rdev->dev, "(%d) pin RLC sr bo failed\n", r);
si_rlc_fini(rdev); si_rlc_fini(rdev);
return r; return r;
...@@ -3023,9 +3023,8 @@ int si_rlc_init(struct radeon_device *rdev) ...@@ -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, r = radeon_bo_pin(rdev->rlc.clear_state_obj, RADEON_GEM_DOMAIN_VRAM,
&rdev->rlc.clear_state_gpu_addr); &rdev->rlc.clear_state_gpu_addr);
if (r) {
radeon_bo_unreserve(rdev->rlc.clear_state_obj); radeon_bo_unreserve(rdev->rlc.clear_state_obj);
if (r) {
dev_warn(rdev->dev, "(%d) pin RLC c bo failed\n", r); dev_warn(rdev->dev, "(%d) pin RLC c bo failed\n", r);
si_rlc_fini(rdev); si_rlc_fini(rdev);
return r; return r;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册