search for: nouveau_fence_sync

Displaying 20 results from an estimated 41 matches for "nouveau_fence_sync".

2018 Jan 11
3
[PATCH 0/3] drm/nouveau: Add support for fence FDs
...a.com> This small series of patches implements support for waiting on and emitting fence FDs on kickoff. This enables explicit fencing and can be used for example to synchronize buffer accesses between the display engine and the GPU on Tegra. The first patch lays the groundwork by splitting up nouveau_fence_sync() to allow reuse. Patch 2 is where the interesting stuff happens. It adds a new IOCTL (PUSHBUF2) that is a superset of the existing PUSHBUF IOCTL and reuses most of the code while adding support for pre- and post- fences. Finally, the third patch teaches Nouveau how to deal with fence arrays, whic...
2017 Apr 05
3
[Bug 100581] New: Memory corruption & crash in nouveau_fence_sync
https://bugs.freedesktop.org/show_bug.cgi?id=100581 Bug ID: 100581 Summary: Memory corruption & crash in nouveau_fence_sync Product: xorg Version: unspecified Hardware: Other OS: All Status: NEW Severity: normal Priority: medium Component: Driver/nouveau Assignee: nouveau at lists.freedesktop.org Reporter: jeremy...
2014 May 14
0
[RFC PATCH v1 04/16] drm/nouveau: require reservations for nouveau_fence_sync and nouveau_bo_fence
...goto fail_unpin; /* synchronise rendering channel with the kernel's channel */ spin_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-...
2020 Aug 28
8
[PATCH 0/6] drm/nouveau: Support sync FDs and sync objects
...found here: libdrm: https://gitlab.freedesktop.org/tagr/drm/-/commits/nouveau-sync-fd-v2/ mesa: https://gitlab.freedesktop.org/tagr/mesa/-/commits/nouveau-sync-fd/ I've verified that this works with kmscube's --atomic mode and Weston. Thierry Thierry Reding (6): drm/nouveau: Split nouveau_fence_sync() drm/nouveau: Add nouveau_fence_ref() drm/nouveau: Support fence FDs at kickoff drm/nouveau: Support sync FDs and syncobjs drm/nouveau: Support DMA fence arrays drm/nouveau: Allow zero pushbuffer submits drivers/gpu/drm/nouveau/dispnv04/crtc.c | 4 +- drivers/gpu/drm/nouveau/nouveau_...
2014 May 14
0
[RFC PATCH v1 07/16] drm/nouveau: rework to new fence interface
...e98af2e9a1cb..84aba3fa1bd0 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c @@ -959,7 +959,7 @@ nouveau_bo_move_m2mf(struct ttm_buffer_object *bo, int evict, bool intr, } mutex_lock_nested(&chan->cli->mutex, SINGLE_DEPTH_NESTING); - ret = nouveau_fence_sync(bo->sync_obj, chan); + ret = nouveau_fence_sync(nouveau_bo(bo), chan); if (ret == 0) { ret = drm->ttm.move(chan, bo, &bo->mem, new_mem); if (ret == 0) { @@ -1432,10 +1432,12 @@ nouveau_bo_fence_unref(void **sync_obj) void nouveau_bo_fence(struct nouveau_bo *nvbo, struct nouve...
2020 Aug 02
2
[PATCH] drm/nouveau: Drop mutex_lock_nested for atomic
...truct ttm_buffer_object *bo, int evict, bool intr, return ret; } - mutex_lock_nested(&cli->mutex, SINGLE_DEPTH_NESTING); + if (drm_drv_uses_atomic_modeset(drm->dev)) + mutex_lock(&cli->mutex); + else + mutex_lock_nested(&cli->mutex, SINGLE_DEPTH_NESTING); + ret = nouveau_fence_sync(nouveau_bo(bo), chan, true, intr); if (ret == 0) { ret = drm->ttm.move(chan, bo, &bo->mem, new_reg); -- 2.27.0
2010 Feb 01
4
[PATCH 1/3] Introduce nouveau_bo_wait for waiting on a BO with a GPU channel
nouveau_bo_wait will make the GPU channel wait for fence if possible, otherwise falling back to waiting with the CPU using ttm_bo_wait. The nouveau_fence_sync function currently returns -ENOSYS, and is the focus of the next patch. Signed-off-by: Luca Barbieri <luca at luca-barbieri.com> --- drivers/gpu/drm/nouveau/nouveau_bo.c | 68 ++++++++++++++++++++++++++++++- drivers/gpu/drm/nouveau/nouveau_drv.h | 2 + drivers/gpu/drm/nouveau/nouv...
2020 Sep 17
2
[PATCH] drm/nouveau: Drop mutex_lock_nested for atomic
...amp;cli->mutex, SINGLE_DEPTH_NESTING); > > + if (drm_drv_uses_atomic_modeset(drm->dev)) > > + mutex_lock(&cli->mutex); > > + else > > + mutex_lock_nested(&cli->mutex, SINGLE_DEPTH_NESTING); > > + > > ret = nouveau_fence_sync(nouveau_bo(bo), chan, true, intr); > > if (ret == 0) { > > ret = drm->ttm.move(chan, bo, &bo->mem, new_reg); > > Well if you're certain it works now. :) > > Reviewed-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com> > -...
2010 Feb 09
2
[PATCH 1/3] Introduce nouveau_bo_wait for waiting on a BO with a GPU channel (v2)
Changes in v2: - Addressed review comments nouveau_bo_wait will make the GPU channel wait for fence if possible, otherwise falling back to waiting with the CPU using ttm_bo_wait. The nouveau_fence_sync function currently returns -ENOSYS, and is the focus of the next patch. Signed-off-by: Luca Barbieri <luca at luca-barbieri.com> --- drivers/gpu/drm/nouveau/nouveau_bo.c | 68 ++++++++++++++++++++++++++++++- drivers/gpu/drm/nouveau/nouveau_drv.h | 2 + drivers/gpu/drm/nouveau/nouv...
2009 Dec 25
1
[PATCH] drm/nv50: synchronize user channel after buffer object move on kernel channel
...u_drv.h" #include "nouveau_dma.h" @@ -457,6 +456,13 @@ nouveau_bo_move_accel_cleanup(struct nouveau_channel *chan, if (ret) return ret; + /* Make the user channel wait for the kernel channel to be done. */ + if (nvbo->channel && chan != nvbo->channel) { + ret = nouveau_fence_sync(nvbo->channel, fence); + if (ret) + return ret; + } + ret = ttm_bo_move_accel_cleanup(&nvbo->bo, fence, NULL, evict, no_wait, new_mem); nouveau_fence_unref((void *)&fence); diff --git a/drivers/gpu/drm/nouveau/nouveau_channel.c b/drivers/gpu/drm/nouveau/nouveau_channel.c...
2017 Mar 21
0
use-after-free bug with GT218 on arm64 machine
...fa1f7f2d20c>] SyS_ioctl+0x8c/0xa0 [<ffffffa1f7cf3730>] el0_svc_naked+0x24/0x28 """ Enabling KASAN gives some additional information, many reports similar to """ ================================================================== BUG: KASAN: use-after-free in nouveau_fence_sync+0x154/0x398 [nouveau] at addr ffffffd69064f808 Read of size 8 by task gnome-shell/3366 CPU: 4 PID: 3366 Comm: gnome-shell Tainted: G W 4.11.0-rc3-00407-g97da3854c526 #1 Hardware name: AMD Seattle/Seattle, BIOS 11:14:27 Mar 20 2017 Cal...
2020 Sep 30
2
[PATCH] drm/nouveau: Drop mutex_lock_nested for atomic
...; + if (drm_drv_uses_atomic_modeset(drm->dev)) > > > > + mutex_lock(&cli->mutex); > > > > + else > > > > + mutex_lock_nested(&cli->mutex, SINGLE_DEPTH_NESTING); > > > > + > > > > ret = nouveau_fence_sync(nouveau_bo(bo), chan, true, intr); > > > > if (ret == 0) { > > > > ret = drm->ttm.move(chan, bo, &bo->mem, new_reg); > > > > > > Well if you're certain it works now. :) > > > > > > Reviewed-by: Maarten Lan...
2014 Sep 23
2
[PATCH] drm/nv84+: fix fence context seqno's
On Tue, Sep 23, 2014 at 2:23 AM, Ted Percival <ted at tedp.id.au> wrote: > On 09/22/2014 03:08 AM, Maarten Lankhorst wrote: >> This fixes a regression introduced by "drm/nouveau: rework to new fence interface" >> (commit 29ba89b2371d466). >> >> The fence sequence should not be reset after creation, the old value is used instead. >> On destruction
2014 Sep 26
14
[RFC] Explicit synchronization for Nouveau
...nchronization model? Do you think we could use the android sync_fence for passing fences between user space? Or did you have something else in mind for explicit sync in the drm world? Thanks, Lauri Lauri Peltonen (7): android: Support creating sync fence from drm fences drm/nouveau: Split nouveau_fence_sync drm/nouveau: Add fence fd helpers drm/nouveau: Support fence fd's at kickoff libdrm: nouveau: Support fence fds drm/nouveau: Support marking buffers for explicit sync drm/prime: Support explicit fence on export -- 1.8.1.5
2009 Dec 27
3
[PATCH 1/2] drm/nv50: align size of buffer object to the right boundaries.
- Depth and stencil buffers are supposed to be large enough in general. Signed-off-by: Maarten Maathuis <madman2003 at gmail.com> --- drivers/gpu/drm/nouveau/nouveau_bo.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index e342a41..9fc4bd6 100644 ---
2020 Sep 30
1
[PATCH] drm/nouveau: Drop mutex_lock_nested for atomic
...v)) > > > > > > + mutex_lock(&cli->mutex); > > > > > > + else > > > > > > + mutex_lock_nested(&cli->mutex, SINGLE_DEPTH_NESTING); > > > > > > + > > > > > > ret = nouveau_fence_sync(nouveau_bo(bo), chan, true, intr); > > > > > > if (ret == 0) { > > > > > > ret = drm->ttm.move(chan, bo, &bo->mem, new_reg); > > > > > > > > > > Well if you're certain it works now. :) > > >...
2017 Mar 28
5
[Bug 100431] New: nv50: memory corruption due to use-after-free of dma_fence
...fa1f7f2d20c>] SyS_ioctl+0x8c/0xa0 [<ffffffa1f7cf3730>] el0_svc_naked+0x24/0x28 """ Enabling KASAN gives some additional information, many reports similar to """ ================================================================== BUG: KASAN: use-after-free in nouveau_fence_sync+0x154/0x398 [nouveau] at addr ffffffd69064f808 Read of size 8 by task gnome-shell/3366 CPU: 4 PID: 3366 Comm: gnome-shell Tainted: G W 4.11.0-rc3-00407-g97da3854c526 #1 Hardware name: AMD Seattle/Seattle, BIOS 11:14:27 Mar 20 2017 Cal...
2014 May 14
0
[RFC PATCH v1 06/16] drm/ttm: kill fence_lock
..._crtc *crtc, struct drm_framebuffer *fb, goto fail_unpin; /* synchronise rendering channel with the kernel's channel */ - spin_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..6cd5298...
2014 May 14
17
[RFC PATCH v1 00/16] Convert all ttm drivers to use the new reservation interface
...u synchronization patch series. --- Maarten Lankhorst (16): drm/ttm: add interruptible parameter to ttm_eu_reserve_buffers drm/ttm: kill off some members to ttm_validate_buffer drm/nouveau: add reservation to nouveau_gem_ioctl_cpu_prep drm/nouveau: require reservations for nouveau_fence_sync and nouveau_bo_fence drm/ttm: call ttm_bo_wait while inside a reservation drm/ttm: kill fence_lock drm/nouveau: rework to new fence interface drm/radeon: use common fence implementation for fences drm/qxl: rework to new fence interface drm/vmwgfx: get rid of diff...
2014 Jul 09
22
[PATCH 00/17] Convert TTM to the new fence interface.
...testing is definitely welcomed! --- Maarten Lankhorst (17): drm/ttm: add interruptible parameter to ttm_eu_reserve_buffers drm/ttm: kill off some members to ttm_validate_buffer drm/nouveau: add reservation to nouveau_gem_ioctl_cpu_prep drm/nouveau: require reservations for nouveau_fence_sync and nouveau_bo_fence drm/ttm: call ttm_bo_wait while inside a reservation drm/ttm: kill fence_lock drm/nouveau: rework to new fence interface drm/radeon: add timeout argument to radeon_fence_wait_seq drm/radeon: use common fence implementation for fences drm/qxl:...