diff options
-rw-r--r-- | sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c | 19 | ||||
-rw-r--r-- | sys/dev/pci/drm/radeon/radeon_ttm.c | 18 |
2 files changed, 0 insertions, 37 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(>t->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, >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; } 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; } |