Skip to content

Commit 8cd9991

Browse files
committed
drm/i915: Prevent concurrent GGTT update and use on Braswell (again)
On Braswell, under heavy stress, if we update the GGTT while simultaneously accessing another region inside the GTT, we are returned the wrong values. To prevent this we stop the machine to update the GGTT entries so that no memory traffic can occur at the same time. This was first spotted in commit 5bab6f6 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Fri Oct 23 18:43:32 2015 +0100 drm/i915: Serialise updates to GGTT with access through GGTT on Braswell but removed again in forlorn hope with commit 4509276 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Mon Feb 20 12:47:18 2017 +0000 drm/i915: Remove Braswell GGTT update w/a However, gem_concurrent_blit is once again only stable with the patch applied and CI is detecting the odd failure in forked gem_mmap_gtt tests (which smell like the same issue). Fwiw, a wide variety of CPU memory barriers (around GGTT flushing, fence updates, PTE updates) and GPU flushes/invalidates (between requests, after PTE updates) were tried as part of the investigation to find an alternate cause, nothing comes close to serialised GGTT updates. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105591 Testcase: igt/gem_concurrent_blit Testcase: igt/gem_mmap_gtt/*forked* References: 5bab6f6 ("drm/i915: Serialise updates to GGTT with access through GGTT on Braswell") References: 4509276 ("drm/i915: Remove Braswell GGTT update w/a") Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190114211729.30352-1-chris@chris-wilson.co.uk
1 parent 305dc3f commit 8cd9991

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/gpu/drm/i915/i915_gem_gtt.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3232,7 +3232,8 @@ static int gen8_gmch_probe(struct i915_ggtt *ggtt)
32323232
ggtt->vm.insert_entries = gen8_ggtt_insert_entries;
32333233

32343234
/* Serialize GTT updates with aperture access on BXT if VT-d is on. */
3235-
if (intel_ggtt_update_needs_vtd_wa(dev_priv)) {
3235+
if (intel_ggtt_update_needs_vtd_wa(dev_priv) ||
3236+
IS_CHERRYVIEW(dev_priv) /* fails with concurrent use/update */) {
32363237
ggtt->vm.insert_entries = bxt_vtd_ggtt_insert_entries__BKL;
32373238
ggtt->vm.insert_page = bxt_vtd_ggtt_insert_page__BKL;
32383239
if (ggtt->vm.clear_range != nop_clear_range)

0 commit comments

Comments
 (0)