Displaying 20 results from an estimated 20 matches for "nouveau_vm_get".
2013 Aug 11
0
Fixing nouveau for >4k PAGE_SIZE
...m/nouveau/nouveau_ttm.c b/drivers/gpu/drm/nouveau/nou
index 19e3757..f0629de 100644
--- a/drivers/gpu/drm/nouveau/nouveau_ttm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_ttm.c
@@ -252,8 +252,8 @@ nv04_gart_manager_new(struct ttm_mem_type_manager *man,
node->page_shift = 12;
- ret = nouveau_vm_get(man->priv, mem->num_pages << 12, node->page_shift,
- NV_MEM_ACCESS_RW, &node->vma[0]);
+ ret = nouveau_vm_get(man->priv, mem->num_pages << PAGE_SHIFT,
+ node->page_shift, NV_MEM_ACCESS_RW, &node->...
2013 Aug 11
2
Fixing nouveau for >4k PAGE_SIZE
...> Would it be possible, maybe, to add comments next to the fields in
> those various data structure indicating in which units they are ?
>
> - Similar confusion arises with things like struct ttm_mem_reg *mem.
> For example, in nouveau_ttm.c, I see statements like:
>
> ret = nouveau_vm_get(man->priv, mem->num_pages << 12, node->page_shift,
> NV_MEM_ACCESS_RW, &node->vma[0]);
>
> Which seems to indicate that mem->num_pages is in multiple of 4k always,
> though I would have though that a ttm object was in multiple of
> PAGE_SIZE, am I wro...
2013 Aug 11
2
Fixing nouveau for >4k PAGE_SIZE
...drm/nouveau/nouveau_ttm.c b/drivers/gpu/drm/nouveau/nouveau_ttm.c
index 19e3757..f0629de 100644
--- a/drivers/gpu/drm/nouveau/nouveau_ttm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_ttm.c
@@ -252,8 +252,8 @@ nv04_gart_manager_new(struct ttm_mem_type_manager *man,
node->page_shift = 12;
- ret = nouveau_vm_get(man->priv, mem->num_pages << 12, node->page_shift,
- NV_MEM_ACCESS_RW, &node->vma[0]);
+ ret = nouveau_vm_get(man->priv, mem->num_pages << PAGE_SHIFT,
+ node->page_shift, NV_MEM_ACCESS_RW, &node->vma[0]);
if (ret) {
kfree(node);
retu...
2013 Nov 29
2
Fixing nouveau for >4k PAGE_SIZE
...drm/nouveau/nouveau_ttm.c b/drivers/gpu/drm/nouveau/nouveau_ttm.c
index 19e3757..b7fc456 100644
--- a/drivers/gpu/drm/nouveau/nouveau_ttm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_ttm.c
@@ -252,8 +252,9 @@ nv04_gart_manager_new(struct ttm_mem_type_manager *man,
node->page_shift = 12;
- ret = nouveau_vm_get(man->priv, mem->num_pages << 12, node->page_shift,
- NV_MEM_ACCESS_RW, &node->vma[0]);
+ ret = nouveau_vm_get(man->priv, mem->num_pages << PAGE_SHIFT,
+ node->page_shift, NV_MEM_ACCESS_RW,
+ &node->vma[0]);
if (ret) {
kfree(node)...
2013 Aug 11
2
Fixing nouveau for >4k PAGE_SIZE
...x 19e3757..f0629de 100644
> > --- a/drivers/gpu/drm/nouveau/nouveau_ttm.c
> > +++ b/drivers/gpu/drm/nouveau/nouveau_ttm.c
> > @@ -252,8 +252,8 @@ nv04_gart_manager_new(struct ttm_mem_type_manager *man,
> >
> > node->page_shift = 12;
> >
> > - ret = nouveau_vm_get(man->priv, mem->num_pages << 12, node->page_shift,
> > - NV_MEM_ACCESS_RW, &node->vma[0]);
> > + ret = nouveau_vm_get(man->priv, mem->num_pages << PAGE_SHIFT,
> > + node->page_shift, NV_MEM_ACCESS_RW, &node->vma[0]);
> &...
2013 Aug 22
6
[PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap
...ouveau_mem *node = mem->mm_node;
int ret;
+ /* If we ever get here for a non-vram mem node that doesn't
+ * have pages, we will end up doing a null deref in
+ * nouveau_vm_map_sg. */
+ if (WARN_ON(mem->mem_type != TTM_PL_VRAM && !node->pages))
+ return -EINVAL;
+
ret = nouveau_vm_get(nv_client(chan->cli)->vm, mem->num_pages <<
PAGE_SHIFT, node->page_shift,
NV_MEM_ACCESS_RW, vma);
--
1.8.1.5
2013 Aug 11
0
Fixing nouveau for >4k PAGE_SIZE
...drm/nouveau/nouveau_ttm.c
> index 19e3757..f0629de 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_ttm.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_ttm.c
> @@ -252,8 +252,8 @@ nv04_gart_manager_new(struct ttm_mem_type_manager *man,
>
> node->page_shift = 12;
>
> - ret = nouveau_vm_get(man->priv, mem->num_pages << 12, node->page_shift,
> - NV_MEM_ACCESS_RW, &node->vma[0]);
> + ret = nouveau_vm_get(man->priv, mem->num_pages << PAGE_SHIFT,
> + node->page_shift, NV_MEM_ACCESS_RW, &node->vma[0]);
> if (ret) {
>...
2013 Dec 11
0
Fixing nouveau for >4k PAGE_SIZE
...eau/nouveau_ttm.c
> index 19e3757..b7fc456 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_ttm.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_ttm.c
> @@ -252,8 +252,9 @@ nv04_gart_manager_new(struct ttm_mem_type_manager *man,
>
> node->page_shift = 12;
>
> - ret = nouveau_vm_get(man->priv, mem->num_pages << 12, node->page_shift,
> - NV_MEM_ACCESS_RW, &node->vma[0]);
> + ret = nouveau_vm_get(man->priv, mem->num_pages << PAGE_SHIFT,
> + node->page_shift, NV_MEM_ACCESS_RW...
2013 Aug 22
0
[PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap
...y asked for it?).. And well, this really
shouldn't be allowed.. The other device won't be able to touch it
then.
If you can confirm this is indeed what's happening, we should find out
why and fix it (and have the kernel completely reject such attempts).
Ben.
> +
> ret = nouveau_vm_get(nv_client(chan->cli)->vm, mem->num_pages <<
> PAGE_SHIFT, node->page_shift,
> NV_MEM_ACCESS_RW, vma);
> --
> 1.8.1.5
>
> _______________________________________________
> dri-devel mailing list
> dri...
2013 Aug 11
2
Fixing nouveau for >4k PAGE_SIZE
Hi folks !
So I've been trying to figure out what it would take to make
nouveau work properly on architectures where PAGE_SIZE isn't
4k such as most ppc64's. An initial patch from Dave fixed a
bogon in nv41.c nv41_vm_map_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:
2013 Aug 29
0
Fixing nouveau for >4k PAGE_SIZE
...t;> > --- a/drivers/gpu/drm/nouveau/nouveau_ttm.c
>> > +++ b/drivers/gpu/drm/nouveau/nouveau_ttm.c
>> > @@ -252,8 +252,8 @@ nv04_gart_manager_new(struct ttm_mem_type_manager *man,
>> >
>> > node->page_shift = 12;
>> >
>> > - ret = nouveau_vm_get(man->priv, mem->num_pages << 12, node->page_shift,
>> > - NV_MEM_ACCESS_RW, &node->vma[0]);
>> > + ret = nouveau_vm_get(man->priv, mem->num_pages << PAGE_SHIFT,
>> > + node->page_shift, N...
2013 Aug 11
0
Fixing nouveau for >4k PAGE_SIZE
...that it is a card page shift...
Would it be possible, maybe, to add comments next to the fields in
those various data structure indicating in which units they are ?
- Similar confusion arises with things like struct ttm_mem_reg *mem.
For example, in nouveau_ttm.c, I see statements like:
ret = nouveau_vm_get(man->priv, mem->num_pages << 12, node->page_shift,
NV_MEM_ACCESS_RW, &node->vma[0]);
Which seems to indicate that mem->num_pages is in multiple of 4k always,
though I would have though that a ttm object was in multiple of
PAGE_SIZE, am I wrong ?
Especially since t...
2013 Jul 29
0
[PATCH] drm/nouveau: protect vm refcount with mutex
...c
+++ b/drivers/gpu/drm/nouveau/core/subdev/vm/base.c
@@ -28,6 +28,8 @@
#include <subdev/fb.h>
#include <subdev/vm.h>
+static void nouveau_vm_del(struct nouveau_vm *vm);
+
void
nouveau_vm_map_at(struct nouveau_vma *vma, u64 delta, struct nouveau_mem *node)
{
@@ -335,10 +337,10 @@ nouveau_vm_get(struct nouveau_vm *vm, u64 size, u32 page_shift,
return ret;
}
}
+ ++vm->refcount;
+ vma->vm = vm;
mutex_unlock(&nv_subdev(vmm)->mutex);
- vma->vm = NULL;
- nouveau_vm_ref(vm, &vma->vm, NULL);
vma->offset = (u64)vma->node->offset << 12;
#ifdef N...
2013 Jan 29
22
[Bug 60007] New: BUG: nouveau crashes in various ways in 32-bits Fedora 18
https://bugs.freedesktop.org/show_bug.cgi?id=60007
Priority: medium
Bug ID: 60007
Assignee: nouveau at lists.freedesktop.org
Summary: BUG: nouveau crashes in various ways in 32-bits Fedora
18
QA Contact: xorg-team at lists.x.org
Severity: critical
Classification: Unclassified
OS: Linux (All)
2014 May 16
2
Machine freeze on latest Linus kernel, seems related to nouveau
..._nouveau_gpuobj_ctor+0x38/0x50 [nouveau]
May 16 08:32:14 brouette kernel: [<ffffffffa047d8ad>] nouveau_object_ctor+0x2d/0xc0 [nouveau]
May 16 08:32:14 brouette kernel: [<ffffffffa047c357>] nouveau_gpuobj_new+0x47/0x50 [nouveau]
May 16 08:32:14 brouette kernel: [<ffffffffa04bcdd1>] nouveau_vm_get+0x1a1/0x2a0 [nouveau]
May 16 08:32:14 brouette kernel: [<ffffffffa0501519>] nouveau_bo_vma_add+0x29/0x90 [nouveau]
May 16 08:32:14 brouette kernel: [<ffffffffa04fb5e8>] nouveau_channel_prep+0x278/0x360 [nouveau]
May 16 08:32:14 brouette kernel: [<ffffffffa047d997>] ? nouveau_objec...
2014 Jul 16
1
Questions about the Nouveau VM subsystem
Hi everyone,
I have been studing the VM code in order to come with a better
implementation of my fix for large pages usage on GK20A
(https://lkml.org/lkml/2014/6/3/375 ). Following some older threads
about this code (http://marc.info/?l=dri-devel&m=137618326022935 ) also
left me kind of puzzled, and I wonder if we could not simplify and
improve things there.
It seems like arbitrary
2014 May 17
1
Machine freeze on latest Linus kernel, seems related to nouveau
...au]
[235255.701437] [<ffffffffa0243075>] _nouveau_gpuobj_ctor+0x3d/0x4b [nouveau]
[235255.701457] [<ffffffffa02442c6>] nouveau_object_ctor+0x32/0xaf [nouveau]
[235255.701475] [<ffffffffa02430d1>] nouveau_gpuobj_new+0x4e/0x50 [nouveau]
[235255.701504] [<ffffffffa026d823>] nouveau_vm_get+0x151/0x27a [nouveau]
[235255.701545] [<ffffffffa02a3f47>] ?
nouveau_gem_object_open+0x7a/0xbe [nouveau]
[235255.701585] [<ffffffffa02a377d>] nouveau_bo_vma_add+0x36/0x9f [nouveau]
[235255.701624] [<ffffffffa02a3f61>]
nouveau_gem_object_open+0x94/0xbe [nouveau]
[235255.701640]...
2014 Apr 17
0
[PATCH] drm/nouveau: add some basic debugfs dumping for nouveau's clients and vm mappings
...u64 delta, u64 length,
}
vmm->flush(vm);
+ vma->mapping = NOUVEAU_MAP_GART;
}
void
@@ -213,6 +216,7 @@ nouveau_vm_unmap_at(struct nouveau_vma *vma, u64 delta, u64 length)
}
vmm->flush(vm);
+ vma->mapping = NOUVEAU_MAP_UNMAPPED;
}
void
@@ -330,6 +334,7 @@ nouveau_vm_get(struct nouveau_vm *vm, u64 size, u32 page_shift,
nouveau_vm_ref(vm, &vma->vm, NULL);
vma->offset = (u64)vma->node->offset << 12;
vma->access = access;
+ vma->mapping = NOUVEAU_MAP_UNMAPPED;
return 0;
}
diff --git a/drivers/gpu/drm/nouveau/nouveau_abi16.c...
2012 Oct 27
3
[Bug 56446] New: BUG: unable to handle kernel paging request at ffffc90014e00000
...ouveau]
[12394.824300] [<ffffffffa0153ef5>] _nouveau_gpuobj_ctor+0x35/0x50 [nouveau]
[12394.824314] [<ffffffffa0155524>] nouveau_object_ctor+0x34/0xc0 [nouveau]
[12394.824328] [<ffffffffa0153f58>] nouveau_gpuobj_new+0x48/0x50 [nouveau]
[12394.824344] [<ffffffffa01716d1>] nouveau_vm_get+0x1a1/0x2d0 [nouveau]
[12394.824387] [<ffffffffa01c1923>] nouveau_bo_vma_add+0x43/0x100 [nouveau]
[12394.824454] [<ffffffffa01bbd70>] nouveau_channel_prep+0x250/0x320 [nouveau]
[12394.824516] [<ffffffffa01bbe73>] nouveau_channel_new+0x33/0x6b0 [nouveau]
[12394.824579] [<fff...
2012 Feb 03
3
[PATCH 1/4] nouveau: Allow allocating BOs at specific offsets
...bool nvc0_vram_flags_valid(struct drm_device *, u32 tile_flags);
#endif
diff --git a/drivers/gpu/drm/nouveau/nouveau_vm.c b/drivers/gpu/drm/nouveau/nouveau_vm.c
index 2bf6c03..7e4fc01 100644
--- a/drivers/gpu/drm/nouveau/nouveau_vm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_vm.c
@@ -225,7 +225,8 @@ nouveau_vm_get(struct nouveau_vm *vm, u64 size, u32 page_shift,
int ret;
mutex_lock(&vm->mm.mutex);
- ret = nouveau_mm_get(&vm->mm, page_shift, msize, 0, align, &vma->node);
+ ret = nouveau_mm_get(&vm->mm, page_shift, 0, msize, 0, align,
+ &vma->node);
if (unlikel...