aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/ttm/ttm_execbuf_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_execbuf_util.c')
-rw-r--r--drivers/gpu/drm/ttm/ttm_execbuf_util.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_execbuf_util.c b/drivers/gpu/drm/ttm/ttm_execbuf_util.c
index 1937069432c5..cd9e4523dc56 100644
--- a/drivers/gpu/drm/ttm/ttm_execbuf_util.c
+++ b/drivers/gpu/drm/ttm/ttm_execbuf_util.c
@@ -185,10 +185,7 @@ retry_this_bo:
185 ttm_eu_backoff_reservation_locked(list); 185 ttm_eu_backoff_reservation_locked(list);
186 spin_unlock(&glob->lru_lock); 186 spin_unlock(&glob->lru_lock);
187 ttm_eu_list_ref_sub(list); 187 ttm_eu_list_ref_sub(list);
188 ret = ttm_bo_wait_cpu(bo, false); 188 return -EBUSY;
189 if (ret)
190 return ret;
191 goto retry;
192 } 189 }
193 } 190 }
194 191
@@ -216,19 +213,18 @@ void ttm_eu_fence_buffer_objects(struct list_head *list, void *sync_obj)
216 driver = bdev->driver; 213 driver = bdev->driver;
217 glob = bo->glob; 214 glob = bo->glob;
218 215
219 spin_lock(&bdev->fence_lock);
220 spin_lock(&glob->lru_lock); 216 spin_lock(&glob->lru_lock);
217 spin_lock(&bdev->fence_lock);
221 218
222 list_for_each_entry(entry, list, head) { 219 list_for_each_entry(entry, list, head) {
223 bo = entry->bo; 220 bo = entry->bo;
224 entry->old_sync_obj = bo->sync_obj; 221 entry->old_sync_obj = bo->sync_obj;
225 bo->sync_obj = driver->sync_obj_ref(sync_obj); 222 bo->sync_obj = driver->sync_obj_ref(sync_obj);
226 bo->sync_obj_arg = entry->new_sync_obj_arg;
227 ttm_bo_unreserve_locked(bo); 223 ttm_bo_unreserve_locked(bo);
228 entry->reserved = false; 224 entry->reserved = false;
229 } 225 }
230 spin_unlock(&glob->lru_lock);
231 spin_unlock(&bdev->fence_lock); 226 spin_unlock(&bdev->fence_lock);
227 spin_unlock(&glob->lru_lock);
232 228
233 list_for_each_entry(entry, list, head) { 229 list_for_each_entry(entry, list, head) {
234 if (entry->old_sync_obj) 230 if (entry->old_sync_obj)