mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	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@amd.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Signed-off-by: Matthew Auld <matthew.auld@intel.com> Acked-by: Nirmoy Das <nirmoy.das@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230130120636.63765-4-matthew.auld@intel.com
This commit is contained in:
		
							parent
							
								
									24243212c5
								
							
						
					
					
						commit
						1802537820
					
				
					 1 changed files with 0 additions and 7 deletions
				
			
		| 
						 | 
					@ -952,7 +952,6 @@ int ttm_bo_init_reserved(struct ttm_device *bdev, struct ttm_buffer_object *bo,
 | 
				
			||||||
			 struct sg_table *sg, struct dma_resv *resv,
 | 
								 struct sg_table *sg, struct dma_resv *resv,
 | 
				
			||||||
			 void (*destroy) (struct ttm_buffer_object *))
 | 
								 void (*destroy) (struct ttm_buffer_object *))
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	static const struct ttm_place sys_mem = { .mem_type = TTM_PL_SYSTEM };
 | 
					 | 
				
			||||||
	int ret;
 | 
						int ret;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	kref_init(&bo->kref);
 | 
						kref_init(&bo->kref);
 | 
				
			||||||
| 
						 | 
					@ -969,12 +968,6 @@ int ttm_bo_init_reserved(struct ttm_device *bdev, struct ttm_buffer_object *bo,
 | 
				
			||||||
		bo->base.resv = &bo->base._resv;
 | 
							bo->base.resv = &bo->base._resv;
 | 
				
			||||||
	atomic_inc(&ttm_glob.bo_count);
 | 
						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
 | 
						 * For ttm_bo_type_device buffers, allocate
 | 
				
			||||||
	 * address space from the device.
 | 
						 * address space from the device.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue