search for: ttm_bo_unreserv

Displaying 20 results from an estimated 109 matches for "ttm_bo_unreserv".

Did you mean: ttm_bo_unreserve
2012 Oct 05
4
[PATCH] drm/nouveau: handle same-fb page flips
...t) - goto fail_unreserve; + if (likely(old_bo != new_bo)) { + ret = ttm_bo_reserve(&old_bo->bo, false, false, false, 0); + if (ret) + goto fail_unreserve; + } return 0; @@ -551,8 +553,10 @@ nouveau_page_flip_unreserve(struct nouveau_bo *old_bo, nouveau_bo_fence(new_bo, fence); ttm_bo_unreserve(&new_bo->bo); - nouveau_bo_fence(old_bo, fence); - ttm_bo_unreserve(&old_bo->bo); + if (likely(old_bo != new_bo)) { + nouveau_bo_fence(old_bo, fence); + ttm_bo_unreserve(&old_bo->bo); + } nouveau_bo_unpin(old_bo); } @@ -624,6 +628,12 @@ nouveau_crtc_page_flip(struct d...
2019 Jul 02
2
[PATCH v6 06/18] drm/virtio: remove ttm calls from in virtio_gpu_object_{reserve, unreserve}
...device *qdev = bo->gem_base.dev->dev_private; dev_err(qdev->dev, "%p reserve failed\n", bo); @@ -416,7 +416,7 @@ static inline int virtio_gpu_object_reserve(struct virtio_gpu_object *bo) static inline void virtio_gpu_object_unreserve(struct virtio_gpu_object *bo) { - ttm_bo_unreserve(&bo->tbo); + reservation_object_unlock(bo->gem_base.resv); } /* virgl debufs */ -- 2.18.1
2019 Jul 02
2
[PATCH v6 06/18] drm/virtio: remove ttm calls from in virtio_gpu_object_{reserve, unreserve}
...device *qdev = bo->gem_base.dev->dev_private; dev_err(qdev->dev, "%p reserve failed\n", bo); @@ -416,7 +416,7 @@ static inline int virtio_gpu_object_reserve(struct virtio_gpu_object *bo) static inline void virtio_gpu_object_unreserve(struct virtio_gpu_object *bo) { - ttm_bo_unreserve(&bo->tbo); + reservation_object_unlock(bo->gem_base.resv); } /* virgl debufs */ -- 2.18.1
2018 Dec 19
0
[PATCH 09/14] drm/bochs: remove old bochs_crtc_* functions
...ice, crtc); - struct bochs_bo *bo; - u64 gpu_addr = 0; - int ret; - - if (old_fb) { - bo = gem_to_bochs_bo(old_fb->obj[0]); - ret = ttm_bo_reserve(&bo->bo, true, false, NULL); - if (ret) { - DRM_ERROR("failed to reserve old_fb bo\n"); - } else { - bochs_bo_unpin(bo); - ttm_bo_unreserve(&bo->bo); - } - } - - if (WARN_ON(crtc->primary->fb == NULL)) - return -EINVAL; - - bo = gem_to_bochs_bo(crtc->primary->fb->obj[0]); - ret = ttm_bo_reserve(&bo->bo, true, false, NULL); - if (ret) - return ret; - - ret = bochs_bo_pin(bo, TTM_PL_FLAG_VRAM, &gpu_ad...
2019 Jul 04
2
[PATCH v6 06/18] drm/virtio: remove ttm calls from in virtio_gpu_object_{reserve,unreserve}
...r = reservation_object_lock_interruptible(bo->gem_base.resv, NULL); > Can you elaborate a bit about how TTM keeps the BOs alive in, for > example, virtio_gpu_transfer_from_host_ioctl? In that function, only > three TTM functions are called: ttm_bo_reserve, ttm_bo_validate, and > ttm_bo_unreserve. I am curious how they keep the BO alive. It can't go away between reserve and unreserve, and I think it also can't be evicted then. Havn't checked how ttm implements that. cheers, Gerd
2019 Jul 04
2
[PATCH v6 06/18] drm/virtio: remove ttm calls from in virtio_gpu_object_{reserve,unreserve}
...r = reservation_object_lock_interruptible(bo->gem_base.resv, NULL); > Can you elaborate a bit about how TTM keeps the BOs alive in, for > example, virtio_gpu_transfer_from_host_ioctl? In that function, only > three TTM functions are called: ttm_bo_reserve, ttm_bo_validate, and > ttm_bo_unreserve. I am curious how they keep the BO alive. It can't go away between reserve and unreserve, and I think it also can't be evicted then. Havn't checked how ttm implements that. cheers, Gerd
2018 Dec 19
0
[PATCH 13/14] drm/bochs: drop old fbdev emulation code
...d to create fbcon backing object %d\n", ret); - return ret; - } - - bo = gem_to_bochs_bo(gobj); - - ret = ttm_bo_reserve(&bo->bo, true, false, NULL); - if (ret) - return ret; - - ret = bochs_bo_pin(bo, TTM_PL_FLAG_VRAM); - if (ret) { - DRM_ERROR("failed to pin fbcon\n"); - ttm_bo_unreserve(&bo->bo); - return ret; - } - - ret = ttm_bo_kmap(&bo->bo, 0, bo->bo.num_pages, - &bo->kmap); - if (ret) { - DRM_ERROR("failed to kmap fbcon\n"); - ttm_bo_unreserve(&bo->bo); - return ret; - } - - ttm_bo_unreserve(&bo->bo); - - /* init fb dev...
2014 May 14
0
[RFC PATCH v1 06/16] drm/ttm: kill fence_lock
...(&new_bo->bo.bdev->fence_lock); - fence = nouveau_fence_ref(new_bo->bo.sync_obj); - spin_unlock(&new_bo->bo.bdev->fence_lock); - ret = nouveau_fence_sync(fence, chan); - nouveau_fence_unref(&fence); + ret = nouveau_fence_sync(new_bo->bo.sync_obj, chan); if (ret) { ttm_bo_unreserve(&new_bo->bo); goto fail_unpin; diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c index 6e1c58a880fe..6cd5298cbb53 100644 --- a/drivers/gpu/drm/nouveau/nouveau_gem.c +++ b/drivers/gpu/drm/nouveau/nouveau_gem.c @@ -105,9 +105,7 @@ nouveau_gem_object...
2019 Jun 18
1
[PATCH v2 06/12] drm/virtio: remove ttm calls from in virtio_gpu_object_{reserve, unreserve}
...(bo->gem_base.resv, NULL); if (unlikely(r != 0)) { if (r != -ERESTARTSYS) { struct virtio_gpu_device *qdev = @@ -416,7 +416,7 @@ static inline int virtio_gpu_object_reserve(struct virtio_gpu_object *bo) static inline void virtio_gpu_object_unreserve(struct virtio_gpu_object *bo) { - ttm_bo_unreserve(&bo->tbo); + reservation_object_unlock(bo->gem_base.resv); } /* virgl debufs */ -- 2.18.1
2019 Jul 03
0
[PATCH v6 06/18] drm/virtio: remove ttm calls from in virtio_gpu_object_{reserve, unreserve}
...se, NULL); > + r = reservation_object_lock_interruptible(bo->gem_base.resv, NULL); Can you elaborate a bit about how TTM keeps the BOs alive in, for example, virtio_gpu_transfer_from_host_ioctl? In that function, only three TTM functions are called: ttm_bo_reserve, ttm_bo_validate, and ttm_bo_unreserve. I am curious how they keep the BO alive. > if (unlikely(r != 0)) { > - if (r != -ERESTARTSYS) { > + if (r != -EINTR) { > struct virtio_gpu_device *qdev = > bo->gem_base.dev->dev_priv...
2014 May 14
0
[RFC PATCH v1 04/16] drm/nouveau: require reservations for nouveau_fence_sync and nouveau_bo_fence
...lock(&new_bo->bo.bdev->fence_lock); @@ -723,12 +726,18 @@ nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb, spin_unlock(&new_bo->bo.bdev->fence_lock); ret = nouveau_fence_sync(fence, chan); nouveau_fence_unref(&fence); - if (ret) + if (ret) { + ttm_bo_unreserve(&new_bo->bo); goto fail_unpin; + } - ret = ttm_bo_reserve(&old_bo->bo, true, false, false, NULL); - if (ret) - goto fail_unpin; + if (new_bo != old_bo) { + ttm_bo_unreserve(&new_bo->bo); + + ret = ttm_bo_reserve(&old_bo->bo, true, false, false, NULL); + if (ret...
2019 Jun 19
1
[PATCH v3 07/12] drm/virtio: remove ttm calls from in virtio_gpu_object_{reserve, unreserve}
...device *qdev = bo->gem_base.dev->dev_private; dev_err(qdev->dev, "%p reserve failed\n", bo); @@ -416,7 +416,7 @@ static inline int virtio_gpu_object_reserve(struct virtio_gpu_object *bo) static inline void virtio_gpu_object_unreserve(struct virtio_gpu_object *bo) { - ttm_bo_unreserve(&bo->tbo); + reservation_object_unlock(bo->gem_base.resv); } /* virgl debufs */ -- 2.18.1
2019 Jun 17
1
[PATCH 4/4] drm/virtio: remove virtio_gpu_object_wait
..._object *bo) kfree(bo->pages); bo->pages = NULL; } - -int virtio_gpu_object_wait(struct virtio_gpu_object *bo, bool no_wait) -{ - int r; - - r = ttm_bo_reserve(&bo->tbo, true, no_wait, NULL); - if (unlikely(r != 0)) - return r; - r = ttm_bo_wait(&bo->tbo, true, no_wait); - ttm_bo_unreserve(&bo->tbo); - return r; -} - -- 2.18.1
2010 Feb 19
2
[PATCH 1/2] drm/nouveau: Unmap pushbuf BOs when we're done with them.
...+ b/drivers/gpu/drm/nouveau/nouveau_gem.c @@ -243,6 +243,8 @@ validate_fini_list(struct list_head *list, struct nouveau_fence *fence) nouveau_fence_unref((void *)&prev_fence); } + ttm_bo_kunmap(&nvbo->kmap); + list_del(&nvbo->entry); nvbo->reserved_by = NULL; ttm_bo_unreserve(&nvbo->bo); -- 1.6.4.4
2019 May 16
5
[PATCH 0/2] Add BO reservation to GEM VRAM pin/unpin/push_to_system
A kernel test bot reported a problem with the locktorture testcase that was triggered by the GEM VRAM helpers. ... [ 10.004734] RIP: 0010:ttm_bo_validate+0x41/0x141 [ttm] ... [ 10.015669] ? kvm_sched_clock_read+0x5/0xd [ 10.016157] ? get_lock_stats+0x11/0x3f [ 10.016607] drm_gem_vram_pin+0x77/0xa2 [drm_vram_helper] [ 10.017229]
2019 May 16
5
[PATCH 0/2] Add BO reservation to GEM VRAM pin/unpin/push_to_system
A kernel test bot reported a problem with the locktorture testcase that was triggered by the GEM VRAM helpers. ... [ 10.004734] RIP: 0010:ttm_bo_validate+0x41/0x141 [ttm] ... [ 10.015669] ? kvm_sched_clock_read+0x5/0xd [ 10.016157] ? get_lock_stats+0x11/0x3f [ 10.016607] drm_gem_vram_pin+0x77/0xa2 [drm_vram_helper] [ 10.017229]
2020 Sep 29
2
[PATCH v2 4/4] drm/qxl: use qxl pin function
Otherwise ttm throws a WARN because we try to pin without a reservation. Fixes: 9d36d4320462 ("drm/qxl: switch over to the new pin interface") Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- drivers/gpu/drm/qxl/qxl_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/qxl/qxl_object.c b/drivers/gpu/drm/qxl/qxl_object.c index
2020 Sep 29
2
[PATCH v2 4/4] drm/qxl: use qxl pin function
Otherwise ttm throws a WARN because we try to pin without a reservation. Fixes: 9d36d4320462 ("drm/qxl: switch over to the new pin interface") Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- drivers/gpu/drm/qxl/qxl_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/qxl/qxl_object.c b/drivers/gpu/drm/qxl/qxl_object.c index
2015 Jun 15
4
[PATCH v2 0/2] drm/nouveau: option for staging ioctls and new GEM_SET_TILING ioctl
Second version of this patchset addressing Ben's comments and fixing a few extra things. This patchset proposes to introduce a "staging" module option to dynamically enable features (mostly ioctls) that are merged but may be refined before they are declared "stable". The second patch illustrates the use of this staging option with the SET_TILING ioctl, which can be used to
2019 Jul 05
1
[PATCH v6 06/18] drm/virtio: remove ttm calls from in virtio_gpu_object_{reserve,unreserve}
...tible(bo->gem_base.resv, NULL); > > > Can you elaborate a bit about how TTM keeps the BOs alive in, for > > > example, virtio_gpu_transfer_from_host_ioctl? In that function, only > > > three TTM functions are called: ttm_bo_reserve, ttm_bo_validate, and > > > ttm_bo_unreserve. I am curious how they keep the BO alive. > > > > It can't go away between reserve and unreserve, and I think it also > > can't be evicted then. Havn't checked how ttm implements that. > Hm, but the vbuf using the BO outlives the reserve/unreserve section. > T...