Re: [PATCH 3/9] drm/tegra: gem: Remove premature import restrictions

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

 



On Thu, Nov 28, 2019 at 04:37:35PM +0100, Thierry Reding wrote:
> From: Thierry Reding <treding@xxxxxxxxxx>
> 
> It's not known at import time whether or not all users of a DMA-BUF will
> be able to deal with non-contiguous memory. Each user needs to verify at
> map-time whether it can access the buffer.
> 
> Signed-off-by: Thierry Reding <treding@xxxxxxxxxx>

I'm not seeing any other check for nents ... does this mean that there's
not actually any block that requires contig mem?
-Daniel

> ---
>  drivers/gpu/drm/tegra/gem.c | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/tegra/gem.c b/drivers/gpu/drm/tegra/gem.c
> index 6dfad56eee2b..bc15b430156d 100644
> --- a/drivers/gpu/drm/tegra/gem.c
> +++ b/drivers/gpu/drm/tegra/gem.c
> @@ -440,13 +440,6 @@ static struct tegra_bo *tegra_bo_import(struct drm_device *drm,
>  		err = tegra_bo_iommu_map(tegra, bo);
>  		if (err < 0)
>  			goto detach;
> -	} else {
> -		if (bo->sgt->nents > 1) {
> -			err = -EINVAL;
> -			goto detach;
> -		}
> -
> -		bo->iova = sg_dma_address(bo->sgt->sgl);
>  	}
>  
>  	bo->gem.import_attach = attach;
> -- 
> 2.23.0
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch



[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux