summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/drm/amd/amdgpu
diff options
context:
space:
mode:
authorjsg <jsg@openbsd.org>2019-05-31 10:55:01 +0000
committerjsg <jsg@openbsd.org>2019-05-31 10:55:01 +0000
commitc6b608c571fdb79f978b8a47d977b56b88e7c369 (patch)
treee8211b5452af5d8388cd547330d9d3be8a1b0888 /sys/dev/pci/drm/amd/amdgpu
parentsimilar to note recently added to bgpd.conf(5), mention in docs for (diff)
downloadwireguard-openbsd-c6b608c571fdb79f978b8a47d977b56b88e7c369.tar.xz
wireguard-openbsd-c6b608c571fdb79f978b8a47d977b56b88e7c369.zip
remove duplicate page table
a holdover from when the allocation wasn't done in ttm
Diffstat (limited to 'sys/dev/pci/drm/amd/amdgpu')
-rw-r--r--sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c
index 7fe4c457120..f8b3fcbca4f 100644
--- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c
@@ -793,9 +793,6 @@ struct amdgpu_ttm_tt {
struct list_head guptasks;
atomic_t mmu_invalidations;
uint32_t last_set_pages;
-
- bus_dmamap_t map;
- bus_dma_segment_t *segs;
};
/**
@@ -1201,9 +1198,6 @@ static void amdgpu_ttm_backend_destroy(struct ttm_tt *ttm)
put_task_struct(gtt->usertask);
#endif
- bus_dmamap_destroy(gtt->adev->dmat, gtt->map);
- free(gtt->segs, M_DRM, 0);
-
ttm_dma_tt_fini(&gtt->ttm);
kfree(gtt);
}
@@ -1226,7 +1220,6 @@ static struct ttm_tt *amdgpu_ttm_tt_create(struct ttm_buffer_object *bo,
{
struct amdgpu_device *adev;
struct amdgpu_ttm_tt *gtt;
- unsigned long size = bo->num_pages << PAGE_SHIFT;
adev = amdgpu_ttm_adev(bo->bdev);
@@ -1242,18 +1235,6 @@ static struct ttm_tt *amdgpu_ttm_tt_create(struct ttm_buffer_object *bo,
kfree(gtt);
return NULL;
}
-
- gtt->segs = mallocarray(gtt->ttm.ttm.num_pages,
- sizeof(bus_dma_segment_t), M_DRM, M_WAITOK | M_ZERO);
-
- if (bus_dmamap_create(adev->dmat, size, gtt->ttm.ttm.num_pages, size,
- 0, BUS_DMA_WAITOK, &gtt->map)) {
- free(gtt->segs, M_DRM, 0);
- ttm_dma_tt_fini(&gtt->ttm);
- free(gtt, M_DRM, 0);
- return NULL;
- }
-
return &gtt->ttm.ttm;
}