[igt-dev] [RFC PATCH 1/4] lib/i915/gem_mman: add mmap_offset support
Kempczynski, Zbigniew
zbigniew.kempczynski at intel.com
Tue Oct 22 06:42:59 UTC 2019
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?
Zbigniew
More information about the igt-dev
mailing list