aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/ttm/ttm_bo.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_bo.c')
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index 5ef0103bd0b6..9f2eed520fc3 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -166,18 +166,13 @@ static void ttm_bo_release_list(struct kref *list_kref)
166 166
167int ttm_bo_wait_unreserved(struct ttm_buffer_object *bo, bool interruptible) 167int ttm_bo_wait_unreserved(struct ttm_buffer_object *bo, bool interruptible)
168{ 168{
169
170 if (interruptible) { 169 if (interruptible) {
171 int ret = 0; 170 return wait_event_interruptible(bo->event_queue,
172
173 ret = wait_event_interruptible(bo->event_queue,
174 atomic_read(&bo->reserved) == 0); 171 atomic_read(&bo->reserved) == 0);
175 if (unlikely(ret != 0))
176 return ret;
177 } else { 172 } else {
178 wait_event(bo->event_queue, atomic_read(&bo->reserved) == 0); 173 wait_event(bo->event_queue, atomic_read(&bo->reserved) == 0);
174 return 0;
179 } 175 }
180 return 0;
181} 176}
182EXPORT_SYMBOL(ttm_bo_wait_unreserved); 177EXPORT_SYMBOL(ttm_bo_wait_unreserved);
183 178