diff options
| author | Junwei Zhang <Jerry.Zhang@amd.com> | 2018-05-11 11:02:23 +0800 | 
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2018-05-15 13:44:23 -0500 | 
| commit | a50cb94819f81bfafb5dc5a605baba9b40ba3243 (patch) | |
| tree | 2a2f08e12ddbcf51309b38c3535dbf54d3fcf9c9 /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | |
| parent | 967c650d4973dd87355c8540a18e6fa58844e547 (diff) | |
drm/amdgpu: set ttm bo priority before initialization
Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com>
Reviewed-by: David Zhou <david1.zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 5 | 
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index e62153a86001..6a9e46ae7f0a 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c @@ -419,6 +419,8 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev,  	bo->tbo.bdev = &adev->mman.bdev;  	amdgpu_ttm_placement_from_domain(bo, bp->domain); +	if (bp->type == ttm_bo_type_kernel) +		bo->tbo.priority = 1;  	r = ttm_bo_init_reserved(&adev->mman.bdev, &bo->tbo, size, bp->type,  				 &bo->placement, page_align, &ctx, acc_size, @@ -434,9 +436,6 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev,  	else  		amdgpu_cs_report_moved_bytes(adev, ctx.bytes_moved, 0); -	if (bp->type == ttm_bo_type_kernel) -		bo->tbo.priority = 1; -  	if (bp->flags & AMDGPU_GEM_CREATE_VRAM_CLEARED &&  	    bo->tbo.mem.placement & TTM_PL_FLAG_VRAM) {  		struct dma_fence *fence;  | 
