Re: [PATCH v2 2/8] drm/etnaviv: split out cmdbuf mapping into address space

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

 



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@xxxxxxxxxxxxxx>
> > > ---
> > >  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@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