aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_ringbuffer.h
diff options
context:
space:
mode:
authorImre Deak <imre.deak@intel.com>2015-08-14 11:35:27 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-08-26 03:39:13 -0400
commit319404df2f682ddabf98cbf6421bb43b951ca978 (patch)
tree2c4a711444665b92ad4b4688265534e57b39640c /drivers/gpu/drm/i915/intel_ringbuffer.h
parent8be6ca8537e1230da8e92c753df4125151a3f6b1 (diff)
drm/i915/bxt: work around HW coherency issue when accessing GPU seqno
By running igt/store_dword_loop_render on BXT we can hit a coherency problem where the seqno written at GPU command completion time is not seen by the CPU. This results in __i915_wait_request seeing the stale seqno and not completing the request (not considering the lost interrupt/GPU reset mechanism). I also verified that this isn't a case of a lost interrupt, or that the command didn't complete somehow: when the coherency issue occured I read the seqno via an uncached GTT mapping too. While the cached version of the seqno still showed the stale value the one read via the uncached mapping was the correct one. Work around this issue by clflushing the corresponding CPU cacheline following any store of the seqno and preceding any reading of it. When reading it do this only when the caller expects a coherent view. v2: - fix using the proper logical && instead of a bitwise & (Jani, Mika) - limit the workaround to A stepping, on later steppings this HW issue is fixed v3: - use a separate get_seqno/set_seqno vfunc (Chris) Testcase: igt/store_dword_loop_render Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_ringbuffer.h')
-rw-r--r--drivers/gpu/drm/i915/intel_ringbuffer.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h
index 2e85fda94963..95b0b4b55fa6 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.h
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.h
@@ -377,6 +377,13 @@ intel_ring_sync_index(struct intel_engine_cs *ring,
377 return idx; 377 return idx;
378} 378}
379 379
380static inline void
381intel_flush_status_page(struct intel_engine_cs *ring, int reg)
382{
383 drm_clflush_virt_range(&ring->status_page.page_addr[reg],
384 sizeof(uint32_t));
385}
386
380static inline u32 387static inline u32
381intel_read_status_page(struct intel_engine_cs *ring, 388intel_read_status_page(struct intel_engine_cs *ring,
382 int reg) 389 int reg)