[igt-dev] [PATCH i-g-t] lib/i915/gem_mman: Add helper routine to check GTT version

Chris Wilson chris at chris-wilson.co.uk
Mon Nov 18 10:24:56 UTC 2019


Quoting Summers, Stuart (2019-11-17 22:12:32)
> On Sun, 2019-11-17 at 14:41 +0000, Chris Wilson wrote:
> > Quoting Stuart Summers (2019-11-17 14:39:16)
> > > Add a check to gem_pread and gem_pwrite to only allow GTT subtests
> > > when the GTT version is at least 1.
> > 
> > No, it must also run on kernels before ioctl versioning. Why?
> 
> Hm.. yeah that makes sense. I'll have to come up with something else :)
> Looking for a way to determine whether we can mmap to the GTT. I'll
> rethink and repost.

It's the same way as detecting whether or not we can use WC, UC or WB
page protections: trial-and-error at present.

It's not the worst way... If I was suggesting API, I would suggest it
would be a part of the memory discovery i915_query.
-Chris


More information about the igt-dev mailing list