Displaying 17 results from an estimated 17 matches for "rl_entry".
Did you mean:
rb_entry
2015 Feb 11
0
[PATCH v2 6/6] instmem/gk20a: add IOMMU support
...20a_instobj_iommu *node = (void *)_node;
+ struct gk20a_instmem_priv *priv = (void *)nvkm_instmem(node);
+ struct nvkm_mm_node *r;
+ int i;
+
+ if (unlikely(list_empty(&_node->mem->regions)))
+ return;
+
+ r = list_first_entry(&_node->mem->regions, struct nvkm_mm_node,
+ rl_entry);
+
+ /* clear bit 34 to unmap pages */
+ r->offset &= ~BIT(34 - priv->iommu_pgshift);
+
+ /* Unmap pages from GPU address space and free them */
+ for (i = 0; i < _node->mem->size; i++) {
+ iommu_unmap(priv->domain,
+ (r->offset + i) << priv->iommu_pgshift,...
2013 Jan 09
0
[PATCH] drm/nvc0/fb: fix crash when different mutex is used to protect same list
...ize, ncmin, align, &r);
if (ret) {
- mutex_unlock(&mm->mutex);
+ mutex_unlock(&pfb->base.mutex);
pfb->ram.put(pfb, &mem);
return ret;
}
@@ -160,7 +160,7 @@ nvc0_fb_vram_new(struct nouveau_fb *pfb, u64 size, u32 align, u32 ncmin,
list_add_tail(&r->rl_entry, &mem->regions);
size -= r->length;
} while (size);
- mutex_unlock(&mm->mutex);
+ mutex_unlock(&pfb->base.mutex);
r = list_first_entry(&mem->regions, struct nouveau_mm_node, rl_entry);
mem->offset = (u64)r->offset << 12;
--
1.7.8.6
2015 Apr 17
4
[PATCH 2/6] instmem/gk20a: refer to IOMMU physical translation bit
...ys_addr_bit;
>
> /* Only used by DMA API */
> struct dma_attrs attrs;
> @@ -169,8 +170,8 @@ gk20a_instobj_dtor_iommu(struct gk20a_instobj_priv *_node)
> r = list_first_entry(&_node->mem->regions, struct nvkm_mm_node,
> rl_entry);
>
> - /* clear bit 34 to unmap pages */
> - r->offset &= ~BIT(34 - priv->iommu_pgshift);
> + /* clear IOMMU translation bit to unmap pages */
> + r->offset &= ~BIT(priv->iommu_phys_addr_bit - priv->iommu_pgshift);
>
> /*...
2017 Jan 30
2
[PATCH] drm/nouveau: gk20a: Turn instmem lock into mutex
...t;lock);
/* vaddr has already been recycled */
if (node->base.vaddr)
gk20a_instobj_iommu_recycle_vaddr(node);
- spin_unlock_irqrestore(&imem->lock, flags);
+ mutex_unlock(&imem->lock);
r = list_first_entry(&node->base.mem.regions, struct nvkm_mm_node,
rl_entry);
@@ -580,7 +577,7 @@ gk20a_instmem_new(struct nvkm_device *device, int index,
if (!(imem = kzalloc(sizeof(*imem), GFP_KERNEL)))
return -ENOMEM;
nvkm_instmem_ctor(&gk20a_instmem, device, index, &imem->base);
- spin_lock_init(&imem->lock);
+ mutex_init(&imem->lock);...
2017 Feb 24
1
[PATCH] drm/nouveau: gk20a: Turn instmem lock into mutex
...de->base.vaddr)
>> gk20a_instobj_iommu_recycle_vaddr(node);
>>
>> - spin_unlock_irqrestore(&imem->lock, flags);
>> + mutex_unlock(&imem->lock);
>>
>> r = list_first_entry(&node->base.mem.regions, struct nvkm_mm_node,
>> rl_entry);
>> @@ -580,7 +577,7 @@ gk20a_instmem_new(struct nvkm_device *device, int index,
>> if (!(imem = kzalloc(sizeof(*imem), GFP_KERNEL)))
>> return -ENOMEM;
>> nvkm_instmem_ctor(&gk20a_instmem, device, index, &imem->base);
>> - spin_lock_init(&imem-&...
2013 Jul 19
0
[PATCH 10/11] drm/nvc0/fb: Take lock in nvc0_ram_put()
...eau_mem *mem)
{
struct nouveau_mm_node *this;
- struct nouveau_mem *mem;
- mem = *pmem;
- *pmem = NULL;
- 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...
2017 Feb 23
0
[PATCH] drm/nouveau: gk20a: Turn instmem lock into mutex
...ecycled */
> if (node->base.vaddr)
> gk20a_instobj_iommu_recycle_vaddr(node);
>
> - spin_unlock_irqrestore(&imem->lock, flags);
> + mutex_unlock(&imem->lock);
>
> r = list_first_entry(&node->base.mem.regions, struct nvkm_mm_node,
> rl_entry);
> @@ -580,7 +577,7 @@ gk20a_instmem_new(struct nvkm_device *device, int index,
> if (!(imem = kzalloc(sizeof(*imem), GFP_KERNEL)))
> return -ENOMEM;
> nvkm_instmem_ctor(&gk20a_instmem, device, index, &imem->base);
> - spin_lock_init(&imem->lock);
> + mut...
2015 Feb 20
6
[PATCH v4 0/6] nouveau/gk20a: RAM device removal & IOMMU support
Changes since v3:
- Use a single dma_attr for all DMA-API allocations in instmem instead of one
per allocation
- Use device.info.ram_size instead of pfb->ram to check whether VRAM is present
outside of nvkm
Changes since v2:
- Cleaner changes for ltc
- Fixed typos in gk20a instmem IOMMU comments
Changes since v1:
- Add missing else condition in ltc
- Remove extra flags that slipped into
2015 Feb 11
9
[PATCH v2 0/6] nouveau/gk20a: RAM device removal & IOMMU support
Changes since v1:
- Add missing else condition in ltc
- Remove extra flags that slipped into nouveau_display.c and nv84_fence.c.
Original cover letter:
Patches 1-3 make the presence of a RAM device optional, and remove GK20A's dummy
RAM driver we were using so far. On chips using shared memory, such a device
can confuse the driver into moving objects where there is no need to, and can
trick
2015 Jan 23
8
[PATCH 0/6] nouveau/gk20a: RAM device removal & IOMMU support
A series I have waited too long to submit, and the recent refactoring made
me pay the price of my perfectionism, so here are the features that are at least
completed
Patches 1-3 make the presence of a RAM device optional, and remove GK20A's dummy
RAM driver we were using so far. On chips using shared memory, such a device
can confuse the driver into moving objects where there is no need to,
2015 Feb 17
8
[PATCH v3 0/6] nouveau/gk20a: RAM device removal & IOMMU support
Thanks Ilia for the v2 review! Here is the v3 of this IOMMU support for GK20A
series.
Changes since v2:
- Cleaner changes for ltc
- Fixed typos in gk20a instmem IOMMU comments
Changes since v1:
- Add missing else condition in ltc
- Remove extra flags that slipped into nouveau_display.c and nv84_fence.c.
Original cover letter:
Patches 1-3 make the presence of a RAM device optional, and remove
2014 Mar 23
0
[PATCH] drm/nouveau: allow nv04/nv50/nvc0+ parts of the driver to be separated
...: Ben Skeggs
+ */
+
+#include <subdev/fb.h>
+
+#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...
2015 Nov 11
2
[PATCH] instmem/gk20a: use DMA API CPU mapping
...pin_lock_irqsave(&imem->lock, flags);
+
+ /* vaddr has already been recycled */
+ if (node->base.vaddr)
+ gk20a_instobj_iommu_recycle_vaddr(node);
+
+ spin_unlock_irqrestore(&imem->lock, flags);
+
r = list_first_entry(&node->base.mem.regions, struct nvkm_mm_node,
rl_entry);
@@ -368,8 +348,8 @@ gk20a_instobj_func_dma = {
.target = gk20a_instobj_target,
.addr = gk20a_instobj_addr,
.size = gk20a_instobj_size,
- .acquire = gk20a_instobj_acquire,
- .release = gk20a_instobj_release,
+ .acquire = gk20a_instobj_acquire_dma,
+ .release = gk20a_instobj_release_dma,...
2015 Sep 04
4
[PATCH 0/4] tegra: DMA mask and IOMMU bit fixes
These 4 patches fix two issues that existed on Tegra regarding DMA:
1) The bit indicating whether to use an IOMMU or not was hardcoded ; make this
a platform property and use it in instmem
2) The DMA mask was not set for platform devices. Fix this by converting
more pci_dma* to the DMA API, and use that more generic code to set the
DMA mask properly for all platforms.
Tested on both x86
2015 Nov 11
0
[PATCH] instmem/gk20a: use DMA API CPU mapping
...> +
> + /* vaddr has already been recycled */
> + if (node->base.vaddr)
> + gk20a_instobj_iommu_recycle_vaddr(node);
> +
> + spin_unlock_irqrestore(&imem->lock, flags);
> +
> r = list_first_entry(&node->base.mem.regions, struct nvkm_mm_node,
> rl_entry);
>
> @@ -368,8 +348,8 @@ gk20a_instobj_func_dma = {
> .target = gk20a_instobj_target,
> .addr = gk20a_instobj_addr,
> .size = gk20a_instobj_size,
> - .acquire = gk20a_instobj_acquire,
> - .release = gk20a_instobj_release,
> + .acquire = gk20a_instobj_acquire_dma,
&g...
2015 Feb 11
0
[PATCH v2 2/6] instmem/gk20a: move memory allocation to instmem
...+ node->mem->size = size >> 12;
+ node->mem->memtype = 0;
+ node->mem->page_shift = 12;
+ INIT_LIST_HEAD(&node->mem->regions);
+
+ node->r.type = 12;
+ node->r.offset = node->handle >> 12;
+ node->r.length = npages;
+ list_add_tail(&node->r.rl_entry, &node->mem->regions);
+
+ node->base.addr = node->mem->offset;
+ node->base.size = size;
+
+ nv_debug(parent, "alloc size: 0x%x, align: 0x%x, gaddr: 0x%llx\n",
+ size, align, node->mem->offset);
+
+ return 0;
+}
+
+static struct nvkm_instobj_impl
+gk20a_inst...
2015 Apr 16
15
[PATCH 0/6] map big page by platform IOMMU
Hi,
Generally the the imported buffers which has memory type TTM_PL_TT are
mapped as small pages probably due to lack of big page allocation. But the
platform device which also use memory type TTM_PL_TT, like GK20A, can
*allocate* big page though the IOMMU hardware inside the SoC. This is a try
to map the imported buffers as big pages in GMMU by the platform IOMMU. With
some preparation work to