dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: Lucas Stach <l.stach@pengutronix.de>, etnaviv@lists.freedesktop.org
Cc: Russell King <linux+etnaviv@armlinux.org.uk>,
	dri-devel@lists.freedesktop.org, kernel@pengutronix.de,
	patchwork-lst@pengutronix.de
Subject: Re: [PATCH 2/3] drm/etnaviv: allow to request specific virtual address for gem mapping
Date: Mon, 05 Aug 2019 10:21:55 +0200	[thread overview]
Message-ID: <1564993315.3056.2.camel@pengutronix.de> (raw)
In-Reply-To: <20190802172953.4586-3-l.stach@pengutronix.de>

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@pengutronix.de>

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

> ---
>  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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2019-08-05  8:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-02 17:29 [PATCH 0/3] etnaviv softpin support Lucas Stach
2019-08-02 17:29 ` [PATCH 1/3] drm/etnaviv: skip command stream validation on PPAS capable GPUs Lucas Stach
2019-08-05  8:20   ` Philipp Zabel
2019-08-02 17:29 ` [PATCH 2/3] drm/etnaviv: allow to request specific virtual address for gem mapping Lucas Stach
2019-08-05  8:21   ` Philipp Zabel [this message]
2019-08-02 17:29 ` [PATCH 3/3] drm/etnaviv: implement softpin Lucas Stach
2019-08-05  8:58   ` Philipp Zabel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1564993315.3056.2.camel@pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=etnaviv@lists.freedesktop.org \
    --cc=kernel@pengutronix.de \
    --cc=l.stach@pengutronix.de \
    --cc=linux+etnaviv@armlinux.org.uk \
    --cc=patchwork-lst@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).