Re: [PATCH 1/2] drm/i915: Simplify flush_cpu_write_domain

Chris Wilson
2015-01-21T14:04:03Z

On Wed, Jan 21, 2015 at 02:53:48PM +0100, Daniel Vetter wrote:
> We can push down the decision whether to force flushing into the
> implementation since in all places that matter obj->pin_display is
> accurate already. The only place where the optimization really matters
> is the sw_finish_ioctl, and that already checks for obj->pin_display
> on its own.
>
> I suspect that this was simply an artifact of how
>
> commit 2c22569bba8af6c2976d5f9479fe54a53a39966b
> Author: Chris Wilson <chris@chris-wilson.co.uk>
> Date: Fri Aug 9 12:26:45 2013 +0100
>
> drm/i915: Update rules for writing through the LLC with the cpu
>
> evolved - only v2 added the pin_display tracking.
>
> Note that we still retain the gist of this logic from the above commit
> with the explicit force argument for the low-level clflush function.
>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris

--
Chris Wilson, Intel Open Source Technology Centre