]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Flush chipset caches after GGTT writes
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 17 Jul 2018 09:26:55 +0000 (10:26 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 17 Jul 2018 16:32:52 +0000 (17:32 +0100)
commit16a95013585ee3496752325602f957166f5ca4b6
treeef13fc17efce7ce5186d9ee423aa00abf6968d47
parent34ed5f3020804ea10b1356de52b8b48e1f951c33
drm/i915: Flush chipset caches after GGTT writes

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 60d2f1eda90b ("drm/i915/selftests: Provide
full mb() around clflush") and commit 376d688fc737 ("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
drivers/gpu/drm/i915/i915_gem.c