drm/amdgpu: Fix use of interruptible waiting
authorAlex Xie <AlexBin.Xie@amd.com>
Tue, 25 Apr 2017 21:09:24 +0000 (17:09 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 28 Apr 2017 21:33:10 +0000 (17:33 -0400)
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_display.c

index 96926a221bd5280e668ec45c48c07a96e103286a..d46773b8f7e81c73547808dccb18b5a6eb201b56 100644 (file)
@@ -169,7 +169,7 @@ static void amdgpu_flip_cleanup_unpin(struct amdgpu_flip_work *work,
 void amdgpu_crtc_cleanup_flip_ctx(struct amdgpu_flip_work *work,
                                  struct amdgpu_bo *new_abo)
 {
-       if (unlikely(amdgpu_bo_reserve(new_abo, false) != 0)) {
+       if (unlikely(amdgpu_bo_reserve(new_abo, true) != 0)) {
                DRM_ERROR("failed to reserve new abo in error path\n");
                amdgpu_flip_work_cleanup(work);
                return;