search for: ttm_bo_device

Displaying 20 results from an estimated 208 matches for "ttm_bo_device".

2018 Feb 27
4
[PATCH 4/5] drm/ttm: add ttm_sg_tt_init
...#ifdef CONFIG_X86 > static inline int ttm_tt_set_page_caching(struct page *p, > enum ttm_caching_state c_old, > @@ -227,8 +237,8 @@ void ttm_tt_destroy(struct ttm_tt *ttm) > ttm->func->destroy(ttm); > } > > -int ttm_tt_init(struct ttm_tt *ttm, struct ttm_bo_device *bdev, > - unsigned long size, uint32_t page_flags) > +void ttm_tt_init_fields(struct ttm_tt *ttm, struct ttm_bo_device *bdev, > + unsigned long size, uint32_t page_flags) > { > ttm->bdev = bdev; > ttm->num_pages = (size + PAGE_SIZE - 1) >> PAGE_SHIFT; >...
2020 Jul 15
3
[PATCH 1/4] drm: remove optional dummy function from drivers using TTM
...ons(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 3df685287cc1..9c0f12f74af9 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -836,10 +836,6 @@ static int amdgpu_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_ return 0; } -static void amdgpu_ttm_io_mem_free(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem) -{ -} - static unsigned long amdgpu_ttm_io_mem_pfn(struct ttm_buffer_object *bo, unsigned long page_offset) { @@ -1754,7 +1750,6 @@ static struct ttm_bo_driver...
2019 Sep 05
1
[PATCH 1/8] drm/ttm: turn ttm_bo_device.vma_manager into a pointer
Rename the embedded struct vma_offset_manager, new name is _vma_manager. ttm_bo_device.vma_manager changed to a pointer. The ttm_bo_device_init() function gets an additional vma_manager argument which allows to initialize ttm with a different vma manager. When passing NULL the embedded _vma_manager is used. All callers are updated to pass NULL, so the behavior doesn't change....
2019 Sep 05
1
[PATCH 1/8] drm/ttm: turn ttm_bo_device.vma_manager into a pointer
Rename the embedded struct vma_offset_manager, new name is _vma_manager. ttm_bo_device.vma_manager changed to a pointer. The ttm_bo_device_init() function gets an additional vma_manager argument which allows to initialize ttm with a different vma manager. When passing NULL the embedded _vma_manager is used. All callers are updated to pass NULL, so the behavior doesn't change....
2019 Sep 05
1
[PATCH 1/8] drm/ttm: turn ttm_bo_device.vma_manager into a pointer
Rename the embedded struct vma_offset_manager, new name is _vma_manager. ttm_bo_device.vma_manager changed to a pointer. The ttm_bo_device_init() function gets an additional vma_manager argument which allows to initialize ttm with a different vma manager. When passing NULL the embedded _vma_manager is used. All callers are updated to pass NULL, so the behavior doesn't change....
2018 Mar 05
0
[PATCH 4/5] drm/ttm: add ttm_sg_tt_init
...ic inline int ttm_tt_set_page_caching(struct page *p, >>                         enum ttm_caching_state c_old, >> @@ -227,8 +237,8 @@ void ttm_tt_destroy(struct ttm_tt *ttm) >>       ttm->func->destroy(ttm); >>   } >>   -int ttm_tt_init(struct ttm_tt *ttm, struct ttm_bo_device *bdev, >> -        unsigned long size, uint32_t page_flags) >> +void ttm_tt_init_fields(struct ttm_tt *ttm, struct ttm_bo_device *bdev, >> +            unsigned long size, uint32_t page_flags) >>   { >>       ttm->bdev = bdev; >>       ttm->num_pages = (siz...
2019 Sep 27
5
[PATCH 1/2] drm/qxl: stop abusing TTM to call driver internal functions
...d..8a24f8e101da 100644 --- a/drivers/gpu/drm/qxl/qxl_drv.h +++ b/drivers/gpu/drm/qxl/qxl_drv.h @@ -354,6 +354,8 @@ int qxl_mode_dumb_mmap(struct drm_file *filp, /* qxl ttm */ int qxl_ttm_init(struct qxl_device *qdev); void qxl_ttm_fini(struct qxl_device *qdev); +int qxl_ttm_io_mem_reserve(struct ttm_bo_device *bdev, + struct ttm_mem_reg *mem); int qxl_mmap(struct file *filp, struct vm_area_struct *vma); /* qxl image */ diff --git a/drivers/gpu/drm/qxl/qxl_object.c b/drivers/gpu/drm/qxl/qxl_object.c index 548dfe6f3b26..299e63a951c5 100644 --- a/drivers/gpu/drm/qxl/qxl_object.c +++ b/drivers/gpu/...
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.
2019 Sep 30
3
[PATCH 1/2] drm/nouveau: move io_reserve_lru handling into the driver
...+ 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_buffer_object *bo, bool evi...
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.
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 Apr 09
0
[PATCH 13/15] drm/vboxvideo: Convert vboxvideo driver to Simple TTM
...de <drm/drm_simple_ttm_helper.h> > + > #include <drm/ttm/ttm_bo_api.h> > #include <drm/ttm/ttm_bo_driver.h> > #include <drm/ttm/ttm_placement.h> > @@ -78,9 +80,7 @@ struct vbox_private { > > int fb_mtrr; > > - struct { > - struct ttm_bo_device bdev; > - } ttm; > + struct drm_simple_ttm ttm; > > struct mutex hw_mutex; /* protects modeset and accel/vbva accesses */ > struct work_struct hotplug_work; > diff --git a/drivers/gpu/drm/vboxvideo/vbox_ttm.c b/drivers/gpu/drm/vboxvideo/vbox_ttm.c > index a1d64e1ea90c....
2020 Sep 01
4
[PATCH 1/3] drm/ttm: make sure that we always zero init mem.bus v2
...ffer(struct ttm_buffer_object *bo, mem.page_alignment = bo->mem.page_alignment; mem.bus.io_reserved_vm = false; mem.bus.io_reserved_count = 0; + mem.bus.base = 0; + mem.bus.offset = 0; + mem.bus.addr = NULL; mem.mm_node = NULL; /* @@ -1243,6 +1249,9 @@ int ttm_bo_init_reserved(struct ttm_bo_device *bdev, bo->mem.page_alignment = page_alignment; bo->mem.bus.io_reserved_vm = false; bo->mem.bus.io_reserved_count = 0; + bo->mem.bus.base = 0; + bo->mem.bus.offset = 0; + bo->mem.bus.addr = NULL; bo->moving = NULL; bo->mem.placement = (TTM_PL_FLAG_SYSTEM | TTM_PL_F...
2020 Sep 01
0
[PATCH 3/3] drm/ttm: remove io_reserve_lru handling v2
...bo_unmap_virtual_locked(bo); - ttm_mem_io_unlock(old_man); + ttm_bo_unmap_virtual(bo); /* * Create and bind a ttm if required. @@ -538,7 +534,6 @@ static void ttm_bo_release(struct kref *kref) struct ttm_buffer_object *bo = container_of(kref, struct ttm_buffer_object, kref); struct ttm_bo_device *bdev = bo->bdev; - struct ttm_resource_manager *man = ttm_manager_type(bdev, bo->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(bd...
2020 Jan 24
1
[PATCH 1/2] drm/nouveau: move io_reserve_lru handling into the driver v2
...tex); > + 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) > @@ -675,8 +697,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; > } > @@ -1305,6 +1325,8 @@ nouveau_...
2019 Sep 30
2
[Spice-devel] [PATCH 1/2] drm/qxl: stop abusing TTM to call driver internal functions
...h >> +++ b/drivers/gpu/drm/qxl/qxl_drv.h >> @@ -354,6 +354,8 @@ int qxl_mode_dumb_mmap(struct drm_file *filp, >> /* qxl ttm */ >> int qxl_ttm_init(struct qxl_device *qdev); >> void qxl_ttm_fini(struct qxl_device *qdev); >> +int qxl_ttm_io_mem_reserve(struct ttm_bo_device *bdev, >> + struct ttm_mem_reg *mem); >> int qxl_mmap(struct file *filp, struct vm_area_struct *vma); >> >> /* qxl image */ >> diff --git a/drivers/gpu/drm/qxl/qxl_object.c >> b/drivers/gpu/drm/qxl/qxl_object.c >> index 548dfe6f3b26..299e63a951c...
2019 Sep 30
2
[Spice-devel] [PATCH 1/2] drm/qxl: stop abusing TTM to call driver internal functions
...h >> +++ b/drivers/gpu/drm/qxl/qxl_drv.h >> @@ -354,6 +354,8 @@ int qxl_mode_dumb_mmap(struct drm_file *filp, >> /* qxl ttm */ >> int qxl_ttm_init(struct qxl_device *qdev); >> void qxl_ttm_fini(struct qxl_device *qdev); >> +int qxl_ttm_io_mem_reserve(struct ttm_bo_device *bdev, >> + struct ttm_mem_reg *mem); >> int qxl_mmap(struct file *filp, struct vm_area_struct *vma); >> >> /* qxl image */ >> diff --git a/drivers/gpu/drm/qxl/qxl_object.c >> b/drivers/gpu/drm/qxl/qxl_object.c >> index 548dfe6f3b26..299e63a951c...
2019 Apr 24
0
[PATCH v2 07/17] drm/ast: Convert AST driver to VRAM MM
...m/ttm/ttm_module.h> - #include <drm/drm_gem.h> #include <drm/drm_gem_vram_helper.h> +#include <drm/drm_vram_mm_helper.h> + #include <linux/i2c.h> #include <linux/i2c-algo-bit.h> @@ -104,9 +100,7 @@ struct ast_private { int fb_mtrr; - struct { - struct ttm_bo_device bdev; - } ttm; + struct drm_vram_mm vmm; struct drm_gem_object *cursor_cache; uint64_t cursor_cache_gpu_addr; diff --git a/drivers/gpu/drm/ast/ast_main.c b/drivers/gpu/drm/ast/ast_main.c index 61fc7b8ea470..92510251fe25 100644 --- a/drivers/gpu/drm/ast/ast_main.c +++ b/drivers/gpu/drm/ast/ast...
2019 May 06
0
[PATCH v4 12/19] drm/bochs: Convert bochs driver to VRAM MM
...+#include <drm/drm_vram_mm_helper.h> /* ---------------------------------------------------------------------- */ @@ -74,12 +73,6 @@ struct bochs_device { struct drm_device *dev; struct drm_simple_display_pipe pipe; struct drm_connector connector; - - /* ttm */ - struct { - struct ttm_bo_device bdev; - bool initialized; - } ttm; }; /* ---------------------------------------------------------------------- */ @@ -99,10 +92,6 @@ int bochs_hw_load_edid(struct bochs_device *bochs); /* bochs_mm.c */ int bochs_mm_init(struct bochs_device *bochs); void bochs_mm_fini(struct bochs_device *b...
2020 Jan 28
1
[PATCH 1/2] drm/nouveau: move io_reserve_lru handling into the driver v2
...t_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) > @@ -675,8 +697,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 { >...