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
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to