diff options
author | Christian König <christian.koenig@amd.com> | 2021-04-26 15:48:36 +0200 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2021-06-04 15:16:46 +0200 |
commit | beb4c86521bcc2620078137a6495371bb63ee501 (patch) | |
tree | c41fa3a26d26fe4dc1615f57833c26c387f7d1aa | |
parent | drm/amdgpu: switch the VRAM backend to self alloc (diff) | |
download | linux-beb4c86521bcc2620078137a6495371bb63ee501.tar.xz linux-beb4c86521bcc2620078137a6495371bb63ee501.zip |
drm/nouveau: switch the TTM backends to self alloc
Similar to the TTM range manager.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210602100914.46246-8-christian.koenig@amd.com
Diffstat (limited to '')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_mem.h | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_ttm.c | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_mem.h b/drivers/gpu/drm/nouveau/nouveau_mem.h index 7df3848e85aa..3a6a1be2ed52 100644 --- a/drivers/gpu/drm/nouveau/nouveau_mem.h +++ b/drivers/gpu/drm/nouveau/nouveau_mem.h @@ -13,6 +13,7 @@ nouveau_mem(struct ttm_resource *reg) } struct nouveau_mem { + struct ttm_resource base; struct nouveau_cli *cli; u8 kind; u8 comp; diff --git a/drivers/gpu/drm/nouveau/nouveau_ttm.c b/drivers/gpu/drm/nouveau/nouveau_ttm.c index b08b8efeefba..1ac2417effc0 100644 --- a/drivers/gpu/drm/nouveau/nouveau_ttm.c +++ b/drivers/gpu/drm/nouveau/nouveau_ttm.c @@ -58,6 +58,8 @@ nouveau_vram_manager_new(struct ttm_resource_manager *man, if (ret) return ret; + ttm_resource_init(bo, place, reg->mm_node); + ret = nouveau_mem_vram(reg, nvbo->contig, nvbo->page); if (ret) { nouveau_mem_del(reg); @@ -86,6 +88,7 @@ nouveau_gart_manager_new(struct ttm_resource_manager *man, if (ret) return ret; + ttm_resource_init(bo, place, reg->mm_node); reg->start = 0; return 0; } @@ -111,6 +114,7 @@ nv04_gart_manager_new(struct ttm_resource_manager *man, if (ret) return ret; + ttm_resource_init(bo, place, reg->mm_node); ret = nvif_vmm_get(&mem->cli->vmm.vmm, PTES, false, 12, 0, (long)reg->num_pages << PAGE_SHIFT, &mem->vma[0]); if (ret) { |