Skip to content

Commit 1802537

Browse files
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]> Signed-off-by: Matthew Auld <[email protected]> Acked-by: Nirmoy Das <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 2424321 commit 1802537

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

drivers/gpu/drm/ttm/ttm_bo.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,6 @@ int ttm_bo_init_reserved(struct ttm_device *bdev, struct ttm_buffer_object *bo,
952952
struct sg_table *sg, struct dma_resv *resv,
953953
void (*destroy) (struct ttm_buffer_object *))
954954
{
955-
static const struct ttm_place sys_mem = { .mem_type = TTM_PL_SYSTEM };
956955
int ret;
957956

958957
kref_init(&bo->kref);
@@ -969,12 +968,6 @@ int ttm_bo_init_reserved(struct ttm_device *bdev, struct ttm_buffer_object *bo,
969968
bo->base.resv = &bo->base._resv;
970969
atomic_inc(&ttm_glob.bo_count);
971970

972-
ret = ttm_resource_alloc(bo, &sys_mem, &bo->resource);
973-
if (unlikely(ret)) {
974-
ttm_bo_put(bo);
975-
return ret;
976-
}
977-
978971
/*
979972
* For ttm_bo_type_device buffers, allocate
980973
* address space from the device.

0 commit comments

Comments
 (0)