Re: [PATCH 06/13] drm/etnaviv: Use sychronized interface of the IOMMU-API

2017-08-17 Thread Joerg Roedel
On Thu, Aug 17, 2017 at 04:30:48PM +0200, Lucas Stach wrote: > Yeah, the IOMMU API being used internally is a historical accident, that > we didn't get around to rectify yet. It's on my things-we-need-to-do > list to prune the usage of the IOMMU API in etnaviv. Okay, so for the time being, I drop

Re: [PATCH 06/13] drm/etnaviv: Use sychronized interface of the IOMMU-API

2017-08-17 Thread Lucas Stach
Am Donnerstag, den 17.08.2017, 16:18 +0200 schrieb Joerg Roedel: > On Thu, Aug 17, 2017 at 04:03:54PM +0200, Lucas Stach wrote: > > There is no IOMMU driver in use. Etnaviv just uses part of the IOMMU API > > to manage the GPU internal MMU, see > > drivers/gpu/drm/etnaviv/etnaviv_iommu.c > > That

Re: [PATCH 06/13] drm/etnaviv: Use sychronized interface of the IOMMU-API

2017-08-17 Thread Joerg Roedel
On Thu, Aug 17, 2017 at 04:03:54PM +0200, Lucas Stach wrote: > There is no IOMMU driver in use. Etnaviv just uses part of the IOMMU API > to manage the GPU internal MMU, see > drivers/gpu/drm/etnaviv/etnaviv_iommu.c That looks like a very fragile construct, because it relies on internal behavior o

Re: [PATCH 06/13] drm/etnaviv: Use sychronized interface of the IOMMU-API

2017-08-17 Thread Lucas Stach
Am Donnerstag, den 17.08.2017, 15:45 +0200 schrieb Joerg Roedel: > Hi Lucas, > > On Thu, Aug 17, 2017 at 03:32:38PM +0200, Lucas Stach wrote: > > I don't think this is necessary. Etnaviv has managed and batched up TLB > > flushes from day 1, as they don't happen through the MMU MMIO interface, > >

Re: [PATCH 06/13] drm/etnaviv: Use sychronized interface of the IOMMU-API

2017-08-17 Thread Joerg Roedel
Hi Lucas, On Thu, Aug 17, 2017 at 03:32:38PM +0200, Lucas Stach wrote: > I don't think this is necessary. Etnaviv has managed and batched up TLB > flushes from day 1, as they don't happen through the MMU MMIO interface, > but through the GPU command stream. > > So if my understanding of this seri

Re: [PATCH 06/13] drm/etnaviv: Use sychronized interface of the IOMMU-API

2017-08-17 Thread Lucas Stach
Hi Joerg, Am Donnerstag, den 17.08.2017, 14:56 +0200 schrieb Joerg Roedel: > From: Joerg Roedel > > The map and unmap functions of the IOMMU-API changed their > semantics: They do no longer guarantee that the hardware > TLBs are synchronized with the page-table updates they made. > > To make co

[PATCH 06/13] drm/etnaviv: Use sychronized interface of the IOMMU-API

2017-08-17 Thread Joerg Roedel
From: Joerg Roedel The map and unmap functions of the IOMMU-API changed their semantics: They do no longer guarantee that the hardware TLBs are synchronized with the page-table updates they made. To make conversion easier, new synchronized functions have been introduced which give these guarante