From: monk.liu Date: Thu, 30 Jul 2015 06:56:18 +0000 (+0800) Subject: drm/amdgpu: use kernel fence interface when possible X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2e536084f24f99f0a2cc0b6ce38ad8298ea58b22;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/amdgpu: use kernel fence interface when possible Signed-off-by: monk.liu Reviewed-by: Christian König --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c index 67d9277d6168..4834725b627e 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c @@ -622,18 +622,11 @@ static long amdgpu_fence_wait_seq_timeout(struct amdgpu_device *adev, */ int amdgpu_fence_wait(struct amdgpu_fence *fence, bool intr) { - uint64_t seq[AMDGPU_MAX_RINGS] = {}; long r; - seq[fence->ring->idx] = fence->seq; - r = amdgpu_fence_wait_seq_timeout(fence->ring->adev, seq, intr, MAX_SCHEDULE_TIMEOUT); - if (r < 0) { - return r; - } - - r = fence_signal(&fence->base); - if (!r) - FENCE_TRACE(&fence->base, "signaled from fence_wait\n"); + r = fence_wait_timeout(&fence->base, intr, MAX_SCHEDULE_TIMEOUT); + if (r < 0) + return r; return 0; }