[PATCH 3/4] drm/amdgpu: add IOCTL interface for per VM BOs v3

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

 



On 2017-08-30 11:00 AM, Christian König wrote:
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c
> @@ -136,7 +136,8 @@ struct dma_buf *amdgpu_gem_prime_export(struct drm_device *dev,
>  {
>  	struct amdgpu_bo *bo = gem_to_amdgpu_bo(gobj);
>  
> -	if (amdgpu_ttm_tt_get_usermm(bo->tbo.ttm))
> +	if (amdgpu_ttm_tt_get_usermm(bo->tbo.ttm) ||
> +	    bo->flags & AMDGPU_GEM_CREATE_VM_ALWAYS_VALID)
>  		return ERR_PTR(-EPERM);
>  
>  	return drm_gem_prime_export(dev, gobj, flags);

Is this limitation necessary? If it weren't for this, I'd use per-VM BOs
for KFD, because we always need to validate all our BOs when we restore
from an eviction anyway. But we need to be able to support buffer
sharing at the same time. And we don't know which buffers an application
plans to shared at allocation time.

Either way, we could address this later. This patch is Reviewed-by:
Felix Kuehling <Felix.Kuehling at amd.com>

Regards,
  Felix



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

  Powered by Linux