[Mesa-dev] [PATCH 12/16] i965: Use write-combine mappings where available
Chris Wilson
chris at chris-wilson.co.uk
Thu May 25 07:11:28 UTC 2017
On Thu, May 25, 2017 at 07:47:56AM +0100, Chris Wilson wrote:
> On Wed, May 24, 2017 at 01:04:54PM -0700, Matt Turner wrote:
> > +static bool
> > +test_has_mmap_wc(int fd)
> > +{
> > + return gem_param(fd, I915_PARAM_MMAP_VERSION) > 0;
>
> Of course I had to make this more complicated :(
>
> static bool
> test_has_mmap_wc_ioctl(int fd)
> {
> return gem_param(fd, I915_PARAM_MMAP_VERSION) > 0;
> }
>
> static bool
> test_has_wc_domain(int fd)
> {
> return gem_param(fd, I915_PARAM_MMAP_GTT_VERSION) >= 2;
> }
>
> static bool
> test_has_mmap_wc(int fd)
> {
> return test_has_mmap_wc_ioctl(fd) && test_has_wc_domain(fd);
> }
One thing on my wishlist was moving these to the screen (in device_info
or maybe kernel_info?), i.e. to do them just once per client.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the mesa-dev
mailing list