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

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

 



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;



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

  Powered by Linux