History

drm/ttm: remove use_ticket parameter from ttm_bo_reserve

Not used any more.

Christian König committed 10 years ago

Commit dfd5e501 parent 5ee7b4125 files · +55 −62Browse files

Unified · Split

25 files
  1. drivers/gpu/drm/amd/amdgpu/amdgpu_object.h +1 −1
  2. drivers/gpu/drm/ast/ast_drv.h +1 −1
  3. drivers/gpu/drm/bochs/bochs_fbdev.c +1 −1
  4. drivers/gpu/drm/bochs/bochs_kms.c +2 −2
  5. drivers/gpu/drm/cirrus/cirrus_drv.h +1 −1
  6. drivers/gpu/drm/mgag200/mgag200_drv.h +1 −1
  7. drivers/gpu/drm/nouveau/nouveau_bo.c +3 −3
  8. drivers/gpu/drm/nouveau/nouveau_display.c +2 −2
  9. drivers/gpu/drm/nouveau/nouveau_gem.c +3 −3
  10. drivers/gpu/drm/qxl/qxl_object.h +2 −2
  11. drivers/gpu/drm/radeon/radeon_object.c +1 −1
  12. drivers/gpu/drm/radeon/radeon_object.h +1 −1
  13. drivers/gpu/drm/ttm/ttm_bo.c +8 −9
  14. drivers/gpu/drm/ttm/ttm_bo_vm.c +1 −1
  15. drivers/gpu/drm/ttm/ttm_execbuf_util.c +1 −2
  16. drivers/gpu/drm/virtio/virtgpu_drv.h +1 −1
  17. drivers/gpu/drm/virtio/virtgpu_object.c +1 −1
  18. drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c +1 −1
  19. drivers/gpu/drm/vmwgfx/vmwgfx_dmabuf.c +4 −4
  20. drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +1 −1
  21. drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +3 −3
  22. drivers/gpu/drm/vmwgfx/vmwgfx_mob.c +6 −6
  23. drivers/gpu/drm/vmwgfx/vmwgfx_resource.c +3 −4
  24. drivers/gpu/drm/vmwgfx/vmwgfx_shader.c +1 −1
  25. include/drm/ttm/ttm_bo_driver.h +5 −9
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h+1−1
@@ -71,7 +71,7 @@ static inline int amdgpu_bo_reserve(struct amdgpu_bo *bo, bool no_intr) · 70 unmodified lines
7171 {
7272 int r;
7373
74− r = ttm_bo_reserve(&bo->tbo, !no_intr, false, false, 0);
74+ r = ttm_bo_reserve(&bo->tbo, !no_intr, false, NULL);
7575 if (unlikely(r != 0)) {
7676 if (r != -ERESTARTSYS)
7777 dev_err(bo->adev->dev, "%p reserve failed\n", bo);
drivers/gpu/drm/ast/ast_drv.h+1−1
@@ -367,7 +367,7 @@ static inline int ast_bo_reserve(struct ast_bo *bo, bool no_wait) · 366 unmodified lines
367367 {
368368 int ret;
369369
370− ret = ttm_bo_reserve(&bo->bo, true, no_wait, false, NULL);
370+ ret = ttm_bo_reserve(&bo->bo, true, no_wait, NULL);
371371 if (ret) {
372372 if (ret != -ERESTARTSYS && ret != -EBUSY)
373373 DRM_ERROR("reserve failed %p\n", bo);
drivers/gpu/drm/bochs/bochs_fbdev.c+1−1
@@ -82,7 +82,7 @@ static int bochsfb_create(struct drm_fb_helper *helper, · 81 unmodified lines
8282
8383 bo = gem_to_bochs_bo(gobj);
8484
85− ret = ttm_bo_reserve(&bo->bo, true, false, false, NULL);
85+ ret = ttm_bo_reserve(&bo->bo, true, false, NULL);
8686 if (ret)
8787 return ret;
8888
drivers/gpu/drm/bochs/bochs_kms.c+2−2
@@ -43,7 +43,7 @@ static int bochs_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y, · 42 unmodified lines
4343 if (old_fb) {
4444 bochs_fb = to_bochs_framebuffer(old_fb);
4545 bo = gem_to_bochs_bo(bochs_fb->obj);
46− ret = ttm_bo_reserve(&bo->bo, true, false, false, NULL);
46+ ret = ttm_bo_reserve(&bo->bo, true, false, NULL);
4747 if (ret) {
4848 DRM_ERROR("failed to reserve old_fb bo\n");
4949 } else {
@@ -57,7 +57,7 @@ static int bochs_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y, · 7 unmodified lines
5757
5858 bochs_fb = to_bochs_framebuffer(crtc->primary->fb);
5959 bo = gem_to_bochs_bo(bochs_fb->obj);
60− ret = ttm_bo_reserve(&bo->bo, true, false, false, NULL);
60+ ret = ttm_bo_reserve(&bo->bo, true, false, NULL);
6161 if (ret)
6262 return ret;
6363
drivers/gpu/drm/cirrus/cirrus_drv.h+1−1
@@ -245,7 +245,7 @@ static inline int cirrus_bo_reserve(struct cirrus_bo *bo, bool no_wait) · 244 unmodified lines
245245 {
246246 int ret;
247247
248− ret = ttm_bo_reserve(&bo->bo, true, no_wait, false, NULL);
248+ ret = ttm_bo_reserve(&bo->bo, true, no_wait, NULL);
249249 if (ret) {
250250 if (ret != -ERESTARTSYS && ret != -EBUSY)
251251 DRM_ERROR("reserve failed %p\n", bo);
drivers/gpu/drm/mgag200/mgag200_drv.h+1−1
@@ -281,7 +281,7 @@ static inline int mgag200_bo_reserve(struct mgag200_bo *bo, bool no_wait) · 280 unmodified lines
281281 {
282282 int ret;
283283
284− ret = ttm_bo_reserve(&bo->bo, true, no_wait, false, NULL);
284+ ret = ttm_bo_reserve(&bo->bo, true, no_wait, NULL);
285285 if (ret) {
286286 if (ret != -ERESTARTSYS && ret != -EBUSY)
287287 DRM_ERROR("reserve failed %p\n", bo);
drivers/gpu/drm/nouveau/nouveau_bo.c+3−3
@@ -312,7 +312,7 @@ nouveau_bo_pin(struct nouveau_bo *nvbo, uint32_t memtype, bool contig) · 311 unmodified lines
312312 bool force = false, evict = false;
313313 int ret;
314314
315− ret = ttm_bo_reserve(bo, false, false, false, NULL);
315+ ret = ttm_bo_reserve(bo, false, false, NULL);
316316 if (ret)
317317 return ret;
318318
@@ -385,7 +385,7 @@ nouveau_bo_unpin(struct nouveau_bo *nvbo) · 66 unmodified lines
385385 struct ttm_buffer_object *bo = &nvbo->bo;
386386 int ret, ref;
387387
388− ret = ttm_bo_reserve(bo, false, false, false, NULL);
388+ ret = ttm_bo_reserve(bo, false, false, NULL);
389389 if (ret)
390390 return ret;
391391
@@ -420,7 +420,7 @@ nouveau_bo_map(struct nouveau_bo *nvbo) · 28 unmodified lines
420420 {
421421 int ret;
422422
423− ret = ttm_bo_reserve(&nvbo->bo, false, false, false, NULL);
423+ ret = ttm_bo_reserve(&nvbo->bo, false, false, NULL);
424424 if (ret)
425425 return ret;
426426
drivers/gpu/drm/nouveau/nouveau_display.c+2−2
@@ -739,7 +739,7 @@ nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb, · 738 unmodified lines
739739 }
740740
741741 mutex_lock(&cli->mutex);
742− ret = ttm_bo_reserve(&new_bo->bo, true, false, false, NULL);
742+ ret = ttm_bo_reserve(&new_bo->bo, true, false, NULL);
743743 if (ret)
744744 goto fail_unpin;
745745
@@ -753,7 +753,7 @@ nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb, · 7 unmodified lines
753753 if (new_bo != old_bo) {
754754 ttm_bo_unreserve(&new_bo->bo);
755755
756− ret = ttm_bo_reserve(&old_bo->bo, true, false, false, NULL);
756+ ret = ttm_bo_reserve(&old_bo->bo, true, false, NULL);
757757 if (ret)
758758 goto fail_unpin;
759759 }
drivers/gpu/drm/nouveau/nouveau_gem.c+3−3
@@ -71,7 +71,7 @@ nouveau_gem_object_open(struct drm_gem_object *gem, struct drm_file *file_priv) · 70 unmodified lines
7171 if (!cli->vm)
7272 return 0;
7373
74− ret = ttm_bo_reserve(&nvbo->bo, false, false, false, NULL);
74+ ret = ttm_bo_reserve(&nvbo->bo, false, false, NULL);
7575 if (ret)
7676 return ret;
7777
@@ -156,7 +156,7 @@ nouveau_gem_object_close(struct drm_gem_object *gem, struct drm_file *file_priv) · 78 unmodified lines
156156 if (!cli->vm)
157157 return;
158158
159− ret = ttm_bo_reserve(&nvbo->bo, false, false, false, NULL);
159+ ret = ttm_bo_reserve(&nvbo->bo, false, false, NULL);
160160 if (ret)
161161 return;
162162
@@ -409,7 +409,7 @@ retry: · 246 unmodified lines
409409 break;
410410 }
411411
412− ret = ttm_bo_reserve(&nvbo->bo, true, false, true, &op->ticket);
412+ ret = ttm_bo_reserve(&nvbo->bo, true, false, &op->ticket);
413413 if (ret) {
414414 list_splice_tail_init(&vram_list, &op->list);
415415 list_splice_tail_init(&gart_list, &op->list);
drivers/gpu/drm/qxl/qxl_object.h+2−2
@@ -31,7 +31,7 @@ static inline int qxl_bo_reserve(struct qxl_bo *bo, bool no_wait) · 30 unmodified lines
3131 {
3232 int r;
3333
34− r = ttm_bo_reserve(&bo->tbo, true, no_wait, false, NULL);
34+ r = ttm_bo_reserve(&bo->tbo, true, no_wait, NULL);
3535 if (unlikely(r != 0)) {
3636 if (r != -ERESTARTSYS) {
3737 struct qxl_device *qdev = (struct qxl_device *)bo->gem_base.dev->dev_private;
@@ -67,7 +67,7 @@ static inline int qxl_bo_wait(struct qxl_bo *bo, u32 *mem_type, · 29 unmodified lines
6767 {
6868 int r;
6969
70− r = ttm_bo_reserve(&bo->tbo, true, no_wait, false, NULL);
70+ r = ttm_bo_reserve(&bo->tbo, true, no_wait, NULL);
7171 if (unlikely(r != 0)) {
7272 if (r != -ERESTARTSYS) {
7373 struct qxl_device *qdev = (struct qxl_device *)bo->gem_base.dev->dev_private;
drivers/gpu/drm/radeon/radeon_object.c+1−1
@@ -832,7 +832,7 @@ int radeon_bo_wait(struct radeon_bo *bo, u32 *mem_type, bool no_wait) · 831 unmodified lines
832832 {
833833 int r;
834834
835− r = ttm_bo_reserve(&bo->tbo, true, no_wait, false, NULL);
835+ r = ttm_bo_reserve(&bo->tbo, true, no_wait, NULL);
836836 if (unlikely(r != 0))
837837 return r;
838838 if (mem_type)
drivers/gpu/drm/radeon/radeon_object.h+1−1
@@ -65,7 +65,7 @@ static inline int radeon_bo_reserve(struct radeon_bo *bo, bool no_intr) · 64 unmodified lines
6565 {
6666 int r;
6767
68− r = ttm_bo_reserve(&bo->tbo, !no_intr, false, false, NULL);
68+ r = ttm_bo_reserve(&bo->tbo, !no_intr, false, NULL);
6969 if (unlikely(r != 0)) {
7070 if (r != -ERESTARTSYS)
7171 dev_err(bo->rdev->dev, "%p reserve failed\n", bo);
drivers/gpu/drm/ttm/ttm_bo.c+8−9
@@ -452,7 +452,7 @@ static void ttm_bo_cleanup_refs_or_queue(struct ttm_buffer_object *bo) · 451 unmodified lines
452452 int ret;
453453
454454 spin_lock(&glob->lru_lock);
455− ret = __ttm_bo_reserve(bo, false, true, false, NULL);
455+ ret = __ttm_bo_reserve(bo, false, true, NULL);
456456
457457 if (!ret) {
458458 if (!ttm_bo_wait(bo, false, false, true)) {
@@ -526,7 +526,7 @@ static int ttm_bo_cleanup_refs_and_unlock(struct ttm_buffer_object *bo, · 67 unmodified lines
526526 return -EBUSY;
527527
528528 spin_lock(&glob->lru_lock);
529− ret = __ttm_bo_reserve(bo, false, true, false, NULL);
529+ ret = __ttm_bo_reserve(bo, false, true, NULL);
530530
531531 /*
532532 * We raced, and lost, someone else holds the reservation now,
@@ -595,11 +595,10 @@ static int ttm_bo_delayed_delete(struct ttm_bo_device *bdev, bool remove_all) · 62 unmodified lines
595595 kref_get(&nentry->list_kref);
596596 }
597597
598− ret = __ttm_bo_reserve(entry, false, true, false, NULL);
598+ ret = __ttm_bo_reserve(entry, false, true, NULL);
599599 if (remove_all && ret) {
600600 spin_unlock(&glob->lru_lock);
601− ret = __ttm_bo_reserve(entry, false, false,
602− false, NULL);
601+ ret = __ttm_bo_reserve(entry, false, false, NULL);
603602 spin_lock(&glob->lru_lock);
604603 }
605604
@@ -741,7 +740,7 @@ static int ttm_mem_evict_first(struct ttm_bo_device *bdev, · 135 unmodified lines
741740
742741 spin_lock(&glob->lru_lock);
743742 list_for_each_entry(bo, &man->lru, lru) {
744− ret = __ttm_bo_reserve(bo, false, true, false, NULL);
743+ ret = __ttm_bo_reserve(bo, false, true, NULL);
745744 if (!ret) {
746745 if (place && (place->fpfn || place->lpfn)) {
747746 /* Don't evict this BO if it's outside of the
@@ -1623,7 +1622,7 @@ int ttm_bo_synccpu_write_grab(struct ttm_buffer_object *bo, bool no_wait) · 875 unmodified lines
16231622 * Using ttm_bo_reserve makes sure the lru lists are updated.
16241623 */
16251624
1626− ret = ttm_bo_reserve(bo, true, no_wait, false, NULL);
1625+ ret = ttm_bo_reserve(bo, true, no_wait, NULL);
16271626 if (unlikely(ret != 0))
16281627 return ret;
16291628 ret = ttm_bo_wait(bo, false, true, no_wait);
@@ -1656,7 +1655,7 @@ static int ttm_bo_swapout(struct ttm_mem_shrink *shrink) · 26 unmodified lines
16561655
16571656 spin_lock(&glob->lru_lock);
16581657 list_for_each_entry(bo, &glob->swap_lru, swap) {
1659− ret = __ttm_bo_reserve(bo, false, true, false, NULL);
1658+ ret = __ttm_bo_reserve(bo, false, true, NULL);
16601659 if (!ret)
16611660 break;
16621661 }
@@ -1755,7 +1754,7 @@ int ttm_bo_wait_unreserved(struct ttm_buffer_object *bo) · 92 unmodified lines
17551754 return -ERESTARTSYS;
17561755 if (!ww_mutex_is_locked(&bo->resv->lock))
17571756 goto out_unlock;
1758− ret = __ttm_bo_reserve(bo, true, false, false, NULL);
1757+ ret = __ttm_bo_reserve(bo, true, false, NULL);
17591758 if (unlikely(ret != 0))
17601759 goto out_unlock;
17611760 __ttm_bo_unreserve(bo);
drivers/gpu/drm/ttm/ttm_bo_vm.c+1−1
@@ -108,7 +108,7 @@ static int ttm_bo_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf) · 107 unmodified lines
108108 * for reserve, and if it fails, retry the fault after waiting
109109 * for the buffer to become unreserved.
110110 */
111− ret = ttm_bo_reserve(bo, true, true, false, NULL);
111+ ret = ttm_bo_reserve(bo, true, true, NULL);
112112 if (unlikely(ret != 0)) {
113113 if (ret != -EBUSY)
114114 return VM_FAULT_NOPAGE;
drivers/gpu/drm/ttm/ttm_execbuf_util.c+1−2
@@ -112,8 +112,7 @@ int ttm_eu_reserve_buffers(struct ww_acquire_ctx *ticket, · 111 unmodified lines
112112 list_for_each_entry(entry, list, head) {
113113 struct ttm_buffer_object *bo = entry->bo;
114114
115− ret = __ttm_bo_reserve(bo, intr, (ticket == NULL), true,
116− ticket);
115+ ret = __ttm_bo_reserve(bo, intr, (ticket == NULL), ticket);
117116 if (!ret && unlikely(atomic_read(&bo->cpu_writers) > 0)) {
118117 __ttm_bo_unreserve(bo);
119118
drivers/gpu/drm/virtio/virtgpu_drv.h+1−1
@@ -400,7 +400,7 @@ static inline int virtio_gpu_object_reserve(struct virtio_gpu_object *bo, · 399 unmodified lines
400400 {
401401 int r;
402402
403− r = ttm_bo_reserve(&bo->tbo, true, no_wait, false, NULL);
403+ r = ttm_bo_reserve(&bo->tbo, true, no_wait, NULL);
404404 if (unlikely(r != 0)) {
405405 if (r != -ERESTARTSYS) {
406406 struct virtio_gpu_device *qdev =
drivers/gpu/drm/virtio/virtgpu_object.c+1−1
@@ -155,7 +155,7 @@ int virtio_gpu_object_wait(struct virtio_gpu_object *bo, bool no_wait) · 154 unmodified lines
155155 {
156156 int r;
157157
158− r = ttm_bo_reserve(&bo->tbo, true, no_wait, false, NULL);
158+ r = ttm_bo_reserve(&bo->tbo, true, no_wait, NULL);
159159 if (unlikely(r != 0))
160160 return r;
161161 r = ttm_bo_wait(&bo->tbo, true, true, no_wait);
drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c+1−1
@@ -421,7 +421,7 @@ static int vmw_cotable_resize(struct vmw_resource *res, size_t new_size) · 420 unmodified lines
421421 }
422422
423423 bo = &buf->base;
424− WARN_ON_ONCE(ttm_bo_reserve(bo, false, true, false, NULL));
424+ WARN_ON_ONCE(ttm_bo_reserve(bo, false, true, NULL));
425425
426426 ret = ttm_bo_wait(old_bo, false, false, false);
427427 if (unlikely(ret != 0)) {
drivers/gpu/drm/vmwgfx/vmwgfx_dmabuf.c+4−4
@@ -56,7 +56,7 @@ int vmw_dmabuf_pin_in_placement(struct vmw_private *dev_priv, · 55 unmodified lines
5656
5757 vmw_execbuf_release_pinned_bo(dev_priv);
5858
59− ret = ttm_bo_reserve(bo, interruptible, false, false, NULL);
59+ ret = ttm_bo_reserve(bo, interruptible, false, NULL);
6060 if (unlikely(ret != 0))
6161 goto err;
6262
@@ -98,7 +98,7 @@ int vmw_dmabuf_pin_in_vram_or_gmr(struct vmw_private *dev_priv, · 35 unmodified lines
9898
9999 vmw_execbuf_release_pinned_bo(dev_priv);
100100
101− ret = ttm_bo_reserve(bo, interruptible, false, false, NULL);
101+ ret = ttm_bo_reserve(bo, interruptible, false, NULL);
102102 if (unlikely(ret != 0))
103103 goto err;
104104
@@ -174,7 +174,7 @@ int vmw_dmabuf_pin_in_start_of_vram(struct vmw_private *dev_priv, · 69 unmodified lines
174174 return ret;
175175
176176 vmw_execbuf_release_pinned_bo(dev_priv);
177− ret = ttm_bo_reserve(bo, interruptible, false, false, NULL);
177+ ret = ttm_bo_reserve(bo, interruptible, false, NULL);
178178 if (unlikely(ret != 0))
179179 goto err_unlock;
180180
@@ -225,7 +225,7 @@ int vmw_dmabuf_unpin(struct vmw_private *dev_priv, · 44 unmodified lines
225225 if (unlikely(ret != 0))
226226 return ret;
227227
228− ret = ttm_bo_reserve(bo, interruptible, false, false, NULL);
228+ ret = ttm_bo_reserve(bo, interruptible, false, NULL);
229229 if (unlikely(ret != 0))
230230 goto err;
231231
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c+1−1
@@ -326,7 +326,7 @@ static int vmw_dummy_query_bo_create(struct vmw_private *dev_priv) · 325 unmodified lines
326326 if (unlikely(ret != 0))
327327 return ret;
328328
329− ret = ttm_bo_reserve(&vbo->base, false, true, false, NULL);
329+ ret = ttm_bo_reserve(&vbo->base, false, true, NULL);
330330 BUG_ON(ret != 0);
331331 vmw_bo_pin_reserved(vbo, true);
332332
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c+3−3
@@ -98,7 +98,7 @@ int vmw_cursor_update_dmabuf(struct vmw_private *dev_priv, · 97 unmodified lines
9898 kmap_offset = 0;
9999 kmap_num = (width*height*4 + PAGE_SIZE - 1) >> PAGE_SHIFT;
100100
101− ret = ttm_bo_reserve(&dmabuf->base, true, false, false, NULL);
101+ ret = ttm_bo_reserve(&dmabuf->base, true, false, NULL);
102102 if (unlikely(ret != 0)) {
103103 DRM_ERROR("reserve failed\n");
104104 return -EINVAL;
@@ -318,7 +318,7 @@ void vmw_kms_cursor_snoop(struct vmw_surface *srf, · 213 unmodified lines
318318 kmap_offset = cmd->dma.guest.ptr.offset >> PAGE_SHIFT;
319319 kmap_num = (64*64*4) >> PAGE_SHIFT;
320320
321− ret = ttm_bo_reserve(bo, true, false, false, NULL);
321+ ret = ttm_bo_reserve(bo, true, false, NULL);
322322 if (unlikely(ret != 0)) {
323323 DRM_ERROR("reserve failed\n");
324324 return;
@@ -1859,7 +1859,7 @@ int vmw_kms_helper_buffer_prepare(struct vmw_private *dev_priv, · 1534 unmodified lines
18591859 struct ttm_buffer_object *bo = &buf->base;
18601860 int ret;
18611861
1862− ttm_bo_reserve(bo, false, false, interruptible, NULL);
1862+ ttm_bo_reserve(bo, false, false, NULL);
18631863 ret = vmw_validate_single_buffer(dev_priv, bo, interruptible,
18641864 validate_as_mob);
18651865 if (ret)
drivers/gpu/drm/vmwgfx/vmwgfx_mob.c+6−6
@@ -222,7 +222,7 @@ static void vmw_takedown_otable_base(struct vmw_private *dev_priv, · 221 unmodified lines
222222 if (bo) {
223223 int ret;
224224
225− ret = ttm_bo_reserve(bo, false, true, false, NULL);
225+ ret = ttm_bo_reserve(bo, false, true, NULL);
226226 BUG_ON(ret != 0);
227227
228228 vmw_fence_single_bo(bo, NULL);
@@ -262,7 +262,7 @@ static int vmw_otable_batch_setup(struct vmw_private *dev_priv, · 33 unmodified lines
262262 if (unlikely(ret != 0))
263263 goto out_no_bo;
264264
265− ret = ttm_bo_reserve(batch->otable_bo, false, true, false, NULL);
265+ ret = ttm_bo_reserve(batch->otable_bo, false, true, NULL);
266266 BUG_ON(ret != 0);
267267 ret = vmw_bo_driver.ttm_tt_populate(batch->otable_bo->ttm);
268268 if (unlikely(ret != 0))
@@ -357,7 +357,7 @@ static void vmw_otable_batch_takedown(struct vmw_private *dev_priv, · 88 unmodified lines
357357 vmw_takedown_otable_base(dev_priv, i,
358358 &batch->otables[i]);
359359
360− ret = ttm_bo_reserve(bo, false, true, false, NULL);
360+ ret = ttm_bo_reserve(bo, false, true, NULL);
361361 BUG_ON(ret != 0);
362362
363363 vmw_fence_single_bo(bo, NULL);
@@ -440,7 +440,7 @@ static int vmw_mob_pt_populate(struct vmw_private *dev_priv, · 76 unmodified lines
440440 if (unlikely(ret != 0))
441441 return ret;
442442
443− ret = ttm_bo_reserve(mob->pt_bo, false, true, false, NULL);
443+ ret = ttm_bo_reserve(mob->pt_bo, false, true, NULL);
444444
445445 BUG_ON(ret != 0);
446446 ret = vmw_bo_driver.ttm_tt_populate(mob->pt_bo->ttm);
@@ -545,7 +545,7 @@ static void vmw_mob_pt_setup(struct vmw_mob *mob, · 98 unmodified lines
545545 const struct vmw_sg_table *vsgt;
546546 int ret;
547547
548− ret = ttm_bo_reserve(bo, false, true, false, NULL);
548+ ret = ttm_bo_reserve(bo, false, true, NULL);
549549 BUG_ON(ret != 0);
550550
551551 vsgt = vmw_bo_sg_table(bo);
@@ -595,7 +595,7 @@ void vmw_mob_unbind(struct vmw_private *dev_priv, · 43 unmodified lines
595595 struct ttm_buffer_object *bo = mob->pt_bo;
596596
597597 if (bo) {
598− ret = ttm_bo_reserve(bo, false, true, false, NULL);
598+ ret = ttm_bo_reserve(bo, false, true, NULL);
599599 /*
600600 * Noone else should be using this buffer.
601601 */
drivers/gpu/drm/vmwgfx/vmwgfx_resource.c+3−4
@@ -129,7 +129,7 @@ static void vmw_resource_release(struct kref *kref) · 128 unmodified lines
129129 if (res->backup) {
130130 struct ttm_buffer_object *bo = &res->backup->base;
131131
132− ttm_bo_reserve(bo, false, false, false, NULL);
132+ ttm_bo_reserve(bo, false, false, NULL);
133133 if (!list_empty(&res->mob_head) &&
134134 res->func->unbind != NULL) {
135135 struct ttm_validate_buffer val_buf;
@@ -1717,8 +1717,7 @@ int vmw_resource_pin(struct vmw_resource *res, bool interruptible) · 1581 unmodified lines
17171717 if (res->backup) {
17181718 vbo = res->backup;
17191719
1720− ttm_bo_reserve(&vbo->base, interruptible, false, false,
1721− NULL);
1720+ ttm_bo_reserve(&vbo->base, interruptible, false, NULL);
17221721 if (!vbo->pin_count) {
17231722 ret = ttm_bo_validate
17241723 (&vbo->base,
@@ -1773,7 +1772,7 @@ void vmw_resource_unpin(struct vmw_resource *res) · 48 unmodified lines
17731772 if (--res->pin_count == 0 && res->backup) {
17741773 struct vmw_dma_buffer *vbo = res->backup;
17751774
1776− ttm_bo_reserve(&vbo->base, false, false, false, NULL);
1775+ ttm_bo_reserve(&vbo->base, false, false, NULL);
17771776 vmw_bo_pin_reserved(vbo, false);
17781777 ttm_bo_unreserve(&vbo->base);
17791778 }
drivers/gpu/drm/vmwgfx/vmwgfx_shader.c+1−1
@@ -988,7 +988,7 @@ int vmw_compat_shader_add(struct vmw_private *dev_priv, · 987 unmodified lines
988988 if (unlikely(ret != 0))
989989 goto out;
990990
991− ret = ttm_bo_reserve(&buf->base, false, true, false, NULL);
991+ ret = ttm_bo_reserve(&buf->base, false, true, NULL);
992992 if (unlikely(ret != 0))
993993 goto no_reserve;
994994
include/drm/ttm/ttm_bo_driver.h+5−9
@@ -759,8 +759,7 @@ extern void ttm_bo_add_to_lru(struct ttm_buffer_object *bo); · 758 unmodified lines
759759 * @bo: A pointer to a struct ttm_buffer_object.
760760 * @interruptible: Sleep interruptible if waiting.
761761 * @no_wait: Don't sleep while trying to reserve, rather return -EBUSY.
762− * @use_ticket: If @bo is already reserved, Only sleep waiting for
763− * it to become unreserved if @ticket->stamp is older.
762+ * @ticket: ticket used to acquire the ww_mutex.
764763 *
765764 * Will not remove reserved buffers from the lru lists.
766765 * Otherwise identical to ttm_bo_reserve.
@@ -776,8 +775,7 @@ extern void ttm_bo_add_to_lru(struct ttm_buffer_object *bo); · 9 unmodified lines
776775 * be returned if @use_ticket is set to true.
777776 */
778777 static inline int __ttm_bo_reserve(struct ttm_buffer_object *bo,
779− bool interruptible,
780− bool no_wait, bool use_ticket,
778+ bool interruptible, bool no_wait,
781779 struct ww_acquire_ctx *ticket)
782780 {
783781 int ret = 0;
@@ -806,8 +804,7 @@ static inline int __ttm_bo_reserve(struct ttm_buffer_object *bo, · 22 unmodified lines
806804 * @bo: A pointer to a struct ttm_buffer_object.
807805 * @interruptible: Sleep interruptible if waiting.
808806 * @no_wait: Don't sleep while trying to reserve, rather return -EBUSY.
809− * @use_ticket: If @bo is already reserved, Only sleep waiting for
810− * it to become unreserved if @ticket->stamp is older.
807+ * @ticket: ticket used to acquire the ww_mutex.
811808 *
812809 * Locks a buffer object for validation. (Or prevents other processes from
813810 * locking it for validation) and removes it from lru lists, while taking
@@ -846,15 +843,14 @@ static inline int __ttm_bo_reserve(struct ttm_buffer_object *bo, · 32 unmodified lines
846843 * be returned if @use_ticket is set to true.
847844 */
848845 static inline int ttm_bo_reserve(struct ttm_buffer_object *bo,
849− bool interruptible,
850− bool no_wait, bool use_ticket,
846+ bool interruptible, bool no_wait,
851847 struct ww_acquire_ctx *ticket)
852848 {
853849 int ret;
854850
855851 WARN_ON(!atomic_read(&bo->kref.refcount));
856852
857− ret = __ttm_bo_reserve(bo, interruptible, no_wait, use_ticket, ticket);
853+ ret = __ttm_bo_reserve(bo, interruptible, no_wait, ticket);
858854 if (likely(ret == 0))
859855 ttm_bo_del_sub_from_lru(bo);
860856

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t