dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Guido Günther" <agx@sigxcpu.org>
To: Lucas Stach <l.stach@pengutronix.de>
Cc: etnaviv@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	patchwork-lst@pengutronix.de, kernel@pengutronix.de,
	Russell King <linux+etnaviv@armlinux.org.uk>
Subject: Re: [PATCH v2 2/8] drm/etnaviv: split out cmdbuf mapping into address space
Date: Fri, 9 Aug 2019 11:28:28 +0200	[thread overview]
Message-ID: <20190809092828.GA2182@bogon.m.sigxcpu.org> (raw)
In-Reply-To: <1565342233.2323.60.camel@pengutronix.de>

Hi,
On Fri, Aug 09, 2019 at 11:17:13AM +0200, Lucas Stach wrote:
> Am Donnerstag, den 08.08.2019, 12:26 +0200 schrieb Guido Günther:
> > Hi,
> > On Fri, Jul 05, 2019 at 07:17:21PM +0200, Lucas Stach wrote:
> > > This allows to decouple the cmdbuf suballocator create and mapping
> > > the region into the GPU address space. Allowing multiple AS to share
> > > a single cmdbuf suballoc.
> > > 
> > > > > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> > > ---
> > >  drivers/gpu/drm/etnaviv/etnaviv_buffer.c | 23 ++++----
> > >  drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.c | 35 ++++++------
> > >  drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.h | 11 +++-
> > >  drivers/gpu/drm/etnaviv/etnaviv_dump.c   |  6 +-
> > >  drivers/gpu/drm/etnaviv/etnaviv_gpu.c    | 19 +++++--
> > >  drivers/gpu/drm/etnaviv/etnaviv_gpu.h    |  3 +-
> > >  drivers/gpu/drm/etnaviv/etnaviv_mmu.c    | 70 +++++++++++++++---------
> > >  drivers/gpu/drm/etnaviv/etnaviv_mmu.h    | 12 ++--
> > >  8 files changed, 114 insertions(+), 65 deletions(-)
> [...]
> > > --- a/drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.c
> > > +++ b/drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.c
> > > @@ -8,6 +8,7 @@
> > >  #include <drm/drm_mm.h>
> > >  
> > >  #include "etnaviv_cmdbuf.h"
> > > +#include "etnaviv_gem.h"
> > >  #include "etnaviv_gpu.h"
> > >  #include "etnaviv_mmu.h"
> > >  
> > > @@ -21,10 +22,6 @@ struct etnaviv_cmdbuf_suballoc {
> > > > >  	void *vaddr;
> > > > >  	dma_addr_t paddr;
> > >  
> > > > > -	/* GPU mapping */
> > > > > -	u32 iova;
> > > > > -	struct drm_mm_node vram_node; /* only used on MMUv2 */
> > > -
> > > > >  	/* allocation management */
> > > > >  	struct mutex lock;
> > > > >  	DECLARE_BITMAP(granule_map, SUBALLOC_GRANULES);
> > > @@ -53,26 +50,31 @@ etnaviv_cmdbuf_suballoc_new(struct etnaviv_gpu * gpu)
> > > > >  		goto free_suballoc;
> > > > >  	}
> > >  
> > > > > -	ret = etnaviv_iommu_get_suballoc_va(gpu, suballoc->paddr,
> > > > > -					    &suballoc->vram_node, SUBALLOC_SIZE,
> > > > > -					    &suballoc->iova);
> > > > > -	if (ret)
> > > > > -		goto free_dma;
> > > -
> > 
> > This removed ret all ret uses in that function so the declaration of ret
> > can be dropped as well.
> 
> Actually, no. ret is still used in the allocation failure path.

You're right, what i wrote is only true without 

  drm/etnaviv: fix etnaviv_cmdbuf_suballoc_new return value

which should go in before this.
 -- Guido


> 
> Regards,
> Lucas
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2019-08-09  9:28 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-05 17:17 [PATCH v2 1/8] drm/etnaviv: simplify unbind checks Lucas Stach
2019-07-05 17:17 ` [PATCH v2 2/8] drm/etnaviv: split out cmdbuf mapping into address space Lucas Stach
2019-07-24 13:51   ` Philipp Zabel
2019-08-02 13:39   ` Guido Günther
2019-08-02 14:21     ` Philipp Zabel
2019-08-02 18:23       ` Guido Günther
2019-08-02 18:40   ` Guido Günther
2019-08-08 10:26   ` Guido Günther
2019-08-09  9:17     ` Lucas Stach
2019-08-09  9:28       ` Guido Günther [this message]
2019-07-05 17:17 ` [PATCH v2 3/8] drm/etnaviv: share a single cmdbuf suballoc region across all GPUs Lucas Stach
2019-07-24 15:37   ` Philipp Zabel
2019-07-05 17:17 ` [PATCH v2 4/8] drm/etnaviv: replace MMU flush marker with flush sequence Lucas Stach
2019-07-24 15:45   ` Philipp Zabel
2019-08-13 15:27   ` Guido Günther
2019-07-05 17:17 ` [PATCH v2 5/8] drm/etnaviv: rework MMU handling Lucas Stach
2019-07-29 15:35   ` Philipp Zabel
2019-07-05 17:17 ` [PATCH v2 6/8] drm/etnaviv: split out starting of FE idle loop Lucas Stach
2019-07-29 15:36   ` Philipp Zabel
2019-07-05 17:17 ` [PATCH v2 7/8] drm/etnaviv: provide MMU context to etnaviv_gem_mapping_get Lucas Stach
2019-07-29 15:38   ` Philipp Zabel
2019-07-05 17:17 ` [PATCH v2 8/8] drm/etnaviv: implement per-process address spaces on MMUv2 Lucas Stach
2019-07-30  9:44   ` Philipp Zabel
2019-07-24 12:11 ` [PATCH v2 1/8] drm/etnaviv: simplify unbind checks Philipp Zabel
2019-08-02  8:14 ` Guido Günther

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=20190809092828.GA2182@bogon.m.sigxcpu.org \
    --to=agx@sigxcpu.org \
    --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).