|
@@ -1794,10 +1794,8 @@ static void gen8_emit_breadcrumb(struct drm_i915_gem_request *request, u32 *cs)
|
|
|
/* w/a: bit 5 needs to be zero for MI_FLUSH_DW address. */
|
|
|
BUILD_BUG_ON(I915_GEM_HWS_INDEX_ADDR & (1 << 5));
|
|
|
|
|
|
- *cs++ = (MI_FLUSH_DW + 1) | MI_FLUSH_DW_OP_STOREDW;
|
|
|
- *cs++ = intel_hws_seqno_address(request->engine) | MI_FLUSH_DW_USE_GTT;
|
|
|
- *cs++ = 0;
|
|
|
- *cs++ = request->global_seqno;
|
|
|
+ cs = gen8_emit_ggtt_write(cs, request->global_seqno,
|
|
|
+ intel_hws_seqno_address(request->engine));
|
|
|
*cs++ = MI_USER_INTERRUPT;
|
|
|
*cs++ = MI_NOOP;
|
|
|
request->tail = intel_ring_offset(request, cs);
|
|
@@ -1807,24 +1805,14 @@ static void gen8_emit_breadcrumb(struct drm_i915_gem_request *request, u32 *cs)
|
|
|
}
|
|
|
static const int gen8_emit_breadcrumb_sz = 6 + WA_TAIL_DWORDS;
|
|
|
|
|
|
-static void gen8_emit_breadcrumb_render(struct drm_i915_gem_request *request,
|
|
|
+static void gen8_emit_breadcrumb_rcs(struct drm_i915_gem_request *request,
|
|
|
u32 *cs)
|
|
|
{
|
|
|
/* We're using qword write, seqno should be aligned to 8 bytes. */
|
|
|
BUILD_BUG_ON(I915_GEM_HWS_INDEX & 1);
|
|
|
|
|
|
- /* w/a for post sync ops following a GPGPU operation we
|
|
|
- * need a prior CS_STALL, which is emitted by the flush
|
|
|
- * following the batch.
|
|
|
- */
|
|
|
- *cs++ = GFX_OP_PIPE_CONTROL(6);
|
|
|
- *cs++ = PIPE_CONTROL_GLOBAL_GTT_IVB | PIPE_CONTROL_CS_STALL |
|
|
|
- PIPE_CONTROL_QW_WRITE;
|
|
|
- *cs++ = intel_hws_seqno_address(request->engine);
|
|
|
- *cs++ = 0;
|
|
|
- *cs++ = request->global_seqno;
|
|
|
- /* We're thrashing one dword of HWS. */
|
|
|
- *cs++ = 0;
|
|
|
+ cs = gen8_emit_ggtt_write_rcs(cs, request->global_seqno,
|
|
|
+ intel_hws_seqno_address(request->engine));
|
|
|
*cs++ = MI_USER_INTERRUPT;
|
|
|
*cs++ = MI_NOOP;
|
|
|
request->tail = intel_ring_offset(request, cs);
|
|
@@ -1832,7 +1820,7 @@ static void gen8_emit_breadcrumb_render(struct drm_i915_gem_request *request,
|
|
|
|
|
|
gen8_emit_wa_tail(request, cs);
|
|
|
}
|
|
|
-static const int gen8_emit_breadcrumb_render_sz = 8 + WA_TAIL_DWORDS;
|
|
|
+static const int gen8_emit_breadcrumb_rcs_sz = 8 + WA_TAIL_DWORDS;
|
|
|
|
|
|
static int gen8_init_rcs_context(struct drm_i915_gem_request *req)
|
|
|
{
|
|
@@ -1991,8 +1979,8 @@ int logical_render_ring_init(struct intel_engine_cs *engine)
|
|
|
engine->init_hw = gen8_init_render_ring;
|
|
|
engine->init_context = gen8_init_rcs_context;
|
|
|
engine->emit_flush = gen8_emit_flush_render;
|
|
|
- engine->emit_breadcrumb = gen8_emit_breadcrumb_render;
|
|
|
- engine->emit_breadcrumb_sz = gen8_emit_breadcrumb_render_sz;
|
|
|
+ engine->emit_breadcrumb = gen8_emit_breadcrumb_rcs;
|
|
|
+ engine->emit_breadcrumb_sz = gen8_emit_breadcrumb_rcs_sz;
|
|
|
|
|
|
ret = intel_engine_create_scratch(engine, PAGE_SIZE);
|
|
|
if (ret)
|