Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Alex Xie <AlexBin.Xie@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Alex Xie and committed by
Alex Deucher
4a9ed100 d159f26c

+2 -2
+2 -2
drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c
··· 123 123 } 124 124 125 125 if (sobj) { 126 - r = amdgpu_bo_reserve(sobj, false); 126 + r = amdgpu_bo_reserve(sobj, true); 127 127 if (likely(r == 0)) { 128 128 amdgpu_bo_unpin(sobj); 129 129 amdgpu_bo_unreserve(sobj); ··· 131 131 amdgpu_bo_unref(&sobj); 132 132 } 133 133 if (dobj) { 134 - r = amdgpu_bo_reserve(dobj, false); 134 + r = amdgpu_bo_reserve(dobj, true); 135 135 if (likely(r == 0)) { 136 136 amdgpu_bo_unpin(dobj); 137 137 amdgpu_bo_unreserve(dobj);