]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
drm/amdgpu: Fix use of interruptible waiting
authorAlex Xie <AlexBin.Xie@amd.com>
Mon, 24 Apr 2017 19:33:16 +0000 (15:33 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 28 Apr 2017 21:33:07 +0000 (17:33 -0400)
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>
drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c

index 726b3e018eebe9396a69201a20b85d9233b8865b..1beae5b930d0e10d407501708a0585e56001181e 100644 (file)
@@ -123,7 +123,7 @@ out_cleanup:
        }
 
        if (sobj) {
-               r = amdgpu_bo_reserve(sobj, false);
+               r = amdgpu_bo_reserve(sobj, true);
                if (likely(r == 0)) {
                        amdgpu_bo_unpin(sobj);
                        amdgpu_bo_unreserve(sobj);
@@ -131,7 +131,7 @@ out_cleanup:
                amdgpu_bo_unref(&sobj);
        }
        if (dobj) {
-               r = amdgpu_bo_reserve(dobj, false);
+               r = amdgpu_bo_reserve(dobj, true);
                if (likely(r == 0)) {
                        amdgpu_bo_unpin(dobj);
                        amdgpu_bo_unreserve(dobj);