Re: [PATCH 5/6] drm/ttm: stop allocating dummy resources during BO creation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>-----Original Message-----
>From: dri-devel <dri-devel-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of
>Christian König
>Sent: Thursday, July 7, 2022 6:25 AM
>To: intel-gfx@xxxxxxxxxxxxxxxxxxxxx; dri-devel@xxxxxxxxxxxxxxxxxxxxx;
>nouveau@xxxxxxxxxxxxxxxxxxxxx; amd-gfx@xxxxxxxxxxxxxxxxxxxxx
>Cc: Christian König <christian.koenig@xxxxxxx>
>Subject: [PATCH 5/6] 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 <christian.koenig@xxxxxxx>

Reviewed-by: Michael J. Ruhl <michael.j.ruhl@xxxxxxxxx>

M

>---
> drivers/gpu/drm/ttm/ttm_bo.c | 7 -------
> 1 file changed, 7 deletions(-)
>
>diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
>index a2f49bdda8a1..f491be751a2f 100644
>--- a/drivers/gpu/drm/ttm/ttm_bo.c
>+++ b/drivers/gpu/drm/ttm/ttm_bo.c
>@@ -960,7 +960,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);
>@@ -978,12 +977,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.
>--
>2.25.1





[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux