aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian König <[email protected]>2022-02-17 16:29:43 +0100
committerChristian König <[email protected]>2023-01-25 10:00:17 +0100
commit00984ad39599bb2a1e6ec5d4e9c75a749f7f45c9 (patch)
treeb09dbab0bf8e8272be19332e3b60a269378c0d30
parent516198d317d81f33839ca850e83f6717b0d80e80 (diff)
drm/ttm: stop allocating dummy resources during BO creation
That should not be necessary any more when drivers should at least be able to handle the move without a resource. Signed-off-by: Christian König <[email protected]> Reviewed-by: Matthew Auld <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index 326a3d13a829..bb0c21c8caac 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -953,7 +953,6 @@ int ttm_bo_init_reserved(struct ttm_device *bdev, struct ttm_buffer_object *bo,
struct sg_table *sg, struct dma_resv *resv,
void (*destroy) (struct ttm_buffer_object *))
{
- static const struct ttm_place sys_mem = { .mem_type = TTM_PL_SYSTEM };
int ret;
kref_init(&bo->kref);
@@ -970,12 +969,6 @@ int ttm_bo_init_reserved(struct ttm_device *bdev, struct ttm_buffer_object *bo,
bo->base.resv = &bo->base._resv;
atomic_inc(&ttm_glob.bo_count);
- ret = ttm_resource_alloc(bo, &sys_mem, &bo->resource);
- if (unlikely(ret)) {
- ttm_bo_put(bo);
- return ret;
- }
-
/*
* For ttm_bo_type_device buffers, allocate
* address space from the device.