diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2014-01-27 17:20:16 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-08-07 08:04:07 -0400 |
commit | 02c9f7e3cfe76a7f54ef03438c36aade86cc1c8b (patch) | |
tree | f06021f73f72939b07e978c843e77a8167b5fbb4 /drivers/gpu/drm/i915/intel_ringbuffer.c | |
parent | 884ceacee308f0e4616d0c933518af2639f7b1d8 (diff) |
drm/i915: Add the WaCsStallBeforeStateCacheInvalidate:bdw workaround.
On Broadwell, any PIPE_CONTROL with the "State Cache Invalidate" bit set
must be preceded by a PIPE_CONTROL with the "CS Stall" bit set.
Documented on the BSpec 3D workarounds page.
Reviewed-by: Rafael Barbalho <rafael.barbalho@intel.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
[vsyrjala: add chv w/a note too]
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_ringbuffer.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_ringbuffer.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index 2908896334f5..05969f03c0c1 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c | |||
@@ -406,6 +406,7 @@ gen8_render_ring_flush(struct intel_engine_cs *ring, | |||
406 | { | 406 | { |
407 | u32 flags = 0; | 407 | u32 flags = 0; |
408 | u32 scratch_addr = ring->scratch.gtt_offset + 2 * CACHELINE_BYTES; | 408 | u32 scratch_addr = ring->scratch.gtt_offset + 2 * CACHELINE_BYTES; |
409 | int ret; | ||
409 | 410 | ||
410 | flags |= PIPE_CONTROL_CS_STALL; | 411 | flags |= PIPE_CONTROL_CS_STALL; |
411 | 412 | ||
@@ -422,6 +423,14 @@ gen8_render_ring_flush(struct intel_engine_cs *ring, | |||
422 | flags |= PIPE_CONTROL_STATE_CACHE_INVALIDATE; | 423 | flags |= PIPE_CONTROL_STATE_CACHE_INVALIDATE; |
423 | flags |= PIPE_CONTROL_QW_WRITE; | 424 | flags |= PIPE_CONTROL_QW_WRITE; |
424 | flags |= PIPE_CONTROL_GLOBAL_GTT_IVB; | 425 | flags |= PIPE_CONTROL_GLOBAL_GTT_IVB; |
426 | |||
427 | /* WaCsStallBeforeStateCacheInvalidate:bdw,chv */ | ||
428 | ret = gen8_emit_pipe_control(ring, | ||
429 | PIPE_CONTROL_CS_STALL | | ||
430 | PIPE_CONTROL_STALL_AT_SCOREBOARD, | ||
431 | 0); | ||
432 | if (ret) | ||
433 | return ret; | ||
425 | } | 434 | } |
426 | 435 | ||
427 | return gen8_emit_pipe_control(ring, flags, scratch_addr); | 436 | return gen8_emit_pipe_control(ring, flags, scratch_addr); |