[PATCH 1/6] drm/amdgpu: add AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS flag v3

Felix Kuehling felix.kuehling at amd.com
Fri Oct 7 21:19:06 UTC 2016


On 16-09-27 05:49 AM, Christian König wrote:
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> @@ -1195,6 +1195,15 @@ int amdgpu_cs_sysvm_access_required(struct amdgpu_cs_parser *parser)
>  		r = amdgpu_ttm_bind(&bo->tbo, &bo->tbo.mem);
>  		if (unlikely(r))
>  			return r;
> +
> +		if (bo->flags & AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS)
> +			continue;

Should you also continue if the BO is not VRAM?

Regards,
  Felix

> +
> +		bo->flags |= AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS;
> +		amdgpu_ttm_placement_from_domain(bo, bo->allowed_domains);
> +		r = ttm_bo_validate(&bo->tbo, &bo->placement, false, false);
> +		if (unlikely(r))
> +			return r;
>  	}
>  
>  	return 0;



More information about the amd-gfx mailing list