search for: vaddr_lru

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

2015 Nov 09
2
[PATCH] instmem/gk20a: fix race conditions
...ile 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... */ if (list_empty(&imem->vaddr_lru)) break; - obj = list_first_entry(&imem->vaddr_lru, struct gk20a_instobj, - vaddr_node); - list_del(&obj->vaddr_node); - vunmap(obj->vaddr); - obj->vaddr = NULL; - imem->vaddr_use -= nvkm_memory_size(&obj->memory); - nvkm_debug(&imem->base....
2015 Nov 11
0
[PATCH] instmem/gk20a: fix race conditions
...; 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... */ > if (list_empty(&imem->vaddr_lru)) > break; > > - obj = list_first_entry(&imem->vaddr_lru, struct gk20a_instobj, > - vaddr_node); > - list_del(&obj->vaddr_node); > - vunmap(obj->vaddr); > - obj->vaddr = NULL; > - imem->vaddr_use -= nvkm_memory_size(&obj->me...
2015 Nov 11
2
[PATCH] instmem/gk20a: use DMA API CPU mapping
...,7 +65,6 @@ struct gk20a_instobj { struct gk20a_instobj_dma { struct gk20a_instobj base; - u32 *cpuaddr; dma_addr_t handle; struct nvkm_mm_node r; }; @@ -81,6 +77,11 @@ struct gk20a_instobj_dma { struct gk20a_instobj_iommu { struct gk20a_instobj base; + /* to link into gk20a_instmem::vaddr_lru */ + struct list_head vaddr_node; + /* how many clients are using vaddr? */ + u32 use_cpt; + /* will point to the higher half of pages */ dma_addr_t *dma_addrs; /* array of base.mem->size pages (+ dma_addr_ts) */ @@ -109,8 +110,6 @@ struct gk20a_instmem { /* Only used by DMA API */ s...
2015 Nov 11
0
[PATCH] instmem/gk20a: use DMA API CPU mapping
...j_dma { > struct gk20a_instobj base; > > - u32 *cpuaddr; > dma_addr_t handle; > struct nvkm_mm_node r; > }; > @@ -81,6 +77,11 @@ struct gk20a_instobj_dma { > struct gk20a_instobj_iommu { > struct gk20a_instobj base; > > + /* to link into gk20a_instmem::vaddr_lru */ > + struct list_head vaddr_node; > + /* how many clients are using vaddr? */ > + u32 use_cpt; > + > /* will point to the higher half of pages */ > dma_addr_t *dma_addrs; > /* array of base.mem->size pages (+ dma_addr_ts) */ > @@ -109,8 +110,6 @@ struct gk20a_inst...
2017 Jan 30
2
[PATCH] drm/nouveau: gk20a: Turn instmem lock into mutex
...k_irqsave(&imem->lock, flags); + mutex_lock(&imem->lock); /* we should at least have one user to release... */ if (WARN_ON(node->use_cpt == 0)) @@ -252,7 +250,7 @@ gk20a_instobj_release_iommu(struct nvkm_memory *memory) list_add_tail(&node->vaddr_node, &imem->vaddr_lru); out: - spin_unlock_irqrestore(&imem->lock, flags); + mutex_unlock(&imem->lock); wmb(); nvkm_ltc_invalidate(ltc); @@ -306,19 +304,18 @@ gk20a_instobj_dtor_iommu(struct nvkm_memory *memory) struct gk20a_instmem *imem = node->base.imem; struct device *dev = imem->bas...
2015 Oct 26
2
[PATCH] instmem/gk20a: exclusively acquire instobjs
...gk20a_instmem *imem = node->imem; struct nvkm_ltc *ltc = imem->base.subdev.device->ltc; - unsigned long flags; - - spin_lock_irqsave(&imem->lock, flags); /* add ourselves to the LRU list so our CPU mapping can be freed */ list_add_tail(&node->vaddr_node, &imem->vaddr_lru); - spin_unlock_irqrestore(&imem->lock, flags); + spin_unlock_irqrestore(&imem->lock, imem->flags); wmb(); nvkm_ltc_invalidate(ltc); -- 2.6.1
2017 Feb 24
1
[PATCH] drm/nouveau: gk20a: Turn instmem lock into mutex
...ex_lock(&imem->lock); >> >> /* we should at least have one user to release... */ >> if (WARN_ON(node->use_cpt == 0)) >> @@ -252,7 +250,7 @@ gk20a_instobj_release_iommu(struct nvkm_memory *memory) >> list_add_tail(&node->vaddr_node, &imem->vaddr_lru); >> >> out: >> - spin_unlock_irqrestore(&imem->lock, flags); >> + mutex_unlock(&imem->lock); >> >> wmb(); >> nvkm_ltc_invalidate(ltc); >> @@ -306,19 +304,18 @@ gk20a_instobj_dtor_iommu(struct nvkm_memory *memory) >> struct...
2015 Nov 04
0
[PATCH] instmem/gk20a: exclusively acquire instobjs
...; > struct nvkm_ltc *ltc = imem->base.subdev.device->ltc; > - unsigned long flags; > - > - spin_lock_irqsave(&imem->lock, flags); > > /* add ourselves to the LRU list so our CPU mapping can be freed */ > list_add_tail(&node->vaddr_node, &imem->vaddr_lru); > > - spin_unlock_irqrestore(&imem->lock, flags); > + spin_unlock_irqrestore(&imem->lock, imem->flags); > > wmb(); > nvkm_ltc_invalidate(ltc); > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type:...
2017 Feb 23
0
[PATCH] drm/nouveau: gk20a: Turn instmem lock into mutex
...flags); > + mutex_lock(&imem->lock); > > /* we should at least have one user to release... */ > if (WARN_ON(node->use_cpt == 0)) > @@ -252,7 +250,7 @@ gk20a_instobj_release_iommu(struct nvkm_memory *memory) > list_add_tail(&node->vaddr_node, &imem->vaddr_lru); > > out: > - spin_unlock_irqrestore(&imem->lock, flags); > + mutex_unlock(&imem->lock); > > wmb(); > nvkm_ltc_invalidate(ltc); > @@ -306,19 +304,18 @@ gk20a_instobj_dtor_iommu(struct nvkm_memory *memory) > struct gk20a_instmem *imem = node->b...
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