Commit 4a9ed100 authored by Alex Xie's avatar Alex Xie Committed by Alex Deucher

drm/amdgpu: Fix use of interruptible waiting

1. The signal interrupt can affect the expected behaviour.
2. There is no good mechanism to handle the corresponding error.
When signal interrupt happens, unpin is not called.
As a result, inside AMDGPU, the statistic of pin size will be wrong.
Signed-off-by: default avatarAlex Xie <AlexBin.Xie@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent d159f26c
...@@ -123,7 +123,7 @@ static void amdgpu_benchmark_move(struct amdgpu_device *adev, unsigned size, ...@@ -123,7 +123,7 @@ static void amdgpu_benchmark_move(struct amdgpu_device *adev, unsigned size,
} }
if (sobj) { if (sobj) {
r = amdgpu_bo_reserve(sobj, false); r = amdgpu_bo_reserve(sobj, true);
if (likely(r == 0)) { if (likely(r == 0)) {
amdgpu_bo_unpin(sobj); amdgpu_bo_unpin(sobj);
amdgpu_bo_unreserve(sobj); amdgpu_bo_unreserve(sobj);
...@@ -131,7 +131,7 @@ static void amdgpu_benchmark_move(struct amdgpu_device *adev, unsigned size, ...@@ -131,7 +131,7 @@ static void amdgpu_benchmark_move(struct amdgpu_device *adev, unsigned size,
amdgpu_bo_unref(&sobj); amdgpu_bo_unref(&sobj);
} }
if (dobj) { if (dobj) {
r = amdgpu_bo_reserve(dobj, false); r = amdgpu_bo_reserve(dobj, true);
if (likely(r == 0)) { if (likely(r == 0)) {
amdgpu_bo_unpin(dobj); amdgpu_bo_unpin(dobj);
amdgpu_bo_unreserve(dobj); amdgpu_bo_unreserve(dobj);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment