search for: nouveau_bo_vma_del

Displaying 20 results from an estimated 25 matches for "nouveau_bo_vma_del".

2012 Oct 12
0
[PATCH 2/3] drm/nouveau: add reservation to nouveau_bo_vma_del
...veau_gem.c | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index 2fa736d..cee7448 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c @@ -1551,9 +1551,25 @@ nouveau_bo_vma_del(struct nouveau_bo *nvbo, struct nouveau_vma *vma) { if (vma->node) { if (nvbo->bo.mem.mem_type != TTM_PL_SYSTEM) { + ttm_bo_reserve(&nvbo->bo, false, false, false, 0); spin_lock(&nvbo->bo.bdev->fence_lock); ttm_bo_wait(&nvbo->bo, false, false, false);...
2014 Sep 22
2
[PATCH] drm/nv84+: fix fence context seqno's
...> --- diff --git a/drivers/gpu/drm/nouveau/nv84_fence.c b/drivers/gpu/drm/nouveau/nv84_fence.c index 7b372a68aa4e..4138db4d8291 100644 --- a/drivers/gpu/drm/nouveau/nv84_fence.c +++ b/drivers/gpu/drm/nouveau/nv84_fence.c @@ -120,6 +120,7 @@ nv84_fence_context_del(struct nouveau_channel *chan) nouveau_bo_vma_del(bo, &fctx->dispc_vma[i]); } + nouveau_bo_wr32(priv->bo, chan->chid * 16 / 4, fctx->base.sequence); nouveau_bo_vma_del(priv->bo, &fctx->vma_gart); nouveau_bo_vma_del(priv->bo, &fctx->vma); nouveau_fence_context_del(&fctx->base); @@ -159,8 +160,6 @...
2014 Sep 22
0
[PATCH] drm/nv84+: fix fence context seqno's
...vers/gpu/drm/nouveau/nv84_fence.c b/drivers/gpu/drm/nouveau/nv84_fence.c > index 7b372a68aa4e..4138db4d8291 100644 > --- a/drivers/gpu/drm/nouveau/nv84_fence.c > +++ b/drivers/gpu/drm/nouveau/nv84_fence.c > @@ -120,6 +120,7 @@ nv84_fence_context_del(struct nouveau_channel *chan) > nouveau_bo_vma_del(bo, &fctx->dispc_vma[i]); > } > > + nouveau_bo_wr32(priv->bo, chan->chid * 16 / 4, fctx->base.sequence); > nouveau_bo_vma_del(priv->bo, &fctx->vma_gart); > nouveau_bo_vma_del(priv->bo, &fctx->vma); > nouveau_fence_context_del(&fctx...
2014 Sep 23
2
[PATCH] drm/nv84+: fix fence context seqno's
....c b/drivers/gpu/drm/nouveau/nv84_fence.c >> index 7b372a68aa4e..4138db4d8291 100644 >> --- a/drivers/gpu/drm/nouveau/nv84_fence.c >> +++ b/drivers/gpu/drm/nouveau/nv84_fence.c >> @@ -120,6 +120,7 @@ nv84_fence_context_del(struct nouveau_channel *chan) >> nouveau_bo_vma_del(bo, &fctx->dispc_vma[i]); >> } >> >> + nouveau_bo_wr32(priv->bo, chan->chid * 16 / 4, fctx->base.sequence); >> nouveau_bo_vma_del(priv->bo, &fctx->vma_gart); >> nouveau_bo_vma_del(priv->bo, &fctx->vma); >>...
2012 Nov 25
1
[PATCH] drm/nouveau: unpin pushbuffer bo before destroying it
.../drivers/gpu/drm/nouveau/nouveau_chan.c index 1363578..174300b 100644 --- a/drivers/gpu/drm/nouveau/nouveau_chan.c +++ b/drivers/gpu/drm/nouveau/nouveau_chan.c @@ -76,6 +76,8 @@ nouveau_channel_del(struct nouveau_channel **pchan) nouveau_object_del(client, NVDRM_DEVICE, chan->push.handle); nouveau_bo_vma_del(chan->push.buffer, &chan->push.vma); nouveau_bo_unmap(chan->push.buffer); + if (chan->push.buffer && chan->push.buffer->pin_refcnt) + nouveau_bo_unpin(chan->push.buffer); nouveau_bo_ref(NULL, &chan->push.buffer); kfree(chan); } -- 1.7.12
2013 Jul 02
0
[PATCH] drm/nouveau: handle framebuffer pinning correctly
...git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c index ecbfe69..839b7e7 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c @@ -385,6 +385,7 @@ out_unlock: mutex_unlock(&dev->struct_mutex); if (chan) nouveau_bo_vma_del(nvbo, &fbcon->nouveau_fb.vma); + nouveau_bo_unmap(nvbo); out_unpin: nouveau_bo_unpin(nvbo); out_unref: @@ -415,6 +416,12 @@ nouveau_fbcon_destroy(struct drm_device *dev, struct nouveau_fbdev *fbcon) } if (nouveau_fb->nvbo) { + struct drm_crtc *crtc; + + list_for_each_entry(crt...
2012 Nov 22
0
[resend PATCH] drm/nouveau: unpin buffers before releasing to prevent lockdep warnings
...rs/gpu/drm/nouveau/nouveau_abi16.c b/drivers/gpu/drm/nouveau/nouveau_abi16.c index cc79c79..acc6b08 100644 --- a/drivers/gpu/drm/nouveau/nouveau_abi16.c +++ b/drivers/gpu/drm/nouveau/nouveau_abi16.c @@ -123,6 +123,7 @@ nouveau_abi16_chan_fini(struct nouveau_abi16 *abi16, if (chan->ntfy) { nouveau_bo_vma_del(chan->ntfy, &chan->ntfy_vma); + nouveau_bo_unpin(chan->ntfy); drm_gem_object_unreference_unlocked(chan->ntfy->gem); } diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c index 67a1a06..f337976 100644 --- a/drivers/gpu/drm/nouveau...
2012 Oct 12
0
[PATCH 3/3, resend with fixed to field] drm/nouveau: unpin buffers before releasing to prevent lockdep warnings
...rs/gpu/drm/nouveau/nouveau_abi16.c b/drivers/gpu/drm/nouveau/nouveau_abi16.c index cc79c79..acc6b08 100644 --- a/drivers/gpu/drm/nouveau/nouveau_abi16.c +++ b/drivers/gpu/drm/nouveau/nouveau_abi16.c @@ -123,6 +123,7 @@ nouveau_abi16_chan_fini(struct nouveau_abi16 *abi16, if (chan->ntfy) { nouveau_bo_vma_del(chan->ntfy, &chan->ntfy_vma); + nouveau_bo_unpin(chan->ntfy); drm_gem_object_unreference_unlocked(chan->ntfy->gem); } diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c index 67a1a06..f337976 100644 --- a/drivers/gpu/drm/nouveau...
2013 Sep 02
2
[PATCH] drm/nv84-: write fence value on exit, and restore value on init.
...chan *fctx = chan->fence; + struct nouveau_fifo_chan *fifo = (void *)chan->object; int i; + nouveau_bo_wr32(priv->bo, fifo->chid * 16/4, fctx->base.sequence); + for (i = 0; i < dev->mode_config.num_crtc; i++) { struct nouveau_bo *bo = nv50_display_crtc_sema(dev, i); nouveau_bo_vma_del(bo, &fctx->dispc_vma[i]); @@ -168,7 +171,7 @@ nv84_fence_context_new(struct nouveau_channel *chan) ret = nouveau_bo_vma_add(bo, client->vm, &fctx->dispc_vma[i]); } - nouveau_bo_wr32(priv->bo, fifo->chid * 16/4, 0x00000000); + fctx->base.sequence = nouveau_bo_rd32(pr...
2017 Aug 03
0
[PATCH 17/29] drm/nouveau: switch to drm_*{get, put} helpers
...vers/gpu/drm/nouveau/nouveau_abi16.c b/drivers/gpu/drm/nouveau/nouveau_abi16.c index f98f800..3e9db5a 100644 --- a/drivers/gpu/drm/nouveau/nouveau_abi16.c +++ b/drivers/gpu/drm/nouveau/nouveau_abi16.c @@ -136,7 +136,7 @@ nouveau_abi16_chan_fini(struct nouveau_abi16 *abi16, if (chan->ntfy) { nouveau_bo_vma_del(chan->ntfy, &chan->ntfy_vma); nouveau_bo_unpin(chan->ntfy); - drm_gem_object_unreference_unlocked(&chan->ntfy->gem); + drm_gem_object_put_unlocked(&chan->ntfy->gem); } if (chan->heap.block_size) diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/...
2017 Aug 03
0
[PATCH 17/29] drm/nouveau: switch to drm_*{get, put} helpers
...bi16.c b/drivers/gpu/drm/nouveau/nouveau_abi16.c > index f98f800..3e9db5a 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_abi16.c > +++ b/drivers/gpu/drm/nouveau/nouveau_abi16.c > @@ -136,7 +136,7 @@ nouveau_abi16_chan_fini(struct nouveau_abi16 *abi16, > if (chan->ntfy) { > nouveau_bo_vma_del(chan->ntfy, &chan->ntfy_vma); > nouveau_bo_unpin(chan->ntfy); > - drm_gem_object_unreference_unlocked(&chan->ntfy->gem); > + drm_gem_object_put_unlocked(&chan->ntfy->gem); > } > > if (chan->heap.block_size) > diff --git a/drivers/g...
2017 Aug 03
2
[PATCH 00/29] DRM API conversions
This patch set replaces the occurrences of drm_*_reference() and drm_*_unreference() with the new drm_*_get() and drm_*_put() functions. All patches in the series do the same thing, converting to the new APIs. I created patches per DRM driver as suggested by Daniel Vetter. Background: In the kernel, reference counting APIs use *_get(), *_put() style naming to reference-count the objects. But DRM
2013 Nov 12
6
[PATCH 1/7] drm/nouveau: fix m2mf copy to tiled gart
From: Maarten Lankhorst <maarten.lankhorst at canonical.com> Commit de7b7d59d54852c introduced tiled GART, but a linear copy is still performed. This may result in errors on eviction, fix it by checking tiling from memtype. Signed-off-by: Maarten Lankhorst <maarten.lankhorst at canonical.com> Cc: stable at vger.kernel.org #3.10+ --- drivers/gpu/drm/nouveau/nouveau_bo.c | 33
2013 Sep 04
0
[PATCH] drm/nv84-: write fence value on exit, and restore value on init.
...>object; > int i; > > + nouveau_bo_wr32(priv->bo, fifo->chid * 16/4, fctx->base.sequence); > + > for (i = 0; i < dev->mode_config.num_crtc; i++) { > struct nouveau_bo *bo = nv50_display_crtc_sema(dev, i); > nouveau_bo_vma_del(bo, &fctx->dispc_vma[i]); > @@ -168,7 +171,7 @@ nv84_fence_context_new(struct nouveau_channel *chan) > ret = nouveau_bo_vma_add(bo, client->vm, &fctx->dispc_vma[i]); > } > > - nouveau_bo_wr32(priv->bo, fifo->chid * 16/4, 0x00000000...
2014 May 14
0
[RFC PATCH v1 03/16] drm/nouveau: add reservation to nouveau_gem_ioctl_cpu_prep
Apart from some code inside ttm itself and nouveau_bo_vma_del, this is the only place where ttm_bo_wait is used without a reservation. Fix this so we can remove the fence_lock later on. After the switch to rcu the reservation lock will be removed again. Signed-off-by: Maarten Lankhorst <maarten.lankhorst at canonical.com> --- drivers/gpu/drm/nouveau/...
2014 May 19
0
[PATCH 3/4] drm/nouveau: hook up cache sync functions
...eau/nouveau_bo.h b/drivers/gpu/drm/nouveau/nouveau_bo.h index ff17c1f432fc..ead214931223 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.h +++ b/drivers/gpu/drm/nouveau/nouveau_bo.h @@ -89,6 +89,26 @@ int nouveau_bo_vma_add(struct nouveau_bo *, struct nouveau_vm *, struct nouveau_vma *); void nouveau_bo_vma_del(struct nouveau_bo *, struct nouveau_vma *); +#if IS_ENABLED(CONFIG_ARCH_TEGRA) +#define NOUVEAU_NEED_CACHE_SYNC +#endif + +#ifdef NOUVEAU_NEED_CACHE_SYNC +void nouveau_bo_sync_for_cpu(struct nouveau_bo *); +void nouveau_bo_sync_for_device(struct nouveau_bo *); +#else +static inline void +nouveau_...
2013 Jun 18
1
kernel bug nouveau, total system hang, X crashed
...9248] [<ffffffffa01b4c6d>] nv84_graph_tlb_flush+0x28d/0x2c0 [nouveau] 2013-06-14T04:23:09.916372+02:00 linux-zxd7 kernel: [305129.599370] [<ffffffffa016cec8>] nv50_vm_flush+0x78/0x90 [nouveau] 2013-06-14T04:23:09.916373+02:00 linux-zxd7 kernel: [305129.599457] [<ffffffffa01c311a>] nouveau_bo_vma_del+0x9a/0xa0 [nouveau] 2013-06-14T04:23:09.916374+02:00 linux-zxd7 kernel: [305129.599601] [<ffffffffa01c5040>] nouveau_abi16_chan_fini.isra.1+0xa0/0x170 [nouveau] 2013-06-14T04:23:09.916375+02:00 linux-zxd7 kernel: [305129.599747] [<ffffffffa01c5310>] nouveau_abi16_fini+0x30/0x80 [nouveau...
2014 May 19
8
[PATCH 0/4] drm/ttm: nouveau: memory coherency fixes for ARM
This small series introduces TTM helper functions as well as Nouveau hooks that are needed to ensure buffer coherency on ARM. Most of this series is a forward-port of some patches Lucas Stach sent last year and that are also needed for Nouveau GK20A support: http://lists.freedesktop.org/archives/nouveau/2013-August/014026.html Another patch takes care of flushing the CPU write-buffer when
2017 Aug 08
5
[PATCH libdrm] drm: Remove create_handle() drm_framebuffer "virtual".
...INFO(drm, "allocated %dx%d fb: 0x%llx, bo %p\n", - fb->base.width, fb->base.height, fb->nvbo->bo.offset, nvbo); + fb->base.width, fb->base.height, nvbo->bo.offset, nvbo); vga_switcheroo_client_fb_set(dev->pdev, info); return 0; out_unlock: if (chan) - nouveau_bo_vma_del(fb->nvbo, &fb->vma); - nouveau_bo_unmap(fb->nvbo); + nouveau_bo_vma_del(nvbo, &fb->vma); + nouveau_bo_unmap(nvbo); out_unpin: - nouveau_bo_unpin(fb->nvbo); + nouveau_bo_unpin(nvbo); out_unref: - nouveau_bo_ref(NULL, &fb->nvbo); + nouveau_bo_ref(NULL, &nvbo); ou...
2017 Aug 08
5
[PATCH libdrm] drm: Remove create_handle() drm_framebuffer "virtual".
...INFO(drm, "allocated %dx%d fb: 0x%llx, bo %p\n", - fb->base.width, fb->base.height, fb->nvbo->bo.offset, nvbo); + fb->base.width, fb->base.height, nvbo->bo.offset, nvbo); vga_switcheroo_client_fb_set(dev->pdev, info); return 0; out_unlock: if (chan) - nouveau_bo_vma_del(fb->nvbo, &fb->vma); - nouveau_bo_unmap(fb->nvbo); + nouveau_bo_vma_del(nvbo, &fb->vma); + nouveau_bo_unmap(nvbo); out_unpin: - nouveau_bo_unpin(fb->nvbo); + nouveau_bo_unpin(nvbo); out_unref: - nouveau_bo_ref(NULL, &fb->nvbo); + nouveau_bo_ref(NULL, &nvbo); ou...