search for: ttm_mem_io_free

Displaying 20 results from an estimated 27 matches for "ttm_mem_io_free".

2019 Sep 27
5
[PATCH 1/2] drm/qxl: stop abusing TTM to call driver internal functions
...) { - struct ttm_mem_type_manager *man = &bo->tbo.bdev->man[bo->tbo.mem.mem_type]; - if ((bo->tbo.mem.mem_type != TTM_PL_VRAM) && (bo->tbo.mem.mem_type != TTM_PL_PRIV)) goto fallback; io_mapping_unmap_atomic(pmap); - - (void) ttm_mem_io_lock(man, false); - ttm_mem_io_free(bo->tbo.bdev, &bo->tbo.mem); - ttm_mem_io_unlock(man); return; fallback: qxl_bo_kunmap(bo); diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c index 9b24514c75aa..cb80e512dd46 100644 --- a/drivers/gpu/drm/qxl/qxl_ttm.c +++ b/drivers/gpu/drm/qxl/qxl_ttm.c @@ -...
2020 Sep 01
0
[PATCH 3/3] drm/ttm: remove io_reserve_lru handling v2
...o->mem.mem_type); size_t acc_size = bo->acc_size; int ret; @@ -556,9 +551,7 @@ static void ttm_bo_release(struct kref *kref) bo->bdev->driver->release_notify(bo); drm_vma_offset_remove(bdev->vma_manager, &bo->base.vma_node); - ttm_mem_io_lock(man, false); - ttm_mem_io_free_vm(bo); - ttm_mem_io_unlock(man); + ttm_mem_io_free(bdev, &bo->mem); } if (!dma_resv_test_signaled_rcu(bo->base.resv, true) || @@ -648,8 +641,6 @@ static int ttm_bo_evict(struct ttm_buffer_object *bo, evict_mem = bo->mem; evict_mem.mm_node = NULL; - evict_mem.bus.io_reser...
2019 Sep 27
0
[PATCH 2/2] drm/ttm: stop exporting ttm_mem_io_* functions
...er *man) mutex_unlock(&man->io_reserve_mutex); } -EXPORT_SYMBOL(ttm_mem_io_unlock); static int ttm_mem_io_evict(struct ttm_mem_type_manager *man) { @@ -153,7 +151,6 @@ int ttm_mem_io_reserve(struct ttm_bo_device *bdev, } return ret; } -EXPORT_SYMBOL(ttm_mem_io_reserve); void ttm_mem_io_free(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem) @@ -169,7 +166,6 @@ void ttm_mem_io_free(struct ttm_bo_device *bdev, bdev->driver->io_mem_free(bdev, mem); } -EXPORT_SYMBOL(ttm_mem_io_free); int ttm_mem_io_reserve_vm(struct ttm_buffer_object *bo) { -- 2.14.1
2019 Sep 30
2
[Spice-devel] [PATCH 1/2] drm/qxl: stop abusing TTM to call driver internal functions
...are the internal functions which TTM uses to call into the driver. That a driver uses them to call into itself doesn't seem to make sense. >> Instead call the qxl_ttm_io_mem_reserve() function directly. >> > I would add that qxl_ttm_io_mem_free is empty so the removal of > ttm_mem_io_free is fine. Good point, going to add that. Thanks, Christian. > >> Signed-off-by: Christian K?nig <christian.koenig at amd.com> >> --- >> drivers/gpu/drm/qxl/qxl_drv.h | 2 ++ >> drivers/gpu/drm/qxl/qxl_object.c | 11 +---------- >> drivers/gpu/drm/qxl...
2019 Sep 30
2
[Spice-devel] [PATCH 1/2] drm/qxl: stop abusing TTM to call driver internal functions
...are the internal functions which TTM uses to call into the driver. That a driver uses them to call into itself doesn't seem to make sense. >> Instead call the qxl_ttm_io_mem_reserve() function directly. >> > I would add that qxl_ttm_io_mem_free is empty so the removal of > ttm_mem_io_free is fine. Good point, going to add that. Thanks, Christian. > >> Signed-off-by: Christian K?nig <christian.koenig at amd.com> >> --- >> drivers/gpu/drm/qxl/qxl_drv.h | 2 ++ >> drivers/gpu/drm/qxl/qxl_object.c | 11 +---------- >> drivers/gpu/drm/qxl...
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 30
1
[Spice-devel] [PATCH 1/2] drm/qxl: stop abusing TTM to call driver internal functions
..." Good point mentioning the commit adding that, going to use this for the commit message. Christian. > >>>> Instead call the qxl_ttm_io_mem_reserve() function directly. >>>> >>> I would add that qxl_ttm_io_mem_free is empty so the removal of >>> ttm_mem_io_free is fine. >> Good point, going to add that. >> >> Thanks, >> Christian. >> > Frediano > >>>> Signed-off-by: Christian K?nig <christian.koenig at amd.com> >>>> --- >>>> drivers/gpu/drm/qxl/qxl_drv.h | 2 ++ >>&g...
2020 Jul 15
3
[PATCH 1/4] drm: remove optional dummy function from drivers using TTM
Implementing those is completely unecessary. Signed-off-by: Christian K?nig <christian.koenig at amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 5 ----- drivers/gpu/drm/drm_gem_vram_helper.c | 5 ----- drivers/gpu/drm/qxl/qxl_ttm.c | 6 ------ drivers/gpu/drm/radeon/radeon_ttm.c | 5 ----- drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c | 11 -----------
2020 Sep 01
4
[PATCH 1/3] drm/ttm: make sure that we always zero init mem.bus v2
We are trying to remove the io_lru handling and depend on zero init base, offset and addr here. v2: init addr as well Signed-off-by: Christian K?nig <christian.koenig at amd.com> --- drivers/gpu/drm/ttm/ttm_bo.c | 9 +++++++++ 1 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 ---
2019 Sep 27
0
[Spice-devel] [PATCH 1/2] drm/qxl: stop abusing TTM to call driver internal functions
...second patch QXL is just using exported (that is not internal) functions. Not that the idea of making them internal is bad but this comment is a wrong statement. > Instead call the qxl_ttm_io_mem_reserve() function directly. > I would add that qxl_ttm_io_mem_free is empty so the removal of ttm_mem_io_free is fine. > Signed-off-by: Christian K?nig <christian.koenig at amd.com> > --- > drivers/gpu/drm/qxl/qxl_drv.h | 2 ++ > drivers/gpu/drm/qxl/qxl_object.c | 11 +---------- > drivers/gpu/drm/qxl/qxl_ttm.c | 4 ++-- > 3 files changed, 5 insertions(+), 12 deletions(-)...
2019 Sep 30
3
[PATCH 1/2] drm/nouveau: move io_reserve_lru handling into the driver
While working on TTM cleanups I've found that the io_reserve_lru used by Nouveau is actually not working at all. In general we should remove driver specific handling from the memory management, so this patch moves the io_reserve_lru handling into Nouveau instead. The patch should be functional correct, but is only compile tested! Signed-off-by: Christian König <christian.koenig at
2020 Aug 21
5
Moving LRU handling into Nouveau v3
Hi guys, so I got some hardware and tested this and after hammering out tons of typos it now seems to work fine. Could you give it more testing? Thanks in advance, Christian
2019 Sep 30
0
[Spice-devel] [PATCH 1/2] drm/qxl: stop abusing TTM to call driver internal functions
...n't have been used in a driver. They were exported in commit afe6804c045fbd69a1b75c681107b5d6df9190de just for QXL." > >> Instead call the qxl_ttm_io_mem_reserve() function directly. > >> > > I would add that qxl_ttm_io_mem_free is empty so the removal of > > ttm_mem_io_free is fine. > > Good point, going to add that. > > Thanks, > Christian. > Frediano > > > >> Signed-off-by: Christian K?nig <christian.koenig at amd.com> > >> --- > >> drivers/gpu/drm/qxl/qxl_drv.h | 2 ++ > >> drivers/gpu/dr...
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.
2020 Oct 15
5
[PATCH v4 05/10] drm/ttm: Add vmap/vunmap to TTM and TTM GEM helpers
...; +void ttm_bo_vunmap(struct ttm_buffer_object *bo, struct dma_buf_map *map) > +{ > + if (dma_buf_map_is_null(map)) > + return; > + > + if (map->is_iomem) > + iounmap(map->vaddr_iomem); > + else > + vunmap(map->vaddr); > + dma_buf_map_clear(map); > + > + ttm_mem_io_free(bo->bdev, &bo->mem); > +} > +EXPORT_SYMBOL(ttm_bo_vunmap); > + > static int ttm_bo_wait_free_node(struct ttm_buffer_object *bo, > bool dst_use_tt) > { > diff --git a/include/drm/drm_gem_ttm_helper.h b/include/drm/drm_gem_ttm_helper.h > index 118cef76f84f...
2020 Oct 19
1
[PATCH v4 05/10] drm/ttm: Add vmap/vunmap to TTM and TTM GEM helpers
...>> +{ >> +??? if (dma_buf_map_is_null(map)) >> +??????? return; >> + >> +??? if (map->is_iomem) >> +??????? iounmap(map->vaddr_iomem); >> +??? else >> +??????? vunmap(map->vaddr); >> +??? dma_buf_map_clear(map); >> + >> +??? ttm_mem_io_free(bo->bdev, &bo->mem); >> +} >> +EXPORT_SYMBOL(ttm_bo_vunmap); >> + >> ? static int ttm_bo_wait_free_node(struct ttm_buffer_object *bo, >> ?????????????????? bool dst_use_tt) >> ? { >> diff --git a/include/drm/drm_gem_ttm_helper.h >> b/include...
2020 Oct 15
1
[PATCH v4 05/10] drm/ttm: Add vmap/vunmap to TTM and TTM GEM helpers
...+ if (dma_buf_map_is_null(map)) > > > + return; > > > + > > > + if (map->is_iomem) > > > + iounmap(map->vaddr_iomem); > > > + else > > > + vunmap(map->vaddr); > > > + dma_buf_map_clear(map); > > > + > > > + ttm_mem_io_free(bo->bdev, &bo->mem); > > > +} > > > +EXPORT_SYMBOL(ttm_bo_vunmap); > > > + > > > static int ttm_bo_wait_free_node(struct ttm_buffer_object *bo, > > > bool dst_use_tt) > > > { > > > diff --git a/include/drm/drm_gem_t...
2020 Oct 19
0
[PATCH v4 05/10] drm/ttm: Add vmap/vunmap to TTM and TTM GEM helpers
...f_map_is_null(map)) >>> +??????? return; >>> + >>> +??? if (map->is_iomem) >>> +??????? iounmap(map->vaddr_iomem); >>> +??? else >>> +??????? vunmap(map->vaddr); >>> +??? dma_buf_map_clear(map); >>> + >>> +??? ttm_mem_io_free(bo->bdev, &bo->mem); >>> +} >>> +EXPORT_SYMBOL(ttm_bo_vunmap); >>> + >>> ? static int ttm_bo_wait_free_node(struct ttm_buffer_object *bo, >>> ?????????????????? bool dst_use_tt) >>> ? { >>> diff --git a/include/drm/drm_gem_...
2020 Oct 15
0
[PATCH v4 05/10] drm/ttm: Add vmap/vunmap to TTM and TTM GEM helpers
...dr); + } + + return 0; +} +EXPORT_SYMBOL(ttm_bo_vmap); + +void ttm_bo_vunmap(struct ttm_buffer_object *bo, struct dma_buf_map *map) +{ + if (dma_buf_map_is_null(map)) + return; + + if (map->is_iomem) + iounmap(map->vaddr_iomem); + else + vunmap(map->vaddr); + dma_buf_map_clear(map); + + ttm_mem_io_free(bo->bdev, &bo->mem); +} +EXPORT_SYMBOL(ttm_bo_vunmap); + static int ttm_bo_wait_free_node(struct ttm_buffer_object *bo, bool dst_use_tt) { diff --git a/include/drm/drm_gem_ttm_helper.h b/include/drm/drm_gem_ttm_helper.h index 118cef76f84f..7c6d874910b8 100644 --- a/include/drm/drm...
2020 Oct 20
0
[PATCH v5 05/10] drm/ttm: Add vmap/vunmap to TTM and TTM GEM helpers
...nmap(struct ttm_buffer_object *bo, struct dma_buf_map *map) +{ + struct ttm_resource *mem = &bo->mem; + + if (dma_buf_map_is_null(map)) + return; + + if (!map->is_iomem) + vunmap(map->vaddr); + else if (!mem->bus.addr) + iounmap(map->vaddr_iomem); + dma_buf_map_clear(map); + + ttm_mem_io_free(bo->bdev, &bo->mem); +} +EXPORT_SYMBOL(ttm_bo_vunmap); + static int ttm_bo_wait_free_node(struct ttm_buffer_object *bo, bool dst_use_tt) { diff --git a/include/drm/drm_gem_ttm_helper.h b/include/drm/drm_gem_ttm_helper.h index 118cef76f84f..7c6d874910b8 100644 --- a/include/drm/drm...