Skip to content

Commit

Permalink
drm/i915: Flush chipset caches after GGTT writes
Browse files Browse the repository at this point in the history
Our I915g (early gen3, the oldest machine we have in the farm) is still
reporting occasional incoherency performing the following operations:

  1) write through GGTT (indirect write into memory)
  2) write through either CPU or WC (direct write into memory)
  3) read from GGTT (indirect read)

Instead of reporting the value from (2), the read from GGTT reports the
earlier value written via the GGTT. We have made sure that the writes are
flushed from the CPU (commit 3a32497 ("drm/i915/selftests: Provide
full mb() around clflush") and commit add00e6 ("drm/i915: Flush the
WCB following a WC write")), but still see the error, just less
frequently. The only remaining cache that might be affected here is a
chipset cache, so flush that as well.

Testcase: igt/drv_selftest/live_coherency #gdg
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180717092655.28417-1-chris@chris-wilson.co.uk
  • Loading branch information
Chris Wilson committed Jul 17, 2018
1 parent d778847 commit a8bd3b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ void i915_gem_flush_ggtt_writes(struct drm_i915_private *dev_priv)
* that was!).
*/

wmb();
i915_gem_chipset_flush(dev_priv);

intel_runtime_pm_get(dev_priv);
spin_lock_irq(&dev_priv->uncore.lock);
Expand Down

0 comments on commit a8bd3b8

Please sign in to comment.