[Intel-gfx] [PATCH 2/2] drm/i915: Remove open-coded callers of flush_cpu_write_domain

Chris Wilson chris at chris-wilson.co.uk
Wed Jan 21 06:08:14 PST 2015


On Wed, Jan 21, 2015 at 02:53:49PM +0100, Daniel Vetter wrote:
> Both places check the cpu domain and through some indirection
> obj->pin_display and whether cpu access is coherent. And then flush
> both cpu caches and the chipset cache. Which is what
> flush_cpu_write_domain does.
> 
> Only difference is that on top we get a tracepoint, frontbuffer
> tracking and and domain tracking updates. Which doesn't matter since
> both paths are slowpaths.
> 
> So lets go with more shared code for clearer idioms.
> 
> Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>

Nice, took a few double checks to make sure that the
cpu_write_needs_clflush() does indeed equate to flush_cpu_write_domain()
here (the key is the passing obj->pin_display in the previous patch). I
think that is worth highlighting in the commit message.

Other than that,
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list