drm/amdgpu: fix fence fallback check
authorChristian König <christian.koenig@amd.com>
Tue, 3 Nov 2015 10:26:42 +0000 (11:26 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 4 Nov 2015 17:29:22 +0000 (12:29 -0500)
Interrupts are notorious unreliable, enable the fallback at
a couple of more places.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c

index b912539420e49a0c0a4aaa2ec846e1c57404d0ee..2c485a22e14b035355b84da5da5c57299207db70 100644 (file)
@@ -342,6 +342,7 @@ static bool amdgpu_fence_enable_signaling(struct fence *f)
        fence->fence_wake.func = amdgpu_fence_check_signaled;
        __add_wait_queue(&ring->fence_drv.fence_queue, &fence->fence_wake);
        fence_get(f);
+       amdgpu_fence_schedule_check(ring);
        FENCE_TRACE(&fence->base, "armed on ring %i!\n", ring->idx);
        return true;
 }
@@ -367,6 +368,7 @@ static int amdgpu_fence_ring_wait_seq(struct amdgpu_ring *ring, uint64_t seq)
        if (atomic64_read(&ring->fence_drv.last_seq) >= seq)
                return 0;
 
+       amdgpu_fence_schedule_check(ring);
        wait_event(ring->fence_drv.fence_queue, (
                   (signaled = amdgpu_fence_seq_signaled(ring, seq))));