[Mesa-dev] [PATCH] anv: Stop setting domains to RENDER on EXEC_OBJECT_WRITE

Jason Ekstrand jason at jlekstrand.net
Mon Jul 10 15:11:45 UTC 2017


On Sat, Jul 8, 2017 at 12:18 PM, Matt Turner <mattst88 at gmail.com> wrote:

> On Sat, Jul 8, 2017 at 11:05 AM, Jason Ekstrand <jason at jlekstrand.net>
> wrote:
> > On July 7, 2017 1:52:54 PM Chris Wilson <chris at chris-wilson.co.uk>
> wrote:
> >
> >> Quoting Jason Ekstrand (2017-07-07 21:37:29)
> >>>
> >>> The reason we were doing this was to ensure that the kernel did the
> >>> appropriate cross-ring synchronization and flushing.  However, the
> >>> kernel only looks at EXEC_OBJECT_WRITE to determine whether or not to
> >>> insert a fence.  It only cares about the domain for determining whether
> >>> or not it needs to clflush the BO before using it for scanout but the
> >>> domain automatically gets set to RENDER internally by the kernel if
> >>> EXEC_OBJECT_WRITE is set.
> >>
> >>
> >> Once upon a time we also depended upon EXEC_OBJECT_WRITE for correct
> >> swapout. That was until I saw what you were planning to do for anv. Hmm,
> >> that puts the oldest kernel that might support anv as
> >>
> >> commit 51bc140431e233284660b1d22c47dec9ecdb521e [v4.3]
> >> Author: Chris Wilson <chris at chris-wilson.co.uk>
> >> Date:   Mon Aug 31 15:10:39 2015 +0100
> >>
> >>     drm/i915: Always mark the object as dirty when used by the GPU
> >
> >
> > I think we're probably ok there.  We have a hard requirement on memfd
> which
> > I think landed in 4.6 though I could be wrong about that.
>
> No. memfd_create was added in 3.17.
>

Bah.  I don't know why 4.6 is stuck in my brain as being important but it
is. :-/  In any case, is there some way we can check for that commit?
Otherwise, I think the only real thing we can do is just hope you don't
swap and accept corruption if you do. :-(

--Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170710/05518cb0/attachment.html>


More information about the mesa-dev mailing list