search for: ttm_pl_system

Displaying 20 results from an estimated 82 matches for "ttm_pl_system".

2019 May 06
2
[PATCH v4 01/19] drm: Add |struct drm_gem_vram_object| and helpers
...call that function? Something like this: drm_gem_vram_push_to_system() { if (gbo->pin_count == 1 && gbo->kmap.virtual) ttm_bo_kunmap(&gbo->kmap); return drm_gem_vram_unpin(); } > +struct drm_gem_vram_object { > + /* Supported placements are %TTM_PL_VRAM and %TTM_PL_SYSTEM */ > + struct ttm_placement placement; > + struct ttm_place placements[3]; placements[2] should be enough I guess? cheers, Gerd
2019 May 06
2
[PATCH v4 01/19] drm: Add |struct drm_gem_vram_object| and helpers
...call that function? Something like this: drm_gem_vram_push_to_system() { if (gbo->pin_count == 1 && gbo->kmap.virtual) ttm_bo_kunmap(&gbo->kmap); return drm_gem_vram_unpin(); } > +struct drm_gem_vram_object { > + /* Supported placements are %TTM_PL_VRAM and %TTM_PL_SYSTEM */ > + struct ttm_placement placement; > + struct ttm_place placements[3]; placements[2] should be enough I guess? cheers, Gerd
2019 May 06
1
[PATCH v4 01/19] drm: Add |struct drm_gem_vram_object| and helpers
...tem memory. Ah, missed that detail. > We > could build a common implementation out of both interfaces, but that > would obfuscate the code IMHO. I'd just leave it as it is. Ok. > >> +struct drm_gem_vram_object { > >> + /* Supported placements are %TTM_PL_VRAM and %TTM_PL_SYSTEM */ > >> + struct ttm_placement placement; > >> + struct ttm_place placements[3]; > > > > placements[2] should be enough I guess? > > TTM_PL_VRAM has index 2 and TTM_PL_SYSTEM has index 0. There's TTM_PL_TT > at index 1. We don't use all three array e...
2020 Aug 20
3
Moving LRU handling into Nouveau v2
Hi guys, I already tried this a few month ago, but since I don't have NVidia hardware its rather hard to test for me (need to get some ordered). Dave brought up the topic that we should probably try to move the handling into Nouveau once more, so I tried to fix the problem Ben reported and rebased on top of current drm-misc-next. Dave can you test this? At least in theory the approach
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-...
2009 Aug 19
1
[PATCH] drm/nouveau: Add a MM for mappable VRAM that isn't usable as scanout.
...+ break; + } case TTM_PL_TT: switch (dev_priv->gart_info.type) { case NOUVEAU_GART_AGP: @@ -564,6 +582,7 @@ nouveau_bo_verify_access(struct ttm_buffer_object *bo, struct file *filp) static uint32_t nouveau_mem_prios[] = { TTM_PL_PRIV0, + TTM_PL_PRIV1, TTM_PL_VRAM, TTM_PL_TT, TTM_PL_SYSTEM @@ -571,6 +590,7 @@ static uint32_t nouveau_mem_prios[] = { static uint32_t nouveau_busy_prios[] = { TTM_PL_TT, TTM_PL_PRIV0, + TTM_PL_PRIV1, TTM_PL_VRAM, TTM_PL_SYSTEM }; diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.c b/drivers/gpu/drm/nouveau/nouveau_drv.c index 65d884e..7d2a032 10...
2020 Aug 20
0
[PATCH 1/2] drm/ttm: fix broken merge between drm-next and drm-misc-next
.../ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 97ac662a47cb..e3931e515906 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -1180,7 +1180,7 @@ int ttm_bo_validate(struct ttm_buffer_object *bo, /* * We might need to add a TTM. */ - if (bo->mem.mem_type == TTM_PL_SYSTEM && bo->ttm == NULL) { + if (bo->mem.mem_type == TTM_PL_SYSTEM) { ret = ttm_tt_create(bo, true); if (ret) return ret; diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c index 9aa4fbe386e6..1ccf1ef050d6 100644 --- a/drivers/gpu/drm/ttm/ttm_tt.c +++ b/driv...
2019 May 06
0
[PATCH v4 01/19] drm: Add |struct drm_gem_vram_object| and helpers
...is. The function is only used by ast and mgag200 framebuffer handling. It's actually something that should be done by VRAM MM, but both drivers are non-atomic and could require an overhaul anyway. >> +struct drm_gem_vram_object { >> + /* Supported placements are %TTM_PL_VRAM and %TTM_PL_SYSTEM */ >> + struct ttm_placement placement; >> + struct ttm_place placements[3]; > > placements[2] should be enough I guess? TTM_PL_VRAM has index 2 and TTM_PL_SYSTEM has index 0. There's TTM_PL_TT at index 1. We don't use all three array entries here, but I'm not sure i...
2012 Oct 12
0
[PATCH 2/3] drm/nouveau: add reservation to nouveau_bo_vma_del
...rs/gpu/drm/nouveau/nouveau_bo.c index 2fa736d..cee7448 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c @@ -1551,9 +1551,25 @@ nouveau_bo_vma_del(struct nouveau_bo *nvbo, struct nouveau_vma *vma) { if (vma->node) { if (nvbo->bo.mem.mem_type != TTM_PL_SYSTEM) { + ttm_bo_reserve(&nvbo->bo, false, false, false, 0); spin_lock(&nvbo->bo.bdev->fence_lock); ttm_bo_wait(&nvbo->bo, false, false, false); spin_unlock(&nvbo->bo.bdev->fence_lock); + ttm_bo_unreserve(&nvbo->bo); + nouveau_vm_unmap(vma); +...
2019 Apr 30
0
[PATCH v3 01/19] drm: Add |struct drm_gem_vram_object| and helpers
...gt; +/** >> + * struct drm_gem_vram_object - GEM object backed by VRAM >> + * @gem: GEM object >> + * @bo: TTM buffer object >> + * @kmap: Mapping information for @bo >> + * @placement: TTM placement information. Supported placements are \ >> + %TTM_PL_VRAM and %TTM_PL_SYSTEM >> + * @placements: TTM placement information. >> + * @pin_count: Pin counter >> + * >> + * The type struct drm_gem_vram_object represents a GEM object that is >> + * backed by VRAM. It can be used for simple frambuffer devices with >> + * dedicated memory. The b...
2019 Apr 09
0
[PATCH 13/15] drm/vboxvideo: Convert vboxvideo driver to Simple TTM
...te *vbox_bdev(struct ttm_bo_device *bd) > -{ > - return container_of(bd, struct vbox_private, ttm.bdev); > -} > - > -static int > -vbox_bo_init_mem_type(struct ttm_bo_device *bdev, u32 type, > - struct ttm_mem_type_manager *man) > -{ > - switch (type) { > - case TTM_PL_SYSTEM: > - man->flags = TTM_MEMTYPE_FLAG_MAPPABLE; > - man->available_caching = TTM_PL_MASK_CACHING; > - man->default_caching = TTM_PL_FLAG_CACHED; > - break; > - case TTM_PL_VRAM: > - man->func = &ttm_bo_manager_func; > - man->flags = TTM_MEMTYPE_FLAG_FIXED...
2020 Jan 24
1
[PATCH 1/2] drm/nouveau: move io_reserve_lru handling into the driver v2
...mp;ttm_bo_manager_func; > } > @@ -1305,6 +1325,8 @@ nouveau_bo_move_ntfy(struct ttm_buffer_object *bo, bool evict, > if (bo->destroy != nouveau_bo_del_ttm) > return; > > + nouveau_bo_del_io_reserve_lru(bo); > + > if (mem && new_reg->mem_type != TTM_PL_SYSTEM && > mem->mem.page == nvbo->page) { > list_for_each_entry(vma, &nvbo->vma_list, head) { > @@ -1427,6 +1449,30 @@ nouveau_bo_verify_access(struct ttm_buffer_object *bo, struct file *filp) > filp->private_data); > } > > +static voi...
2019 Apr 24
0
[PATCH v2 07/17] drm/ast: Convert AST driver to VRAM MM
...t_drv.h" -static inline struct ast_private * -ast_bdev(struct ttm_bo_device *bd) -{ - return container_of(bd, struct ast_private, ttm.bdev); -} - -static int -ast_bo_init_mem_type(struct ttm_bo_device *bdev, uint32_t type, - struct ttm_mem_type_manager *man) -{ - switch (type) { - case TTM_PL_SYSTEM: - man->flags = TTM_MEMTYPE_FLAG_MAPPABLE; - man->available_caching = TTM_PL_MASK_CACHING; - man->default_caching = TTM_PL_FLAG_CACHED; - break; - case TTM_PL_VRAM: - man->func = &ttm_bo_manager_func; - man->flags = TTM_MEMTYPE_FLAG_FIXED | - TTM_MEMTYPE_FLAG_MAPPABLE; -...
2019 May 06
0
[PATCH v4 12/19] drm/bochs: Convert bochs driver to VRAM MM
...-------- */ -static inline struct bochs_device *bochs_bdev(struct ttm_bo_device *bd) -{ - return container_of(bd, struct bochs_device, ttm.bdev); -} - -static int bochs_bo_init_mem_type(struct ttm_bo_device *bdev, uint32_t type, - struct ttm_mem_type_manager *man) -{ - switch (type) { - case TTM_PL_SYSTEM: - man->flags = TTM_MEMTYPE_FLAG_MAPPABLE; - man->available_caching = TTM_PL_MASK_CACHING; - man->default_caching = TTM_PL_FLAG_CACHED; - break; - case TTM_PL_VRAM: - man->func = &ttm_bo_manager_func; - man->flags = TTM_MEMTYPE_FLAG_FIXED | - TTM_MEMTYPE_FLAG_MAPPABLE; -...
2020 Jan 28
1
[PATCH 1/2] drm/nouveau: move io_reserve_lru handling into the driver v2
...} > @@ -1305,6 +1325,8 @@ nouveau_bo_move_ntfy(struct ttm_buffer_object *bo, bool evict, > if (bo->destroy != nouveau_bo_del_ttm) > return; > > + nouveau_bo_del_io_reserve_lru(bo); > + > if (mem && new_reg->mem_type != TTM_PL_SYSTEM && > mem->mem.page == nvbo->page) { > list_for_each_entry(vma, &nvbo->vma_list, head) { > @@ -1427,6 +1449,30 @@ nouveau_bo_verify_access(struct ttm_buffer_object *bo, struct file *filp) > filp-&g...
2014 Feb 06
13
[Bug 74613] New: [v3.14-rc1] [nv34] nouveau: get 0x10000000 put 0x0000ed30 state 0xc0000000 (err: MEM_FAULT) push 0x00000000
...memcpy buffer move 35b8141 drm/nouveau/ttm: explicity sync with kernel channel before moving buffer 3c57d85 drm/nouveau/ttm: tidy up creation of temporary buffer move vmas ab9b18a drm/nv04/plane: add support for nv04/nv05 video overlay 7ffb078 drm/nv10/plane: add YUYV support a554090 drm/nv50-: map TTM_PL_SYSTEM through a BAR for CPU access ce8f769 drm/nouveau: fix m2mf copy to tiled gart 2e2cfbe drm/nouveau/vm: reduce number of entry-points to vm_map() d0ce7b856 drm/nouveau: make vga_switcheroo code depend on VGA_SWITCHEROO 85b2331 drm: Kill DRM_*MEMORYBARRIER 1d6ac18 drm: Kill DRM_COPY_(TO|FROM)_USER bfd...
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 Jan 24
0
[PATCH 1/2] drm/nouveau: move io_reserve_lru handling into the driver v2
...lru = true; } else { man->func = &ttm_bo_manager_func; } @@ -1305,6 +1325,8 @@ nouveau_bo_move_ntfy(struct ttm_buffer_object *bo, bool evict, if (bo->destroy != nouveau_bo_del_ttm) return; + nouveau_bo_del_io_reserve_lru(bo); + if (mem && new_reg->mem_type != TTM_PL_SYSTEM && mem->mem.page == nvbo->page) { list_for_each_entry(vma, &nvbo->vma_list, head) { @@ -1427,6 +1449,30 @@ nouveau_bo_verify_access(struct ttm_buffer_object *bo, struct file *filp) filp->private_data); } +static void +nouveau_ttm_io_mem_free_locked(struct...
2020 Aug 21
0
[PATCH 2/3] drm/nouveau: move io_reserve_lru handling into the driver v4
...idate(struct nouveau_bo *nvbo, bool interruptible, bool no_wait_gpu) @@ -888,6 +910,8 @@ nouveau_bo_move_ntfy(struct ttm_buffer_object *bo, bool evict, if (bo->destroy != nouveau_bo_del_ttm) return; + nouveau_bo_del_io_reserve_lru(bo); + if (mem && new_reg->mem_type != TTM_PL_SYSTEM && mem->mem.page == nvbo->page) { list_for_each_entry(vma, &nvbo->vma_list, head) { @@ -1018,23 +1042,54 @@ nouveau_bo_verify_access(struct ttm_buffer_object *bo, struct file *filp) filp->private_data); } +static void +nouveau_ttm_io_mem_free_locked(struc...
2019 Oct 09
0
[PATCH 1/2] drm/nouveau: move io_reserve_lru handling into the driver
...= &ttm_bo_manager_func; > } > @@ -1304,6 +1324,8 @@ nouveau_bo_move_ntfy(struct ttm_buffer_object *bo, bool evict, > if (bo->destroy != nouveau_bo_del_ttm) > return; > > + nouveau_bo_del_io_reserve_lru(bo); > + > if (mem && new_reg->mem_type != TTM_PL_SYSTEM && > mem->mem.page == nvbo->page) { > list_for_each_entry(vma, &nvbo->vma_list, head) { > @@ -1426,6 +1448,30 @@ nouveau_bo_verify_access(struct ttm_buffer_object *bo, struct file *filp) > filp->private_data); > } > > +static void &gt...