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.st...@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. Regards, Lucas _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel