search for: nouveau_mm_free

Displaying 9 results from an estimated 9 matches for "nouveau_mm_free".

2012 Oct 11
4
[PATCH] drm/nouveau: fix nouveau_mm/nouveau_mm_node leak
...drm/nouveau/core/core/gpuobj.c index c2a7608..48121d2 100644 --- a/drivers/gpu/drm/nouveau/core/core/gpuobj.c +++ b/drivers/gpu/drm/nouveau/core/core/gpuobj.c @@ -39,8 +39,11 @@ nouveau_gpuobj_destroy(struct nouveau_gpuobj *gpuobj) nv_wo32(gpuobj, i, 0x00000000); } + if (gpuobj->node) + nouveau_mm_free(gpuobj->node_heap, &gpuobj->node); + if (gpuobj->heap.block_size) - nouveau_mm_fini(&gpuobj->heap); + WARN_ON(nouveau_mm_fini(&gpuobj->heap)); nouveau_object_destroy(&gpuobj->base); } @@ -114,6 +117,7 @@ nouveau_gpuobj_create_(struct nouveau_object *parent...
2013 Jul 29
0
[PATCH] drm/nouveau: protect vm refcount with mutex
...t;] dump_stack+0x55/0x86 [<ffffffff81059e1d>] warn_slowpath_common+0x87/0xaf [<ffffffff81059e5a>] warn_slowpath_null+0x15/0x17 [<ffffffffa02d6109>] nouveau_mm_fini+0x4f/0x56 [nouveau] [<ffffffffa02f5703>] nouveau_vm_ref+0x154/0x180 [nouveau] [<ffffffffa02d5cdb>] ? nouveau_mm_free+0x85/0x116 [nouveau] [<ffffffffa02f57c9>] nouveau_vm_put+0x9a/0xb0 [nouveau] [<ffffffffa033462d>] ? nouveau_gem_info+0x9d/0x9d [nouveau] [<ffffffffa0334646>] nouveau_gem_object_delete+0x19/0x28 [nouveau] [<ffffffffa032fc90>] nouveau_fence_work+0xc9/0x102 [nouveau] [<...
2013 Jul 19
0
[PATCH 10/11] drm/nvc0/fb: Take lock in nvc0_ram_put()
...ULL; - if (unlikely(mem == NULL)) - return; - - mutex_lock(&pfb->base.mutex); while (!list_empty(&mem->regions)) { this = list_first_entry(&mem->regions, typeof(*this), rl_entry); @@ -46,6 +39,19 @@ nv50_ram_put(struct nouveau_fb *pfb, struct nouveau_mem **pmem) } nouveau_mm_free(&pfb->tags, &mem->tag); +} + +void +nv50_ram_put(struct nouveau_fb *pfb, struct nouveau_mem **pmem) +{ + struct nouveau_mem *mem = *pmem; + + *pmem = NULL; + if (unlikely(mem == NULL)) + return; + + mutex_lock(&pfb->base.mutex); + __nv50_ram_put(pfb, mem); mutex_unlock(&...
2014 Mar 23
0
[PATCH] drm/nouveau: allow nv04/nv50/nvc0+ parts of the driver to be separated
...#include <core/mm.h> + +void +__nv50_ram_put(struct nouveau_fb *pfb, struct nouveau_mem *mem) +{ + struct nouveau_mm_node *this; + + while (!list_empty(&mem->regions)) { + this = list_first_entry(&mem->regions, typeof(*this), rl_entry); + + list_del(&this->rl_entry); + nouveau_mm_free(&pfb->vram, &this); + } + + nouveau_mm_free(&pfb->tags, &mem->tag); +} + +void +nv50_ram_put(struct nouveau_fb *pfb, struct nouveau_mem **pmem) +{ + struct nouveau_mem *mem = *pmem; + + *pmem = NULL; + if (unlikely(mem == NULL)) + return; + + mutex_lock(&pfb->base.m...
2014 Jun 17
0
[PATCH try 2 2/2] gallium/nouveau: move pushbuf and fences to context
...urrent_ one, and remove both. + */ + nouveau_fence_ref(nv50->base.fence.current, &current); + nouveau_fence_wait(current); + nouveau_fence_ref(NULL, &current); + nouveau_fence_ref(NULL, &nv50->base.fence.current); + } + if (nv50->fence.mm) { + nouveau_mm_free(nv50->fence.mm); + nouveau_bo_ref(NULL, &nv50->fence.bo); + } nv50_context_unreference_resources(nv50); @@ -138,6 +154,40 @@ nv50_destroy(struct pipe_context *pipe) nouveau_context_destroy(&nv50->base); } + +static void +nv50_context_fence_emit(struct nouveau_...
2013 Mar 27
3
[PATCH 1/4] drm/nvc0: implement VRAM compression
...v *)ltcg; + int ret; + + ret = nouveau_mm_head(&priv->tags, 1, n, n, 1, pnode); + if (ret) + *pnode = NULL; + + return ret; +} + +static void +nvc0_ltcg_tags_free(struct nouveau_ltcg *ltcg, struct nouveau_mm_node **pnode) +{ + struct nvc0_ltcg_priv *priv = (struct nvc0_ltcg_priv *)ltcg; + + nouveau_mm_free(&priv->tags, pnode); +} + +static void +nvc0_ltcg_tags_clear(struct nouveau_ltcg *ltcg, u32 first, u32 count) +{ + struct nvc0_ltcg_priv *priv = (struct nvc0_ltcg_priv *)ltcg; + u32 last = first + count - 1; + int p, i; + + BUG_ON((first > last) || (last >= priv->num_tags)); + + nv_...
2014 Jun 17
2
[PATCH try 2 1/2] gallium/nouveau: decouple nouveau_fence implementation from screen
Signed-off-by: Maarten Lankhorst <maarten.lankhorst at canonical.com> --- src/gallium/drivers/nouveau/nouveau_fence.c | 76 ++++++++++++------------- src/gallium/drivers/nouveau/nouveau_fence.h | 22 +++++-- src/gallium/drivers/nouveau/nouveau_screen.c | 9 +++ src/gallium/drivers/nouveau/nouveau_screen.h | 14 ++--- src/gallium/drivers/nouveau/nv30/nv30_context.c | 4 +-
2014 Jun 21
3
[Mesa-dev] [PATCH try 2 2/2] gallium/nouveau: move pushbuf and fences to context
...*/ > + nouveau_fence_ref(nv50->base.fence.current, &current); > + nouveau_fence_wait(current); > + nouveau_fence_ref(NULL, &current); > + nouveau_fence_ref(NULL, &nv50->base.fence.current); > + } > + if (nv50->fence.mm) { > + nouveau_mm_free(nv50->fence.mm); > + nouveau_bo_ref(NULL, &nv50->fence.bo); > + } > > nv50_context_unreference_resources(nv50); > > @@ -138,6 +154,40 @@ nv50_destroy(struct pipe_context *pipe) > nouveau_context_destroy(&nv50->base); > } > > + > +sta...
2014 Jun 16
2
[PATCH 1/2] gallium/nouveau: decouple nouveau_fence implementation from screen
Signed-off-by: Maarten Lankhorst <maarten.lankhorst at canonical.com> --- src/gallium/drivers/nouveau/nouveau_fence.c | 76 ++++++++++++------------- src/gallium/drivers/nouveau/nouveau_fence.h | 22 +++++-- src/gallium/drivers/nouveau/nouveau_screen.c | 9 +++ src/gallium/drivers/nouveau/nouveau_screen.h | 14 ++--- src/gallium/drivers/nouveau/nv30/nv30_context.c | 4