Re: [PATCH v2 16/37] drm/i915/lmem: support pread

Chris Wilson
2019-07-30T12:05:40Z

Quoting Daniel Vetter (2019-07-30 09:58:22)
> On Thu, Jun 27, 2019 at 09:56:12PM +0100, Matthew Auld wrote:
> > We need to add support for pread'ing an LMEM object.
>
> Why? Usage outside from igts seems pretty dead, at least looking at iris
> and anv. This was kinda a neat thing for when we didn't yet realized that
> doing clflush in userspace is both possible and more efficient.
>
> Same for pwrite, iris just dropped it, anv doesn't seem to use it. And I
> thought mesa plan is to drop the old classic driver for when we'll need
> lmem. It's not much, but would allow us to drop a few things.

From the opposite perspective, it should only be a wrapper around code
that is being used internally for similar transfers. (One side-effect is
that it can be used to poke more directly at those internals.) It is also
not clear what the preferred strategy will be in future, especially as
people start discussing migration-on-pagefault.

It comes down to whether the maintenance burden of maintaining a
consistent API is worth the maintenance burden of not!
-Chris