[Intel-gfx] [PATCH 3/6] drm/i915: Extend magic to_i915() to work with drm_i915_gem_object

Chris Wilson chris at chris-wilson.co.uk
Mon Mar 21 10:04:59 UTC 2016


On Mon, Mar 21, 2016 at 09:55:10AM +0000, Tvrtko Ursulin wrote:
> >  	/* See also use_cpu_reloc() */
> >-	if (HAS_LLC(vma->obj->base.dev))
> >+	if (HAS_LLC(vma->obj))
> 
> Things like HAS_LLC(obj) and HAS_LLC(engine) are IMHO illogical and
> non-intuitive.

Does this object/engine have last-line coherency, seems to make sense to
me. The goal has been to shift these to using dev_priv, for 2 reaons, on
the hotpaths careless pointer dereferencing adds extra memory loads that
are not immediately obvious unless you are familar with the macros and
the second reason is that widespread dev -> dev_private -> dev spreads
add a few extra pages of object size just from the extra mov
instructions!

INTEL_INFO() is definitely a more subjective matter of taste, but anything
other then INTEL_INFO(i915) is a stopgap imo.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list