drm/amdgpu: Fix use of interruptible waiting
authorAlex Xie <AlexBin.Xie@amd.com>
Mon, 24 Apr 2017 18:27:00 +0000 (14:27 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 28 Apr 2017 21:33:06 +0000 (17:33 -0400)
1. The signal interrupt can affect the expected behaviour.
2. There is no good mechanism to handle the corresponding error.

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>
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c

index cb89fff863c04c9536ec6b9667d58abb06c1b5a1..60de77b153b7ecf9381e94b14f8433cbcd9427b2 100644 (file)
@@ -295,7 +295,7 @@ void amdgpu_bo_free_kernel(struct amdgpu_bo **bo, u64 *gpu_addr,
        if (*bo == NULL)
                return;
 
-       if (likely(amdgpu_bo_reserve(*bo, false) == 0)) {
+       if (likely(amdgpu_bo_reserve(*bo, true) == 0)) {
                if (cpu_addr)
                        amdgpu_bo_kunmap(*bo);