Re: [PATCH 2/3] drm/etnaviv: allow to request specific virtual address for gem mapping

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

 



On Fri, 2019-08-02 at 19:29 +0200, Lucas Stach wrote:
> Allow the mapping code to request a specific virtual address for the gem
> mapping. If the virtual address is zero we fall back to the old mode of
> allocating a virtual address for the mapping.
> 
> Signed-off-by: Lucas Stach <l.stach@xxxxxxxxxxxxxx>

Reviewed-by: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>

> ---
>  drivers/gpu/drm/etnaviv/etnaviv_gem.c |  2 +-
>  drivers/gpu/drm/etnaviv/etnaviv_gem.h |  2 +-
>  drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 16 ++++++++++++++--
>  drivers/gpu/drm/etnaviv/etnaviv_mmu.h |  2 +-
>  4 files changed, 17 insertions(+), 5 deletions(-)
> 
[...]
> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_mmu.c b/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
> index 99c20094295c..c344dde2fa05 100644
> --- a/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
> +++ b/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
> @@ -220,9 +220,16 @@ static int etnaviv_iommu_find_iova(struct etnaviv_iommu_context *context,
>  	return ret;
>  }
>  
> +static int etnaviv_iommu_insert_exact(struct etnaviv_iommu_context *context,
> +		   struct drm_mm_node *node, size_t size, u64 va)
> +{
> +	return drm_mm_insert_node_in_range(&context->mm, node, size, 0, 0, va,
> +					   va + size, DRM_MM_INSERT_LOW);

We are only looking for an exact match, this could use
DRM_MM_INSERT_LOWEST.

regards
Philipp
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux