Displaying 20 results from an estimated 82 matches for "mm_node".
Did you mean:
vm_node
2020 Feb 18
5
[PATCH 8/8] drm/ttm: do not keep GPU dependent addresses
...f(p, "??? default_caching: 0x%08X\n",
>>> man->default_caching);
>>> @@ -345,12 +344,6 @@ static int ttm_bo_handle_move_mem(struct
>>> ttm_buffer_object *bo,
>>> ? moved:
>>> ????? bo->evicted = false;
>>> ? -??? if (bo->mem.mm_node)
>>> -??????? bo->offset = (bo->mem.start << PAGE_SHIFT) +
>>> -??????????? bdev->man[bo->mem.mem_type].gpu_offset;
>>> -??? else
>>> -??????? bo->offset = 0;
>>> -
>> After moving this into users, the else branch has been lost...
2020 Feb 18
2
[PATCH 8/8] drm/ttm: do not keep GPU dependent addresses
...gt;>>>> man->default_caching);
>>>>> @@ -345,12 +344,6 @@ static int ttm_bo_handle_move_mem(struct
>>>>> ttm_buffer_object *bo,
>>>>> ? moved:
>>>>> ????? bo->evicted = false;
>>>>> ? -??? if (bo->mem.mm_node)
>>>>> -??????? bo->offset = (bo->mem.start << PAGE_SHIFT) +
>>>>> -??????????? bdev->man[bo->mem.mem_type].gpu_offset;
>>>>> -??? else
>>>>> -??????? bo->offset = 0;
>>>>> -
>>>> After movin...
2020 Feb 18
2
[PATCH 8/8] drm/ttm: do not keep GPU dependent addresses
...);
>>>>>>> @@ -345,12 +344,6 @@ static int ttm_bo_handle_move_mem(struct
>>>>>>> ttm_buffer_object *bo,
>>>>>>> ?? moved:
>>>>>>> ?????? bo->evicted = false;
>>>>>>> ?? -??? if (bo->mem.mm_node)
>>>>>>> -??????? bo->offset = (bo->mem.start << PAGE_SHIFT) +
>>>>>>> -??????????? bdev->man[bo->mem.mem_type].gpu_offset;
>>>>>>> -??? else
>>>>>>> -??????? bo->offset = 0;
>>>>>...
2014 Feb 16
2
[PATCH] drm/nouveau: fix TTM_PL_TT memtype on pre-nv50
Commit a55409066 ("drm/nv50-: map TTM_PL_SYSTEM through a BAR for CPU
access") made it possible to work with tiled memory. However
mem->mm_node is not a nouveau_mem for AGP-using pre-NV50 cards, but a
drm_mm_node, as created by the ttm_bo_manager_func. As such, extend the
untiled check to explicitly include all pre-nv50 cards.
Reported-by: Ronald <ronald645 at gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74613
S...
2013 Sep 02
0
[PATCH] drm/nv50-: fix tiled memory layout checks
...RING_SPACE(chan, (page_count + 2046) / 2047 * 7 + 2);
if (ret)
return ret;
@@ -834,19 +836,17 @@ static int
nv50_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
struct ttm_mem_reg *old_mem, struct ttm_mem_reg *new_mem)
{
- struct nouveau_mem *node = old_mem->mm_node;
+ struct nouveau_mem *old_node = old_mem->mm_node;
+ struct nouveau_mem *new_node = new_mem->mm_node;
struct nouveau_bo *nvbo = nouveau_bo(bo);
u64 length = (new_mem->num_pages << PAGE_SHIFT);
- u64 src_offset = node->vma[0].offset;
- u64 dst_offset = node->vma[1].offset;...
2012 Nov 21
2
[PATCH] drm/nouveau: fix takedown in move_notify
...m_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_shift) {
if (((struct n...
2020 Feb 18
0
[PATCH 8/8] drm/ttm: do not keep GPU dependent addresses
..._caching: 0x%08X\n",
>>>> man->default_caching);
>>>> @@ -345,12 +344,6 @@ static int ttm_bo_handle_move_mem(struct
>>>> ttm_buffer_object *bo,
>>>> ? moved:
>>>> ????? bo->evicted = false;
>>>> ? -??? if (bo->mem.mm_node)
>>>> -??????? bo->offset = (bo->mem.start << PAGE_SHIFT) +
>>>> -??????????? bdev->man[bo->mem.mem_type].gpu_offset;
>>>> -??? else
>>>> -??????? bo->offset = 0;
>>>> -
>>> After moving this into users, the e...
2020 Feb 18
0
[PATCH 8/8] drm/ttm: do not keep GPU dependent addresses
...man->default_caching);
>>>>>> @@ -345,12 +344,6 @@ static int ttm_bo_handle_move_mem(struct
>>>>>> ttm_buffer_object *bo,
>>>>>> ?? moved:
>>>>>> ?????? bo->evicted = false;
>>>>>> ?? -??? if (bo->mem.mm_node)
>>>>>> -??????? bo->offset = (bo->mem.start << PAGE_SHIFT) +
>>>>>> -??????????? bdev->man[bo->mem.mem_type].gpu_offset;
>>>>>> -??? else
>>>>>> -??????? bo->offset = 0;
>>>>>> -
>>...
2020 Feb 18
0
[PATCH 8/8] drm/ttm: do not keep GPU dependent addresses
...344,6 @@ static int ttm_bo_handle_move_mem(struct
> > > > > > > > ttm_buffer_object *bo,
> > > > > > > > ?? moved:
> > > > > > > > ?????? bo->evicted = false;
> > > > > > > > ?? -??? if (bo->mem.mm_node)
> > > > > > > > -??????? bo->offset = (bo->mem.start << PAGE_SHIFT) +
> > > > > > > > -??????????? bdev->man[bo->mem.mem_type].gpu_offset;
> > > > > > > > -??? else
> > > > > > > > -??...
2020 Feb 18
0
[PATCH 8/8] drm/ttm: do not keep GPU dependent addresses
...aching: 0x%08X\n",
>>>> man->default_caching);
>>>> @@ -345,12 +344,6 @@ static int ttm_bo_handle_move_mem(struct
>>>> ttm_buffer_object *bo,
>>>> ? moved:
>>>> ????? bo->evicted = false;
>>>> ? -??? if (bo->mem.mm_node)
>>>> -??????? bo->offset = (bo->mem.start << PAGE_SHIFT) +
>>>> -??????????? bdev->man[bo->mem.mem_type].gpu_offset;
>>>> -??? else
>>>> -??????? bo->offset = 0;
>>>> -
>>> After moving this into users, the e...
2023 Jan 25
4
[PATCH v3 1/4] drm/amdgpu: Use cursor start instead of ttm resource start
cleanup PAGE_SHIFT operation and replacing
ttm_resource resource->start with cursor start
using amdgpu_res_first API.
v1 -> v2: reorder patch sequence
v2 -> v3: addressing review comment v2
Signed-off-by: Somalapuram Amaranath <Amaranath.Somalapuram at amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 +++-
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 10 +++++++---
2
2015 Jun 15
4
[PATCH v2 0/2] drm/nouveau: option for staging ioctls and new GEM_SET_TILING ioctl
Second version of this patchset addressing Ben's comments and fixing a few
extra things.
This patchset proposes to introduce a "staging" module option to dynamically
enable features (mostly ioctls) that are merged but may be refined before
they are declared "stable". The second patch illustrates the use of this
staging option with the SET_TILING ioctl, which can be used to
2015 Apr 17
3
[PATCH 4/6] drm: enable big page mapping for small pages when IOMMU is available
...ign, &size);
> @@ -1641,6 +1646,10 @@ nouveau_bo_vma_add(struct nouveau_bo *nvbo, struct nvkm_vm *vm,
> (nvbo->bo.mem.mem_type == TTM_PL_VRAM ||
> nvbo->page_shift != vma->vm->mmu->lpg_shift))
> nvkm_vm_map(vma, nvbo->bo.mem.mm_node);
> + else if (nvbo->bo.mem.mem_type == TTM_PL_TT &&
> + vma->vm->mmu->iommu_capable &&
> + nvbo->page_shift == vma->vm->mmu->lpg_shift)
> + nvkm_vm_map(vma, nvbo->bo.mem.mm_node);
Sorry, I don...
2023 Jan 25
5
[PATCH v2 1/4] drm/amdgpu: Use cursor start instead of ttm resource start
cleanup PAGE_SHIFT operation and replacing
ttm_resource resource->start with cursor start
using amdgpu_res_first API.
v1 -> v2: reorder patch sequence
Signed-off-by: Somalapuram Amaranath <Amaranath.Somalapuram at amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 11 ++++++++---
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 10 +++++++---
2 files changed, 15 insertions(+), 6
2009 Dec 19
1
[PATCH] drm/nouveau: always do buffer object moves on bo->channel
...+ return NvDmaVRAM;
}
static int
@@ -495,22 +489,11 @@ nouveau_bo_move_m2mf(struct ttm_buffer_object *bo, int evict, bool intr,
int ret;
chan = nvbo->channel;
- if (!chan || nvbo->tile_flags || nvbo->no_vm)
+ if (!chan)
chan = dev_priv->channel;
src_offset = old_mem->mm_node->start << PAGE_SHIFT;
dst_offset = new_mem->mm_node->start << PAGE_SHIFT;
- if (chan != dev_priv->channel) {
- if (old_mem->mem_type == TTM_PL_TT)
- src_offset += dev_priv->vm_gart_base;
- else
- src_offset += dev_priv->vm_vram_base;
-
- if (new_mem->mem...
2013 Sep 25
1
[PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap
...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);
> else
>
2013 Nov 12
0
[PATCH 2/7] drm/nv50-: untile mmap'd bo's
...rivers/gpu/drm/nouveau/nouveau_bo.c
@@ -1259,6 +1259,7 @@ nouveau_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem)
{
struct ttm_mem_type_manager *man = &bdev->man[mem->mem_type];
struct nouveau_drm *drm = nouveau_bdev(bdev);
+ struct nouveau_mem *node = mem->mm_node;
struct drm_device *dev = drm->dev;
int ret;
@@ -1281,14 +1282,16 @@ nouveau_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem)
mem->bus.is_iomem = !dev->agp->cant_use_aperture;
}
#endif
- break;
+ if (!node->memtype)
+ /* untiled */
+ break;...
2018 Dec 19
0
[PATCH 04/10] drm/virtio: move virtio_gpu_object_{attach, detach} calls.
...51 +254,6 @@ static struct ttm_tt *virtio_gpu_ttm_tt_create(struct ttm_buffer_object *bo,
return >t->ttm.ttm;
}
-static void virtio_gpu_move_null(struct ttm_buffer_object *bo,
- struct ttm_mem_reg *new_mem)
-{
- struct ttm_mem_reg *old_mem = &bo->mem;
-
- BUG_ON(old_mem->mm_node != NULL);
- *old_mem = *new_mem;
- new_mem->mm_node = NULL;
-}
-
-static int virtio_gpu_bo_move(struct ttm_buffer_object *bo, bool evict,
- struct ttm_operation_ctx *ctx,
- struct ttm_mem_reg *new_mem)
-{
- int ret;
-
- ret = ttm_bo_wait(bo, ctx->interruptible, ctx->no_wait...
2019 Mar 18
0
[PATCH v3 1/5] drm/virtio: move virtio_gpu_object_{attach, detach} calls.
...51 +254,6 @@ static struct ttm_tt *virtio_gpu_ttm_tt_create(struct ttm_buffer_object *bo,
return >t->ttm.ttm;
}
-static void virtio_gpu_move_null(struct ttm_buffer_object *bo,
- struct ttm_mem_reg *new_mem)
-{
- struct ttm_mem_reg *old_mem = &bo->mem;
-
- BUG_ON(old_mem->mm_node != NULL);
- *old_mem = *new_mem;
- new_mem->mm_node = NULL;
-}
-
-static int virtio_gpu_bo_move(struct ttm_buffer_object *bo, bool evict,
- struct ttm_operation_ctx *ctx,
- struct ttm_mem_reg *new_mem)
-{
- int ret;
-
- ret = ttm_bo_wait(bo, ctx->interruptible, ctx->no_wait...
2020 Sep 01
4
[PATCH 1/3] drm/ttm: make sure that we always zero init mem.bus v2
...file changed, 9 insertions(+)
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index e3931e515906..772c640a6046 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -650,6 +650,9 @@ static int ttm_bo_evict(struct ttm_buffer_object *bo,
evict_mem.mm_node = NULL;
evict_mem.bus.io_reserved_vm = false;
evict_mem.bus.io_reserved_count = 0;
+ evict_mem.bus.base = 0;
+ evict_mem.bus.offset = 0;
+ evict_mem.bus.addr = NULL;
ret = ttm_bo_mem_space(bo, &placement, &evict_mem, ctx);
if (ret) {
@@ -1084,6 +1087,9 @@ static int ttm_bo_move_bu...