diff options
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_bo.c')
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_bo.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index f6ff579e8918..d5063618efa7 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c | |||
@@ -1611,7 +1611,14 @@ EXPORT_SYMBOL(ttm_bo_unmap_virtual); | |||
1611 | int ttm_bo_wait(struct ttm_buffer_object *bo, | 1611 | int ttm_bo_wait(struct ttm_buffer_object *bo, |
1612 | bool interruptible, bool no_wait) | 1612 | bool interruptible, bool no_wait) |
1613 | { | 1613 | { |
1614 | long timeout = no_wait ? 0 : 15 * HZ; | 1614 | long timeout = 15 * HZ; |
1615 | |||
1616 | if (no_wait) { | ||
1617 | if (reservation_object_test_signaled_rcu(bo->resv, true)) | ||
1618 | return 0; | ||
1619 | else | ||
1620 | return -EBUSY; | ||
1621 | } | ||
1615 | 1622 | ||
1616 | timeout = reservation_object_wait_timeout_rcu(bo->resv, true, | 1623 | timeout = reservation_object_wait_timeout_rcu(bo->resv, true, |
1617 | interruptible, timeout); | 1624 | interruptible, timeout); |