search for: __ttm_bo_reserve

Displaying 16 results from an estimated 16 matches for "__ttm_bo_reserve".

Did you mean: __ttm_bo_unreserve
2019 Sep 06
4
Xorg indefinitely hangs in kernelspace
...tm_validate_buffer *entry, *last_entry; int ret; + bool locked = false; if (list_empty(list)) return 0; @@ -112,7 +113,10 @@ int ttm_eu_reserve_buffers(struct ww_acq list_for_each_entry(entry, list, head) { struct ttm_buffer_object *bo = entry->bo; + last_entry = entry; ret = __ttm_bo_reserve(bo, intr, (ticket == NULL), ticket); + if (!ret) + locked = true; if (!ret && unlikely(atomic_read(&bo->cpu_writers) > 0)) { reservation_object_unlock(bo->resv); @@ -151,6 +155,10 @@ int ttm_eu_reserve_buffers(struct ww_acq ret = 0; } } + if (!ret) +...
2019 Sep 06
4
Xorg indefinitely hangs in kernelspace
...tm_validate_buffer *entry, *last_entry; int ret; + bool locked = false; if (list_empty(list)) return 0; @@ -112,7 +113,10 @@ int ttm_eu_reserve_buffers(struct ww_acq list_for_each_entry(entry, list, head) { struct ttm_buffer_object *bo = entry->bo; + last_entry = entry; ret = __ttm_bo_reserve(bo, intr, (ticket == NULL), ticket); + if (!ret) + locked = true; if (!ret && unlikely(atomic_read(&bo->cpu_writers) > 0)) { reservation_object_unlock(bo->resv); @@ -151,6 +155,10 @@ int ttm_eu_reserve_buffers(struct ww_acq ret = 0; } } + if (!ret) +...
2019 Sep 09
0
Xorg indefinitely hangs in kernelspace
...ating buffers afterwards. --- a/drivers/gpu/drm/ttm/ttm_execbuf_util.c +++ b/drivers/gpu/drm/ttm/ttm_execbuf_util.c @@ -111,8 +111,10 @@ int ttm_eu_reserve_buffers(struct ww_acq list_for_each_entry(entry, list, head) { struct ttm_buffer_object *bo = entry->bo; + bool lockon; ret = __ttm_bo_reserve(bo, intr, (ticket == NULL), ticket); + lockon = !ret; if (!ret && unlikely(atomic_read(&bo->cpu_writers) > 0)) { reservation_object_unlock(bo->resv); @@ -151,6 +153,7 @@ int ttm_eu_reserve_buffers(struct ww_acq ret = 0; } } + lockon = !ret; if (!ret...
2014 May 14
0
[RFC PATCH v1 16/16] drm/ttm: use rcu in core ttm
...ck); + spin_unlock(&glob->lru_lock); + + lret = reservation_object_wait_timeout_rcu(bo->resv, + true, + interruptible, + 30 * HZ); + + if (lret < 0) + return lret; + else if (lret == 0) + return -EBUSY; spin_lock(&glob->lru_lock); ret = __ttm_bo_reserve(bo, false, true, false, 0);
2014 Jul 09
0
[PATCH 05/17] drm/ttm: call ttm_bo_wait while inside a reservation
...ould be - * finished, and no new wait object should have been added. - */ - spin_lock(&bdev->fence_lock); - ret = ttm_bo_wait(bo, false, false, true); - WARN_ON(ret); - spin_unlock(&bdev->fence_lock); - if (ret) - return ret; - spin_lock(&glob->lru_lock); ret = __ttm_bo_reserve(bo, false, true, false, 0); @@ -528,8 +517,16 @@ static int ttm_bo_cleanup_refs_and_unlock(struct ttm_buffer_object *bo, spin_unlock(&glob->lru_lock); return 0; } - } else - spin_unlock(&bdev->fence_lock); + + /* + * remove sync_obj with ttm_bo_wait, the wait should b...
2019 Sep 06
0
[Spice-devel] Xorg indefinitely hangs in kernelspace
...> + bool locked = false; > > if (list_empty(list)) > return 0; > @@ -112,7 +113,10 @@ int ttm_eu_reserve_buffers(struct ww_acq > list_for_each_entry(entry, list, head) { > struct ttm_buffer_object *bo = entry->bo; > > + last_entry = entry; > ret = __ttm_bo_reserve(bo, intr, (ticket == NULL), ticket); > + if (!ret) > + locked = true; > if (!ret && unlikely(atomic_read(&bo->cpu_writers) > 0)) { > reservation_object_unlock(bo->resv); > > @@ -151,6 +155,10 @@ int ttm_eu_reserve_buffers(struct ww_acq > re...
2014 May 14
0
[RFC PATCH v1 02/16] drm/ttm: kill off some members to ttm_validate_buffer
...ead); glob = entry->bo->glob; if (ticket) ww_acquire_init(ticket, &reservation_ww_class); -retry: + list_for_each_entry(entry, list, head) { struct ttm_buffer_object *bo = entry->bo; - /* already slowpath reserved? */ - if (entry->reserved) - continue; - ret = __ttm_bo_reserve(bo, intr, (ticket == NULL), true, ticket); + if (!ret && unlikely(atomic_read(&bo->cpu_writers) > 0)) { + __ttm_bo_unreserve(bo); - if (ret == -EDEADLK) { - /* uh oh, we lost out, drop every reservation and try - * to only reserve this buffer, then start ove...
2019 Sep 30
2
[Spice-devel] Xorg indefinitely hangs in kernelspace
> > On 05.09.19 15:34, Jaak Ristioja wrote: > > On 05.09.19 10:14, Gerd Hoffmann wrote: > >> On Tue, Aug 06, 2019 at 09:00:10PM +0300, Jaak Ristioja wrote: > >>> Hello! > >>> > >>> I'm writing to report a crash in the QXL / DRM code in the Linux kernel. > >>> I originally filed the issue on LaunchPad and more details can be
2014 May 14
17
[RFC PATCH v1 00/16] Convert all ttm drivers to use the new reservation interface
This series depends on the previously posted reservation api patches. 2 of them are not yet in for-next-fences branch of git://git.linaro.org/people/sumit.semwal/linux-3.x.git The missing patches are still in my vmwgfx_wip branch at git://people.freedesktop.org/~mlankhorst/linux All ttm drivers are converted to the fence api, fence_lock is removed and rcu is used in its place. qxl is the first
2019 Nov 20
2
Move io_reserve_lru handling into the driver
Just a gentle ping on this. Already got the Acked-by from Daniel, but I need some of the nouveau guys to test this since I can only compile test it. Regards, Christian.
2014 May 14
0
[RFC PATCH v1 06/16] drm/ttm: kill fence_lock
...gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index d7d34336f108..ce0434377223 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -414,24 +414,20 @@ static void ttm_bo_cleanup_refs_or_queue(struct ttm_buffer_object *bo) spin_lock(&glob->lru_lock); ret = __ttm_bo_reserve(bo, false, true, false, 0); - spin_lock(&bdev->fence_lock); - (void) ttm_bo_wait(bo, false, false, true); - if (!ret && !bo->sync_obj) { - spin_unlock(&bdev->fence_lock); - put_count = ttm_bo_del_from_lru(bo); + if (!ret) { + (void) ttm_bo_wait(bo, false, false, true);...
2014 Jul 31
19
[PATCH 01/19] fence: add debugging lines to fence_is_signaled for the callback
fence_is_signaled callback should support being run in atomic context, but not in irq context. Signed-off-by: Maarten Lankhorst <maarten.lankhorst at canonical.com> --- include/linux/fence.h | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/include/linux/fence.h b/include/linux/fence.h index d174585b874b..c1a4519ba2f5 100644 ---
2014 Jul 09
22
[PATCH 00/17] Convert TTM to the new fence interface.
This series applies on top of the driver-core-next branch of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git Before converting ttm to the new fence interface I had to fix some drivers to require a reservation before poking with fence_obj. After flipping the switch RCU becomes available instead, and the extra reservations can be dropped again. :-) I've done at least basic
2014 May 14
0
[RFC PATCH v1 12/16] drm/ttm: flip the switch, and convert to dma_fence
...*bo) { struct ttm_bo_device *bdev = bo->bdev; struct ttm_bo_global *glob = bo->glob; - struct ttm_bo_driver *driver = bdev->driver; - void *sync_obj = NULL; int put_count; int ret; @@ -415,9 +433,7 @@ static void ttm_bo_cleanup_refs_or_queue(struct ttm_buffer_object *bo) ret = __ttm_bo_reserve(bo, false, true, false, 0); if (!ret) { - (void) ttm_bo_wait(bo, false, false, true); - - if (!bo->sync_obj) { + if (!ttm_bo_wait(bo, false, false, true)) { put_count = ttm_bo_del_from_lru(bo); spin_unlock(&glob->lru_lock); @@ -426,8 +442,8 @@ static void ttm_bo_cleanup_r...
2014 Jul 09
0
[PATCH 13/17] drm/ttm: flip the switch, and convert to dma_fence
...*bo) { struct ttm_bo_device *bdev = bo->bdev; struct ttm_bo_global *glob = bo->glob; - struct ttm_bo_driver *driver = bdev->driver; - void *sync_obj = NULL; int put_count; int ret; @@ -415,9 +433,7 @@ static void ttm_bo_cleanup_refs_or_queue(struct ttm_buffer_object *bo) ret = __ttm_bo_reserve(bo, false, true, false, 0); if (!ret) { - (void) ttm_bo_wait(bo, false, false, true); - - if (!bo->sync_obj) { + if (!ttm_bo_wait(bo, false, false, true)) { put_count = ttm_bo_del_from_lru(bo); spin_unlock(&glob->lru_lock); @@ -426,8 +442,8 @@ static void ttm_bo_cleanup_r...
2020 Jan 24
4
TTM/Nouveau cleanups
Hi guys, I've already send this out in September last year, but only got a response from Daniel. Could you guys please test this and tell me what you think about it? Basically I'm trying to remove all driver specific features from TTM which don't need to be inside the framework. Thanks, Christian.