diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2019-05-31 10:55:02 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2019-05-31 10:55:02 +0000 |
commit | 0798962783835eb1d5bcf89a237c2119226f6507 (patch) | |
tree | 51775d1d365707efd469243c6db00e61b105e24b /sys/dev/pci/drm/radeon | |
parent | dbcf5ea29e23ab15d0c9be7658d37360e3ee142b (diff) |
remove duplicate page table
a holdover from when the allocation wasn't done in ttm
Diffstat (limited to 'sys/dev/pci/drm/radeon')
-rw-r--r-- | sys/dev/pci/drm/radeon/radeon_ttm.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/sys/dev/pci/drm/radeon/radeon_ttm.c b/sys/dev/pci/drm/radeon/radeon_ttm.c index d9fb2661c3d..68856e62e65 100644 --- a/sys/dev/pci/drm/radeon/radeon_ttm.c +++ b/sys/dev/pci/drm/radeon/radeon_ttm.c @@ -543,9 +543,6 @@ struct radeon_ttm_tt { uint64_t userptr; struct mm_struct *usermm; uint32_t userflags; - - bus_dmamap_t map; - bus_dma_segment_t *segs; }; /* prepare the sg table with the user pages */ @@ -693,8 +690,6 @@ static void radeon_ttm_backend_destroy(struct ttm_tt *ttm) { struct radeon_ttm_tt *gtt = (void *)ttm; - bus_dmamap_destroy(gtt->rdev->dmat, gtt->map); - free(gtt->segs, M_DRM, 0); ttm_dma_tt_fini(>t->ttm); kfree(gtt); } @@ -710,7 +705,6 @@ static struct ttm_tt *radeon_ttm_tt_create(struct ttm_buffer_object *bo, { struct radeon_device *rdev; struct radeon_ttm_tt *gtt; - unsigned long size = bo->num_pages << PAGE_SHIFT; rdev = radeon_get_rdev(bo->bdev); #if IS_ENABLED(CONFIG_AGP) @@ -730,18 +724,6 @@ static struct ttm_tt *radeon_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(rdev->dmat, size, gtt->ttm.ttm.num_pages, size, - 0, BUS_DMA_WAITOK, >t->map)) { - free(gtt->segs, M_DRM, 0); - ttm_dma_tt_fini(>t->ttm); - free(gtt, M_DRM, 0); - return NULL; - } - return >t->ttm.ttm; } |