search for: vaddr_max

Displaying 10 results from an estimated 10 matches for "vaddr_max".

2015 Nov 09
2
[PATCH] instmem/gk20a: fix race conditions
...ser left... */ + WARN_ON(obj->use_cpt); + list_del(&obj->vaddr_node); + vunmap(obj->vaddr); + obj->vaddr = NULL; + imem->vaddr_use -= nvkm_memory_size(&obj->memory); + nvkm_debug(&imem->base.subdev, "vaddr used: %x/%x\n", imem->vaddr_use, + imem->vaddr_max); +} + +/* + * Must be called while holding gk20a_instmem::lock */ static void gk20a_instmem_vaddr_gc(struct gk20a_instmem *imem, const u64 size) { while (imem->vaddr_use + size > imem->vaddr_max) { - struct gk20a_instobj *obj; - /* no candidate that can be unmapped, abort... */...
2015 Nov 11
0
[PATCH] instmem/gk20a: fix race conditions
...gt;use_cpt); > + list_del(&obj->vaddr_node); > + vunmap(obj->vaddr); > + obj->vaddr = NULL; > + imem->vaddr_use -= nvkm_memory_size(&obj->memory); > + nvkm_debug(&imem->base.subdev, "vaddr used: %x/%x\n", imem->vaddr_use, > + imem->vaddr_max); > +} > + > +/* > + * Must be called while holding gk20a_instmem::lock > */ > static void > gk20a_instmem_vaddr_gc(struct gk20a_instmem *imem, const u64 size) > { > while (imem->vaddr_use + size > imem->vaddr_max) { > - struct gk20a_instobj *obj; >...
2015 Oct 26
2
[PATCH] instmem/gk20a: exclusively acquire instobjs
...acquire(struct nvkm_memory *memory) goto out; } + size = nvkm_memory_size(memory); + /* try to free some address space if we reached the limit */ gk20a_instmem_vaddr_gc(imem, size); @@ -218,8 +220,6 @@ gk20a_instobj_acquire(struct nvkm_memory *memory) imem->vaddr_use, imem->vaddr_max); out: - spin_unlock_irqrestore(&imem->lock, flags); - return node->vaddr; } @@ -229,14 +229,11 @@ gk20a_instobj_release(struct nvkm_memory *memory) struct gk20a_instobj *node = gk20a_instobj(memory); struct gk20a_instmem *imem = node->imem; struct nvkm_ltc *ltc = imem-&g...
2023 Dec 08
1
[PATCH] drm/nouveau: Fixup gk20a instobj hierarchy
...(obj->base.vaddr); obj->base.vaddr = NULL; - imem->vaddr_use -= nvkm_memory_size(&obj->base.memory); + imem->vaddr_use -= nvkm_memory_size(&obj->base.base.memory); nvkm_debug(&imem->base.subdev, "vaddr used: %x/%x\n", imem->vaddr_use, imem->vaddr_max); } @@ -283,7 +283,7 @@ gk20a_instobj_map(struct nvkm_memory *memory, u64 offset, struct nvkm_vmm *vmm, { struct gk20a_instobj *node = gk20a_instobj(memory); struct nvkm_vmm_map map = { - .memory = &node->memory, + .memory = &node->base.memory, .offset = offset, .mem = n...
2015 Nov 04
0
[PATCH] instmem/gk20a: exclusively acquire instobjs
...ut; > } > > + size = nvkm_memory_size(memory); > + > /* try to free some address space if we reached the limit */ > gk20a_instmem_vaddr_gc(imem, size); > > @@ -218,8 +220,6 @@ gk20a_instobj_acquire(struct nvkm_memory *memory) > imem->vaddr_use, imem->vaddr_max); > > out: > - spin_unlock_irqrestore(&imem->lock, flags); > - > return node->vaddr; > } > > @@ -229,14 +229,11 @@ gk20a_instobj_release(struct nvkm_memory *memory) > struct gk20a_instobj *node = gk20a_instobj(memory); > struct gk20a_instmem *imem...
2016 Feb 24
0
[PATCH] instmem/gk20a: set DMA mask early
...evice *device, int index, spin_lock_init(&imem->lock); *pimem = &imem->base; + ret = dma_set_mask(device->dev, DMA_BIT_MASK(tdev->func->iommu_bit)); + if (ret) + return ret; + /* do not allow more than 1MB of CPU-mapped instmem */ imem->vaddr_use = 0; imem->vaddr_max = 0x100000; -- 2.7.1
2023 Dec 14
1
[PATCH] drm/nouveau: Fixup gk20a instobj hierarchy
...obj->base.vaddr = NULL; > - imem->vaddr_use -= nvkm_memory_size(&obj->base.memory); > + imem->vaddr_use -= nvkm_memory_size(&obj->base.base.memory); > nvkm_debug(&imem->base.subdev, "vaddr used: %x/%x\n", imem->vaddr_use, > imem->vaddr_max); > } > @@ -283,7 +283,7 @@ gk20a_instobj_map(struct nvkm_memory *memory, u64 offset, struct nvkm_vmm *vmm, > { > struct gk20a_instobj *node = gk20a_instobj(memory); > struct nvkm_vmm_map map = { > - .memory = &node->memory, > + .memory = &node->base.m...
2015 Nov 11
2
[PATCH] instmem/gk20a: use DMA API CPU mapping
...; - imem->vaddr_use -= nvkm_memory_size(&obj->memory); + vunmap(obj->base.vaddr); + obj->base.vaddr = NULL; + imem->vaddr_use -= nvkm_memory_size(&obj->base.memory); nvkm_debug(&imem->base.subdev, "vaddr used: %x/%x\n", imem->vaddr_use, imem->vaddr_max); } @@ -187,17 +159,30 @@ gk20a_instmem_vaddr_gc(struct gk20a_instmem *imem, const u64 size) if (list_empty(&imem->vaddr_lru)) break; - gk20a_instobj_recycle_vaddr(list_first_entry(&imem->vaddr_lru, - struct gk20a_instobj, vaddr_node)); + gk20a_instobj_iommu_recyc...
2015 Nov 11
0
[PATCH] instmem/gk20a: use DMA API CPU mapping
...nvkm_memory_size(&obj->memory); > + vunmap(obj->base.vaddr); > + obj->base.vaddr = NULL; > + imem->vaddr_use -= nvkm_memory_size(&obj->base.memory); > nvkm_debug(&imem->base.subdev, "vaddr used: %x/%x\n", imem->vaddr_use, > imem->vaddr_max); > } > @@ -187,17 +159,30 @@ gk20a_instmem_vaddr_gc(struct gk20a_instmem *imem, const u64 size) > if (list_empty(&imem->vaddr_lru)) > break; > > - gk20a_instobj_recycle_vaddr(list_first_entry(&imem->vaddr_lru, > - struct gk20a_instobj, vaddr_n...
2019 Sep 16
15
[PATCH 00/11] drm/nouveau: Enable GP10B by default
From: Thierry Reding <treding at nvidia.com> Hi, the GPU on Jetson TX2 (GP10B) does not work properly on all devices. Why exactly is not clear, but there are slight differences between the SKUs that were tested. It turns out that the biggest issue is that on some devices (e.g. the one that I have), pulsing the GPU reset twice as is done in the current code (once as part of the power-ungate