drm/amdgpu: Fix use of interruptible waiting
authorAlex Xie <AlexBin.Xie@amd.com>
Mon, 24 Apr 2017 17:30:43 +0000 (13:30 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 28 Apr 2017 21:33:05 +0000 (17:33 -0400)
If amdgpu_bo_reserve function is interrupted by signal,
amdgpu_bo_kunmap function is not called.

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_device.c

index eadd6e0a415261d398b5cc01ef038ba0cd9ac846..ebc0022a7ab4a794716cebc7862b5b08577b5e2d 100644 (file)
@@ -349,7 +349,7 @@ static void amdgpu_vram_scratch_fini(struct amdgpu_device *adev)
        if (adev->vram_scratch.robj == NULL) {
                return;
        }
-       r = amdgpu_bo_reserve(adev->vram_scratch.robj, false);
+       r = amdgpu_bo_reserve(adev->vram_scratch.robj, true);
        if (likely(r == 0)) {
                amdgpu_bo_kunmap(adev->vram_scratch.robj);
                amdgpu_bo_unpin(adev->vram_scratch.robj);