[Mesa-dev] [PATCH] i965: Deny persistent mappings of incoherent GTT mmaps

Chris Wilson chris at chris-wilson.co.uk
Fri Aug 31 11:43:21 UTC 2018


Quoting Lionel Landwerlin (2018-08-31 12:32:23)
> On 31/08/2018 12:22, Chris Wilson wrote:
> > Quoting Lionel Landwerlin (2018-08-31 12:16:19)
> >> We would need a fairly recent kernel (drm-tip?) to test this in CI.
> > Unpatched mesa, assumes all is fine.
> > Post-patch mesa, assumes all is broken.
> >
> > So we can quickly see if anything actually fails if a persistent GGTT
> > mmap is rejected. Which is the important part for determining if such
> > exclusion will harm anyone. The problem is then is the risk of
> > corruption worth keeping it around.
> >
> >> I can't see any issue with this because we always have the meta path as
> >> a fallback for tiled buffers.
> > I'm worried if the mmap actually leaks through to glMapBufferRange with
> > say GL_MAP_PERSISTENT_BIT. Hmm, maybe that's all ok so long at the
> > client flushes are explicit.
> 
> 
> As far as I can tell, buffers are linear, so brw_bo_map() wouldn't even 
> try to map in gtt at first.
> 
> Then brw_bo_map_wc() would assert if it failed.
> 
> So we're fine? :)

I like that plan. Not having to rely on GGTT will save a lot of
headaches.
-Chris


More information about the mesa-dev mailing list