[igt-dev] [RFC PATCH 1/4] lib/i915/gem_mman: add mmap_offset support
Chris Wilson
chris at chris-wilson.co.uk
Tue Oct 22 12:11:55 UTC 2019
Quoting Kempczynski, Zbigniew (2019-10-22 07:42:59)
> On Wed, 2019-08-14 at 11:28 +0100, Chris Wilson wrote:
> > Quoting Lukasz Kalamarz (2019-08-14 11:21:37)
> > > +#define LOCAL_I915_PARAM_MMAP_OFFSET_VERSION 54
> > > +
> > > +bool gem_has_mmap_offset(int fd)
> > > +{
> > > + static int has_mmap_offset = -1;
> > > +
> > > + if (has_mmap_offset == -1) {
> >
> > How many times do I have to say that I am sorry for introducing static
> > here. It was to cut down on strace spam, but no one should be repeatedly
> > checking, so please don't cargo cult it. It doesn't bode well.
> > -Chris
>
> What's wrong with this optimization technique? Is that possible for single
> i915 driver we got different results? Only reason I see would be to have
> two different GPU's with different generations, but it is impossible?
The world has changed and that is now very possible.
-Chris
More information about the igt-dev
mailing list