search for: ttm_resourc

Displaying 20 results from an estimated 39 matches for "ttm_resourc".

Did you mean: ttm_resource
2020 Aug 07
2
[PATCH] drm/nouveau: missing cases of rename ttm_mem_reg to ttm_resource.
From: Rodrigo Vivi <rodrigo.vivi at gmail.com> These are missed cases that I just identified with allyesconfig build. Fixes: 2966141ad2dd ("drm/ttm: rename ttm_mem_reg to ttm_resource.") Cc: Dave Airlie <airlied at redhat.com> Cc: Ben Skeggs <bskeggs at redhat.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi at gmail.com> --- drivers/gpu/drm/nouveau/nouveau_bo.h | 14 +++++++------- drivers/gpu/drm/nouveau/nouveau_bo0039.c | 4 ++-- drivers/gpu/drm/no...
2020 Aug 07
0
[PATCH] drm/nouveau: missing cases of rename ttm_mem_reg to ttm_resource.
...at gmail.com> > > These are missed cases that I just identified with allyesconfig build. > Is this against drm-tip? it's a merge problem, that I thought I'd already addressed, but tip seems to have lost it. Dave. > Fixes: 2966141ad2dd ("drm/ttm: rename ttm_mem_reg to ttm_resource.") > Cc: Dave Airlie <airlied at redhat.com> > Cc: Ben Skeggs <bskeggs at redhat.com> > Signed-off-by: Rodrigo Vivi <rodrigo.vivi at gmail.com> > --- > drivers/gpu/drm/nouveau/nouveau_bo.h | 14 +++++++------- > drivers/gpu/drm/nouveau/nouveau_bo0039.c...
2020 Sep 01
0
[PATCH 3/3] drm/ttm: remove io_reserve_lru handling v2
...nig <christian.koenig at amd.com> Acked-by: Daniel Vetter <daniel.vetter at ffwll.ch> --- drivers/gpu/drm/ttm/ttm_bo.c | 34 +-------- drivers/gpu/drm/ttm/ttm_bo_util.c | 113 +++-------------------------- drivers/gpu/drm/ttm/ttm_bo_vm.c | 39 +++------- drivers/gpu/drm/ttm/ttm_resource.c | 3 - include/drm/ttm/ttm_bo_api.h | 1 - include/drm/ttm/ttm_bo_driver.h | 5 -- include/drm/ttm/ttm_resource.h | 16 ---- 7 files changed, 24 insertions(+), 187 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 772c640a6046..89d8a...
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
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 ---
2020 Aug 07
1
[PATCH] drm/nouveau: missing cases of rename ttm_mem_reg to ttm_resource.
On Fri, 7 Aug 2020 at 14:03, Dave Airlie <airlied at gmail.com> wrote: > > On Fri, 7 Aug 2020 at 11:13, Rodrigo Vivi <rodrigo.vivi at intel.com> wrote: > > > > From: Rodrigo Vivi <rodrigo.vivi at gmail.com> > > > > These are missed cases that I just identified with allyesconfig build. > > > > Is this against drm-tip? it's a merge
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/a...
2020 Aug 21
0
[PATCH 2/3] drm/nouveau: move io_reserve_lru handling into the driver v4
...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(struct nouveau_drm *drm, + struct ttm_resource *reg) +{ + struct nouveau_mem *mem = nouveau_mem(reg); + + if (!reg->bus.base && !reg->bus.offset) + return; /* already freed */ + + if (drm->client.mem->oclass >= NVIF_CLASS_MEM_NV50) { + switch (reg->mem_type) { + case TTM_PL_TT: + if (mem->kind) + nvif_objec...
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 ++++...
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
2023 May 26
1
[PATCH] drm: Remove unnecessary (void*) conversions
...| 2 +- drivers/gpu/drm/omapdrm/omap_debugfs.c | 6 +++--- drivers/gpu/drm/pl111/pl111_debugfs.c | 2 +- drivers/gpu/drm/qxl/qxl_debugfs.c | 4 ++-- drivers/gpu/drm/tiny/arcpgu.c | 2 +- drivers/gpu/drm/ttm/ttm_resource.c | 3 +-- drivers/gpu/drm/virtio/virtgpu_debugfs.c | 6 +++--- drivers/gpu/drm/vmwgfx/ttm_object.c | 5 ++--- drivers/gpu/drm/vmwgfx/vmwgfx_gem.c | 2 +- 12 files changed, 19 insertions(+), 21 deletions(-) diff -...
2023 May 26
1
[PATCH] drm: Remove unnecessary (void*) conversions
...| 2 +- drivers/gpu/drm/omapdrm/omap_debugfs.c | 6 +++--- drivers/gpu/drm/pl111/pl111_debugfs.c | 2 +- drivers/gpu/drm/qxl/qxl_debugfs.c | 4 ++-- drivers/gpu/drm/tiny/arcpgu.c | 2 +- drivers/gpu/drm/ttm/ttm_resource.c | 3 +-- drivers/gpu/drm/virtio/virtgpu_debugfs.c | 6 +++--- drivers/gpu/drm/vmwgfx/ttm_object.c | 5 ++--- drivers/gpu/drm/vmwgfx/vmwgfx_gem.c | 2 +- 12 files changed, 19 insertions(+), 21 deletions(-) diff -...
2023 May 26
1
[PATCH] drm: Remove unnecessary (void*) conversions
...m/omapdrm/omap_debugfs.c | 6 +++--- > drivers/gpu/drm/pl111/pl111_debugfs.c | 2 +- > drivers/gpu/drm/qxl/qxl_debugfs.c | 4 ++-- > drivers/gpu/drm/tiny/arcpgu.c | 2 +- > drivers/gpu/drm/ttm/ttm_resource.c | 3 +-- > drivers/gpu/drm/virtio/virtgpu_debugfs.c | 6 +++--- > drivers/gpu/drm/vmwgfx/ttm_object.c | 5 ++--- > drivers/gpu/drm/vmwgfx/vmwgfx_gem.c | 2 +- > 12 files changed, 19 insertions(+),...
2023 May 26
1
[PATCH] drm: Remove unnecessary (void*) conversions
...m/omapdrm/omap_debugfs.c | 6 +++--- > drivers/gpu/drm/pl111/pl111_debugfs.c | 2 +- > drivers/gpu/drm/qxl/qxl_debugfs.c | 4 ++-- > drivers/gpu/drm/tiny/arcpgu.c | 2 +- > drivers/gpu/drm/ttm/ttm_resource.c | 3 +-- > drivers/gpu/drm/virtio/virtgpu_debugfs.c | 6 +++--- > drivers/gpu/drm/vmwgfx/ttm_object.c | 5 ++--- > drivers/gpu/drm/vmwgfx/vmwgfx_gem.c | 2 +- > 12 files changed, 19 insertions(+),...
2023 Jan 25
0
[PATCH v2 1/4] drm/amdgpu: Use cursor start instead of ttm resource start
Am 25.01.23 um 11:48 schrieb Somalapuram Amaranath: > 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/...
2020 Nov 10
3
[PATCH] drm/nouveau: Fix out-of-bounds access when deferencing MMU type
...diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index 8133377d865d..fe15299d417e 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c @@ -1142,9 +1142,12 @@ nouveau_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_resource *reg) struct nvkm_device *device = nvxx_device(&drm->client.device); struct nouveau_mem *mem = nouveau_mem(reg); struct nvif_mmu *mmu = &drm->client.mmu; - const u8 type = mmu->type[drm->ttm.type_vram].type; + u8 type = 0; int ret; + if (drm->ttm.type_vram >= 0)...
2020 Oct 20
0
[PATCH v5 05/10] drm/ttm: Add vmap/vunmap to TTM and TTM GEM helpers
...ma-buf-map.h> #include <linux/io.h> #include <linux/highmem.h> #include <linux/wait.h> @@ -527,6 +528,77 @@ void ttm_bo_kunmap(struct ttm_bo_kmap_obj *map) } EXPORT_SYMBOL(ttm_bo_kunmap); +int ttm_bo_vmap(struct ttm_buffer_object *bo, struct dma_buf_map *map) +{ + struct ttm_resource *mem = &bo->mem; + int ret; + + ret = ttm_mem_io_reserve(bo->bdev, mem); + if (ret) + return ret; + + if (mem->bus.is_iomem) { + void __iomem *vaddr_iomem; + size_t size = bo->num_pages << PAGE_SHIFT; + + if (mem->bus.addr) + vaddr_iomem = (void __iomem *)mem->bus...
2023 Jan 25
0
[PATCH v3 3/4] drm/amdgpu: Movie the amdgpu_gtt_mgr start and size from pages to bytes
...gpu/amdgpu_res_cursor.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h > index 5c4f93ee0c57..5c78f0b09351 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h > @@ -94,8 +94,8 @@ static inline void amdgpu_res_first(struct ttm_resource *res, > while (start >= node->size << PAGE_SHIFT) > start -= node++->size << PAGE_SHIFT; > > - cur->start = (node->start << PAGE_SHIFT) + start; > - cur->size = min((node->size << PAGE_SHIFT) - start, size); > + cur->...
2020 Oct 15
5
[PATCH v4 05/10] drm/ttm: Add vmap/vunmap to TTM and TTM GEM helpers
...#include <linux/highmem.h> > #include <linux/wait.h> > @@ -526,6 +527,77 @@ void ttm_bo_kunmap(struct ttm_bo_kmap_obj *map) > } > EXPORT_SYMBOL(ttm_bo_kunmap); > > +int ttm_bo_vmap(struct ttm_buffer_object *bo, struct dma_buf_map *map) > +{ > + struct ttm_resource *mem = &bo->mem; > + int ret; > + > + ret = ttm_mem_io_reserve(bo->bdev, mem); > + if (ret) > + return ret; > + > + if (mem->bus.is_iomem) { > + void __iomem *vaddr_iomem; > + unsigned long size = bo->num_pages << PAGE_SHIFT; Please use uint64_t...
2020 Nov 11
2
[PATCH] drm/nouveau: Fix out-of-bounds access when deferencing MMU type
...> b/drivers/gpu/drm/nouveau/nouveau_bo.c >> index 8133377d865d..fe15299d417e 100644 >> --- a/drivers/gpu/drm/nouveau/nouveau_bo.c >> +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c >> @@ -1142,9 +1142,12 @@ nouveau_ttm_io_mem_reserve(struct >> ttm_bo_device *bdev, struct ttm_resource *reg) >> struct nvkm_device *device = nvxx_device(&drm->client.device); >> struct nouveau_mem *mem = nouveau_mem(reg); >> struct nvif_mmu *mmu = &drm->client.mmu; >> - const u8 type = mmu->type[drm->ttm.type_vram].type; >> + u8 type = 0; >&gt...