search for: mem_typ

Displaying 20 results from an estimated 217 matches for "mem_typ".

Did you mean: mem_type
2013 Sep 02
0
[PATCH] drm/nv50-: fix tiled memory layout checks
...E); @@ -713,6 +713,8 @@ nvc0_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo, u32 page_count = new_mem->num_pages; int ret, last_count = 0; + nv_error(chan->drm, "Evicting %#x bytes from %u/%#Lx to %u/%#Lx\n", page_count << PAGE_SHIFT, old_mem->mem_type, src_offset, new_mem->mem_type, dst_offset); + ret = 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...
2009 Aug 19
1
[PATCH] drm/nouveau: Add a MM for mappable VRAM that isn't usable as scanout.
...; TTM_PL_FLAG_VRAM) { + flags |= TTM_PL_FLAG_PRIV1; + if (!nvbo->mappable) + flags |= TTM_PL_FLAG_PRIV0; + } /* Some of the tile_flags have a periodic structure of 24*4096 bytes, * align to to that as well as the page size. Overallocate memory to @@ -271,6 +274,21 @@ nouveau_bo_init_mem_type(struct ttm_bo_device *bdev, uint32_t type, man->available_caching = man->default_caching = 0; break; + case TTM_PL_PRIV1: /* Mappable but unusable as scanout. */ + { + man->flags = TTM_MEMTYPE_FLAG_FIXED | + TTM_MEMTYPE_FLAG_MAPPABLE | + TTM_MEMTYPE_FLAG_NEEDS_IORE...
2019 Sep 27
5
[PATCH 1/2] drm/qxl: stop abusing TTM to call driver internal functions
...ex 548dfe6f3b26..299e63a951c5 100644 --- a/drivers/gpu/drm/qxl/qxl_object.c +++ b/drivers/gpu/drm/qxl/qxl_object.c @@ -148,7 +148,6 @@ int qxl_bo_kmap(struct qxl_bo *bo, void **ptr) void *qxl_bo_kmap_atomic_page(struct qxl_device *qdev, struct qxl_bo *bo, int page_offset) { - struct ttm_mem_type_manager *man = &bo->tbo.bdev->man[bo->tbo.mem.mem_type]; void *rptr; int ret; struct io_mapping *map; @@ -160,9 +159,7 @@ void *qxl_bo_kmap_atomic_page(struct qxl_device *qdev, else goto fallback; - (void) ttm_mem_io_lock(man, false); - ret = ttm_mem_io_reserve(bo->tbo...
2019 Sep 30
2
[Spice-devel] [PATCH 1/2] drm/qxl: stop abusing TTM to call driver internal functions
...m/qxl/qxl_object.c >> +++ b/drivers/gpu/drm/qxl/qxl_object.c >> @@ -148,7 +148,6 @@ int qxl_bo_kmap(struct qxl_bo *bo, void **ptr) >> void *qxl_bo_kmap_atomic_page(struct qxl_device *qdev, >> struct qxl_bo *bo, int page_offset) >> { >> - struct ttm_mem_type_manager *man = >> &bo->tbo.bdev->man[bo->tbo.mem.mem_type]; >> void *rptr; >> int ret; >> struct io_mapping *map; >> @@ -160,9 +159,7 @@ void *qxl_bo_kmap_atomic_page(struct qxl_device *qdev, >> else >> goto fallback; >>...
2019 Sep 30
2
[Spice-devel] [PATCH 1/2] drm/qxl: stop abusing TTM to call driver internal functions
...m/qxl/qxl_object.c >> +++ b/drivers/gpu/drm/qxl/qxl_object.c >> @@ -148,7 +148,6 @@ int qxl_bo_kmap(struct qxl_bo *bo, void **ptr) >> void *qxl_bo_kmap_atomic_page(struct qxl_device *qdev, >> struct qxl_bo *bo, int page_offset) >> { >> - struct ttm_mem_type_manager *man = >> &bo->tbo.bdev->man[bo->tbo.mem.mem_type]; >> void *rptr; >> int ret; >> struct io_mapping *map; >> @@ -160,9 +159,7 @@ void *qxl_bo_kmap_atomic_page(struct qxl_device *qdev, >> else >> goto fallback; >>...
2013 Sep 25
1
[PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap
...c b/drivers/gpu/drm/nouveau/nouveau_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) > nouv...
2019 Sep 30
1
[Spice-devel] [PATCH 1/2] drm/qxl: stop abusing TTM to call driver internal functions
...pu/drm/qxl/qxl_object.c >>>> @@ -148,7 +148,6 @@ int qxl_bo_kmap(struct qxl_bo *bo, void **ptr) >>>> void *qxl_bo_kmap_atomic_page(struct qxl_device *qdev, >>>> struct qxl_bo *bo, int page_offset) >>>> { >>>> - struct ttm_mem_type_manager *man = >>>> &bo->tbo.bdev->man[bo->tbo.mem.mem_type]; >>>> void *rptr; >>>> int ret; >>>> struct io_mapping *map; >>>> @@ -160,9 +159,7 @@ void *qxl_bo_kmap_atomic_page(struct qxl_device *qdev, >>&gt...
2012 Nov 21
2
[PATCH] drm/nouveau: fix takedown in move_notify
...gt;vma_list)) { + vma = list_first_entry(&nvbo->vma_list, struct nouveau_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...
2016 Mar 10
3
[PATCH mesa 3/3] nouveau: Add support for clover / OpenCL kernel input parameters
...vers/nouveau/codegen/nv50_ir_from_tgsi.cpp > @@ -1523,9 +1523,21 @@ Converter::makeSym(uint tgsiFile, int fileIdx, int idx, int c, uint32_t address) > > sym->reg.fileIndex = fileIdx; > > - if (tgsiFile == TGSI_FILE_MEMORY && > - code->memoryFiles[fileIdx].mem_type == TGSI_MEMORY_TYPE_SHARED) > - sym->setFile(FILE_MEMORY_SHARED); > + if (tgsiFile == TGSI_FILE_MEMORY) { > + switch (code->memoryFiles[fileIdx].mem_type) { > + case TGSI_MEMORY_TYPE_SHARED: > + sym->setFile(FILE_MEMORY_SHARED); > + break...
2019 Nov 20
2
Move io_reserve_lru handling into the driver
Just a gentle ping on this. Already got the Acked-by from Daniel, but I need some of the nouveau guys to test this since I can only compile test it. Regards, Christian.
2019 Sep 27
0
[Spice-devel] [PATCH 1/2] drm/qxl: stop abusing TTM to call driver internal functions
...4 > --- a/drivers/gpu/drm/qxl/qxl_object.c > +++ b/drivers/gpu/drm/qxl/qxl_object.c > @@ -148,7 +148,6 @@ int qxl_bo_kmap(struct qxl_bo *bo, void **ptr) > void *qxl_bo_kmap_atomic_page(struct qxl_device *qdev, > struct qxl_bo *bo, int page_offset) > { > - struct ttm_mem_type_manager *man = > &bo->tbo.bdev->man[bo->tbo.mem.mem_type]; > void *rptr; > int ret; > struct io_mapping *map; > @@ -160,9 +159,7 @@ void *qxl_bo_kmap_atomic_page(struct qxl_device *qdev, > else > goto fallback; > > - (void) ttm_mem_io_lock(man,...
2016 Mar 10
8
[PATCH mesa 0/3] tgsi and nouveau global / local / opencl-input mem support
Hi, Here are patches which implement the support for OpenCL kernel input parameters we discussed. They also add the tgsi parsing bits for adding support for global / local mem, but no implementation yet. Regards, Hans
2010 Mar 18
0
[PATCH] drm/nouveau: Make use of TTM busy_placements.
...7 +206,7 @@ nouveau_bo_pin(struct nouveau_bo *nvbo, uint32_t memtype) { struct drm_nouveau_private *dev_priv = nouveau_bdev(nvbo->bo.bdev); struct ttm_buffer_object *bo = &nvbo->bo; - int ret, i; + int ret; if (nvbo->pin_refcnt && !(memtype & (1 << bo->mem.mem_type))) { NV_ERROR(nouveau_bdev(bo->bdev)->dev, @@ -215,9 +222,7 @@ nouveau_bo_pin(struct nouveau_bo *nvbo, uint32_t memtype) if (ret) goto out; - nouveau_bo_placement_set(nvbo, memtype); - for (i = 0; i < nvbo->placement.num_placement; i++) - nvbo->placements[i] |= TTM_PL_FLA...
2020 Jan 24
4
TTM/Nouveau cleanups
Hi guys, I've already send this out in September last year, but only got a response from Daniel. Could you guys please test this and tell me what you think about it? Basically I'm trying to remove all driver specific features from TTM which don't need to be inside the framework. Thanks, Christian.
2016 Mar 16
5
[PATCH mesa v2 1/3] tgsi: Fix decl.Atomic and .Shared not propagating when parsing tgsi text
When support for decl.Atomic and .Shared was added, tgsi_build_declaration was not updated to propagate these properly. Signed-off-by: Hans de Goede <hdegoede at redhat.com> Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu> --- Changes in v2: -Add Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu> --- src/gallium/auxiliary/tgsi/tgsi_build.c | 6 ++++++ 1 file changed, 6
2019 Sep 30
3
[PATCH 1/2] drm/nouveau: move io_reserve_lru handling into the driver
...uveau_bo(bo); + + mutex_lock(&drm->ttm.io_reserve_mutex); + list_del_init(&nvbo->io_reserve_lru); + mutex_unlock(&drm->ttm.io_reserve_mutex); +} + int nouveau_bo_validate(struct nouveau_bo *nvbo, bool interruptible, bool no_wait_gpu) @@ -674,8 +696,6 @@ nouveau_bo_init_mem_type(struct ttm_bo_device *bdev, uint32_t type, } man->func = &nouveau_vram_manager; - man->io_reserve_fastpath = false; - man->use_io_reserve_lru = true; } else { man->func = &ttm_bo_manager_func; } @@ -1304,6 +1324,8 @@ nouveau_bo_move_ntfy(struct ttm_buffe...
2016 Mar 10
3
[PATCH mesa 3/3] nouveau: Add support for clover / OpenCL kernel input parameters
...23,9 +1523,21 @@ Converter::makeSym(uint tgsiFile, int fileIdx, int >>> idx, int c, uint32_t address) >>> >>> sym->reg.fileIndex = fileIdx; >>> >>> - if (tgsiFile == TGSI_FILE_MEMORY && >>> - code->memoryFiles[fileIdx].mem_type == TGSI_MEMORY_TYPE_SHARED) >>> - sym->setFile(FILE_MEMORY_SHARED); >>> + if (tgsiFile == TGSI_FILE_MEMORY) { >>> + switch (code->memoryFiles[fileIdx].mem_type) { >>> + case TGSI_MEMORY_TYPE_SHARED: >>> + sym->setFile(F...
2019 Sep 30
0
[Spice-devel] [PATCH 1/2] drm/qxl: stop abusing TTM to call driver internal functions
...t; +++ b/drivers/gpu/drm/qxl/qxl_object.c > >> @@ -148,7 +148,6 @@ int qxl_bo_kmap(struct qxl_bo *bo, void **ptr) > >> void *qxl_bo_kmap_atomic_page(struct qxl_device *qdev, > >> struct qxl_bo *bo, int page_offset) > >> { > >> - struct ttm_mem_type_manager *man = > >> &bo->tbo.bdev->man[bo->tbo.mem.mem_type]; > >> void *rptr; > >> int ret; > >> struct io_mapping *map; > >> @@ -160,9 +159,7 @@ void *qxl_bo_kmap_atomic_page(struct qxl_device *qdev, > >> else > &g...
2013 Jul 15
3
[PATCH] drm/nouveau: do not move buffers when not needed
...e_len(device->pdev, 1) >> PAGE_SHIFT; - /* as long as the bo isn't in vram, and isn't tiled, we've got - * nothing to do here. + /* + * if the bo is not in vram, or remapping can be done (nv50+) + * do not worry about placement, any location is valid */ - if (bo->mem.mem_type != TTM_PL_VRAM) { - if (nv_device(drm->device)->card_type < NV_50 || - !nouveau_bo_tile_layout(nvbo)) - return 0; - } + if (nv_device(drm->device)->card_type >= NV_50 || + bo->mem.mem_type != TTM_PL_VRAM) + return 0; /* make sure bo is in mappable vram */ if...
2009 Dec 19
1
[PATCH] drm/nouveau: always do buffer object moves on bo->channel
...m/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c @@ -471,15 +471,9 @@ static inline uint32_t nouveau_bo_mem_ctxdma(struct nouveau_bo *nvbo, struct nouveau_channel *chan, struct ttm_mem_reg *mem) { - if (chan == nouveau_bdev(nvbo->bo.bdev)->channel) { - if (mem->mem_type == TTM_PL_TT) - return NvDmaGART; - return NvDmaVRAM; - } - if (mem->mem_type == TTM_PL_TT) - return chan->gart_handle; - return chan->vram_handle; + return NvDmaGART; + return NvDmaVRAM; } static int @@ -495,22 +489,11 @@ nouveau_bo_move_m2mf(struct ttm_buffer_object *bo, int...