[Intel-gfx] [PATCH 1/7] drm/i915: Don't use MI_STORE_DWORD_IMM on Sandybridge/vcs

Chris Wilson chris at chris-wilson.co.uk
Fri Aug 18 11:17:03 UTC 2017


Quoting Mika Kuoppala (2017-08-18 12:07:20)
> Chris Wilson <chris at chris-wilson.co.uk> writes:
> >       if (!eb->reloc_cache.vaddr &&
> >           (DBG_FORCE_RELOC == FORCE_GPU_RELOC ||
> > -          !reservation_object_test_signaled_rcu(vma->resv, true))) {
> > +          !reservation_object_test_signaled_rcu(vma->resv, true)) &&
> > +         __intel_engine_can_store_dword(eb->reloc_cache.gen,
> > +                                        eb->engine->class)) {
> >               const unsigned int gen = eb->reloc_cache.gen;
> 
> If you lift this to upper scope, you can make the check little
> shorter. But incase you are avoiding the assignment to the latest,
> i am not insisting.
> 
> There is engine in the eb so could you elaborate that
> do we get by not doig intel_engine_can_store_dword(eb->engine)?

I'm just partial to avoiding the pointer chasing. I want to make sure
that the compiler/cpu see that we are reusing the gen, and prefer to
keep the gen that we do use next to its friends inside eb->reloc_cache.
-Chris


More information about the Intel-gfx mailing list