search for: nouveau_vm_map

Displaying 18 results from an estimated 18 matches for "nouveau_vm_map".

2013 Nov 12
0
[PATCH 2/7] drm/nv50-: untile mmap'd bo's
...c b/drivers/gpu/drm/nouveau/core/subdev/bar/nv50.c index 160d27f..9907a25 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/bar/nv50.c +++ b/drivers/gpu/drm/nouveau/core/subdev/bar/nv50.c @@ -67,7 +67,10 @@ nv50_bar_umap(struct nouveau_bar *bar, struct nouveau_mem *mem, if (ret) return ret; - nouveau_vm_map(vma, mem); + if (mem->pages) + nouveau_vm_map_sg(vma, 0, mem->size << 12, mem); + else + nouveau_vm_map(vma, mem); return 0; } diff --git a/drivers/gpu/drm/nouveau/core/subdev/bar/nvc0.c b/drivers/gpu/drm/nouveau/core/subdev/bar/nvc0.c index b2ec741..badd835 100644 --- a/drivers/...
2013 Sep 25
1
[PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap
...au_bo.c > index 89b992e..355a1b7 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_bo.c > +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c > @@ -1560,7 +1560,8 @@ nouveau_bo_vma_add(struct nouveau_bo *nvbo, struct nouveau_vm *vm, > > if (nvbo->bo.mem.mem_type == TTM_PL_VRAM) > nouveau_vm_map(vma, nvbo->bo.mem.mm_node); > - else if (nvbo->bo.mem.mem_type == TTM_PL_TT) { > + else if (nvbo->bo.mem.mem_type == TTM_PL_TT && > + nvbo->page_shift == vma->vm->vmm->spg_shift) { > if (node->sg) > nouveau_vm_map_sg_table(vma, 0, size, node);...
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
2012 Nov 21
2
[PATCH] drm/nouveau: fix takedown in move_notify
...veau_vma, head); + + nouveau_vm_unmap(vma); + nouveau_vm_put(vma); + list_del(&vma->head); + } + return; + } + list_for_each_entry(vma, &nvbo->vma_list, head) { - if (new_mem && new_mem->mem_type == TTM_PL_VRAM) { + if (new_mem->mem_type == TTM_PL_VRAM) { nouveau_vm_map(vma, new_mem->mm_node); - } else - if (new_mem && new_mem->mem_type == TTM_PL_TT && - nvbo->page_shift == vma->vm->vmm->spg_shift) { + } else if (new_mem->mem_type == TTM_PL_TT && + nvbo->page_shift == vma->vm->vmm->spg_sh...
2013 Aug 28
1
[PATCH 4/6] drm/nouveau: introduce NOUVEAU_GEM_TILE_WCUS
...t; (nvbo->pin_refcnt ? TTM_PL_FLAG_NO_EVICT : 0); > > pl->placement = nvbo->placements; > @@ -1554,6 +1560,9 @@ nouveau_bo_vma_add(struct nouveau_bo *nvbo, struct nouveau_vm *vm, > if (nvbo->bo.mem.mem_type == TTM_PL_VRAM) > nouveau_vm_map(vma, nvbo->bo.mem.mm_node); > else if (nvbo->bo.mem.mem_type == TTM_PL_TT) { > + if (!(nvbo->valid_caching & TTM_PL_FLAG_CACHED)) > + vma->access |= NV_MEM_ACCESS_NOSNOOP; > + > if (node->sg) >...
2013 Aug 11
2
Fixing nouveau for >4k PAGE_SIZE
...ap_sg() which was trying to handle the case at that low level, but this isn't enough, and after a bit of digging, I also think that's not the right approach: So, from what I can tell, subdev/vm/base.c is not clean vs. PAGE_SIZE in a number of places unless I'm mistaken. For example, in nouveau_vm_map_sg_table(), something like that: sglen = sg_dma_len(sg) >> PAGE_SHIFT; end = pte + sglen; Seems to imply an assumption here that the "pte" is in multiple of PAGE_SHIFT, but afaik, it's not. So further down, we do: for (m = 0; m < len; m++) { dma_addr_t addr = sg_...
2014 Jul 16
1
Questions about the Nouveau VM subsystem
...ew() will set it to whatever page_shift the BO has. I *thought* it should indicate the size and alignment of the pages described in the nouveau_mem object. Is this definition correct? In that case, shouldn't the memory allocator be the one that sets that field, instead of the callers? - In nouveau_vm_map*(), why are we using vma->node->type to decide whether to use the small or big pages table? It seems like this should rather be decided by mem->page_shift, and more generally by how contiguous the physical memory is, in order to maximize large pages use whenever possible. Right now the...
2013 Sep 04
4
[PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap
...t;> straightforward way to avoid a null deref that you see happens in the >> bug. I haven't figured out the root cause of this, but it's getting >> well into the "I have no idea how TTM works" space. However this seems >> like a bit of defensive programming -- nouveau_vm_map_sg will pass >> node->pages as a list down, which will be dereferenced by >> nvc0_vm_map_sg. Perhaps the other arguments should make that >> dereferencing not happen, but it definitely was happening here, as you >> can see in the bug. >> >> Ben/Maarten, I'...
2013 Aug 28
0
[PATCH 4/6] drm/nouveau: introduce NOUVEAU_GEM_TILE_WCUS
...M_PL_MASK_CACHING | + uint32_t flags = nvbo->valid_caching | (nvbo->pin_refcnt ? TTM_PL_FLAG_NO_EVICT : 0); pl->placement = nvbo->placements; @@ -1554,6 +1560,9 @@ nouveau_bo_vma_add(struct nouveau_bo *nvbo, struct nouveau_vm *vm, if (nvbo->bo.mem.mem_type == TTM_PL_VRAM) nouveau_vm_map(vma, nvbo->bo.mem.mm_node); else if (nvbo->bo.mem.mem_type == TTM_PL_TT) { + if (!(nvbo->valid_caching & TTM_PL_FLAG_CACHED)) + vma->access |= NV_MEM_ACCESS_NOSNOOP; + if (node->sg) nouveau_vm_map_sg_table(vma, 0, size, node); else diff --git a/drivers/gpu/drm/nouv...
2013 Oct 10
0
[PATCH] drm/nouveau: do not map evicted bo's in nouveau_bo_vma_add
...vers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c @@ -1551,7 +1579,8 @@ nouveau_bo_vma_add(struct nouveau_bo *nvbo, struct nouveau_vm *vm, if (nvbo->bo.mem.mem_type == TTM_PL_VRAM) nouveau_vm_map(vma, nvbo->bo.mem.mm_node); - else if (nvbo->bo.mem.mem_type == TTM_PL_TT) { + else if (nvbo->bo.mem.mem_type == TTM_PL_TT && + nvbo->page_shift == vma->vm->vmm->spg_shift) { if (node->sg) nouveau_vm_map_sg_table(vma, 0, size, node); else
2013 Nov 12
0
[PATCH 5/7] drm/nouveau: do not map evicted vram buffers in nouveau_bo_vma_add
...o.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index 9ecb874..bb3734d 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c @@ -1549,7 +1549,8 @@ nouveau_bo_vma_add(struct nouveau_bo *nvbo, struct nouveau_vm *vm, if (nvbo->bo.mem.mem_type == TTM_PL_VRAM) nouveau_vm_map(vma, nvbo->bo.mem.mm_node); - else if (nvbo->bo.mem.mem_type == TTM_PL_TT) { + else if (nvbo->bo.mem.mem_type == TTM_PL_TT && + nvbo->page_shift == vma->vm->vmm->spg_shift) { if (node->sg) nouveau_vm_map_sg_table(vma, 0, size, node); else -- 1.8.4
2013 Sep 02
0
[PATCH] drm/nv50-: fix tiled memory layout checks
...+ if (!new_mem || + old_mem->mem_type == TTM_PL_VRAM || + (old_mem->mem_type == TTM_PL_TT && + nvbo->page_shift == vma->vm->vmm->spg_shift)) + nouveau_vm_unmap(vma); + + if (!new_mem) + continue; + + if (new_mem->mem_type == TTM_PL_VRAM) { nouveau_vm_map(vma, new_mem->mm_node); } else if (new_mem && new_mem->mem_type == TTM_PL_TT && @@ -1185,8 +1193,6 @@ nouveau_bo_move_ntfy(struct ttm_buffer_object *bo, struct ttm_mem_reg *new_mem) nouveau_vm_map_sg(vma, 0, new_mem-> num_pages << PAGE_SHIFT,...
2013 Sep 04
0
[PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap
...ghtforward way to avoid a null deref that you see happens in the >>> bug. I haven't figured out the root cause of this, but it's getting >>> well into the "I have no idea how TTM works" space. However this seems >>> like a bit of defensive programming -- nouveau_vm_map_sg will pass >>> node->pages as a list down, which will be dereferenced by >>> nvc0_vm_map_sg. Perhaps the other arguments should make that >>> dereferencing not happen, but it definitely was happening here, as you >>> can see in the bug. >>> >>...
2013 Aug 11
0
Fixing nouveau for >4k PAGE_SIZE
...ct nouveau_mm_node, what unit are "offset" and "length" ? They *seem* to be hard wired to be in units of 4k (regardless of either of system page size) which I assume means card small page size, but "offset" is in bytes ? At least according to my parsing of the code in nouveau_vm_map_at(). The big question then is whether that represents card address space or system address space... I assume the former right ? So a function like nouveau_vm_map_at() is solely concerned with mapping a piece of card address space in the card VM and thus shouldn't be concerned by the system PA...
2013 Aug 11
2
Fixing nouveau for >4k PAGE_SIZE
...<<12, which is the smallest unit a card can address. > They *seem* to be hard wired to be in units of 4k (regardless of either > of system page size) which I assume means card small page size, but > "offset" is in bytes ? At least according to my parsing of the code in > nouveau_vm_map_at(). Correct. > The big question then is whether that represents card address space or > system address space... I assume the former right ? So a function like > nouveau_vm_map_at() is solely concerned with mapping a piece of card > address space in the card VM and thus shouldn't b...
2013 Aug 28
11
[PATCH 0/6] Nouveau on ARM fixes
This is the first set of patches to make Nouveau work on Tegra. Those are only the obvious correctness fixes, a lot of optimization work remains to be done, but at least it's enough to get accel working and let the machine survive a piglit run. A new BO flag is introduced to allow userspace to hint the kernel about possible optimizations. Lucas Stach (6): drm/ttm: recognize ARM arch in
2013 Oct 27
7
[Bug 70927] New: nv50_instobj_wr32 kernel panic
https://bugs.freedesktop.org/show_bug.cgi?id=70927 Priority: medium Bug ID: 70927 Assignee: nouveau at lists.freedesktop.org Summary: nv50_instobj_wr32 kernel panic Severity: normal Classification: Unclassified OS: Linux (All) Reporter: antoniovazquezblanco at gmail.com Hardware: x86-64 (AMD64)
2014 Aug 17
0
FYI: Nouveau bug exposed in the latest fedora kernel
.../0x30 [nouveau] [ 402.177930] [<ffffffffa00ebf89>] _nouveau_gpuobj_rd32+0x29/0x30 [nouveau] [ 402.177960] [<ffffffffa0130551>] nv44_vm_fill+0x91/0x230 [nouveau] [ 402.177990] [<ffffffffa013089e>] nv44_vm_map_sg+0x1ae/0x1d0 [nouveau] [ 402.178020] [<ffffffffa012f507>] nouveau_vm_map+0x287/0x3d0 [nouveau] [ 402.178026] [<ffffffff811ca7f7>] ? __kmalloc+0x1f7/0x240 [ 402.178039] [<ffffffffa005f3a2>] ? ttm_dma_tt_init+0xe2/0x110 [ttm] [ 402.178077] [<ffffffffa0173c0e>] nv04_sgdma_bind+0x4e/0x80 [nouveau] [ 402.178087] [<ffffffffa005ecaf>] ttm_tt_bin...