All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 23/27] drm/i915/kbl: Add WaClearSlmSpaceAtContextSwitch
Date: Tue,  7 Jun 2016 17:19:15 +0300	[thread overview]
Message-ID: <1465309159-30531-24-git-send-email-mika.kuoppala@intel.com> (raw)
In-Reply-To: <1465309159-30531-1-git-send-email-mika.kuoppala@intel.com>

This workaround for bdw and chv, is also needed for kbl A0.

References: HSD#1911519, BSID#569
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
---
 drivers/gpu/drm/i915/intel_lrc.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 6342b5a1c14e..4fad8303648e 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -1255,6 +1255,22 @@ static int gen9_init_indirectctx_bb(struct intel_engine_cs *engine,
 		return ret;
 	index = ret;
 
+	/* WaClearSlmSpaceAtContextSwitch:kbl */
+	/* Actual scratch location is at 128 bytes offset */
+	if (IS_KBL_REVID(engine->i915, 0, KBL_REVID_A0)) {
+		uint32_t scratch_addr
+			= engine->scratch.gtt_offset + 2*CACHELINE_BYTES;
+
+		wa_ctx_emit(batch, index, GFX_OP_PIPE_CONTROL(6));
+		wa_ctx_emit(batch, index, (PIPE_CONTROL_FLUSH_L3 |
+					   PIPE_CONTROL_GLOBAL_GTT_IVB |
+					   PIPE_CONTROL_CS_STALL |
+					   PIPE_CONTROL_QW_WRITE));
+		wa_ctx_emit(batch, index, scratch_addr);
+		wa_ctx_emit(batch, index, 0);
+		wa_ctx_emit(batch, index, 0);
+		wa_ctx_emit(batch, index, 0);
+	}
 	/* Pad to end of cacheline */
 	while (index % CACHELINE_DWORDS)
 		wa_ctx_emit(batch, index, MI_NOOP);
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2016-06-07 14:22 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-07 14:18 [PATCH 00/27] gen9 workarounds v3 Mika Kuoppala
2016-06-07 14:18 ` [PATCH 01/27] drm/i915/skl: Add WaDisableGafsUnitClkGating Mika Kuoppala
2016-06-07 14:18 ` [PATCH 02/27] drm/i915/kbl: Init gen9 workarounds Mika Kuoppala
2016-06-07 14:18 ` [PATCH 03/27] drm/i915/kbl: Add REVID macro Mika Kuoppala
2016-06-07 14:18 ` [PATCH 04/27] drm/i915/kbl: Add WaSkipStolenMemoryFirstPage for A0 Mika Kuoppala
2016-06-07 14:18 ` [PATCH 05/27] drm/i915/gen9: Always apply WaForceContextSaveRestoreNonCoherent Mika Kuoppala
2016-06-07 14:18 ` [PATCH 06/27] drm/i915: Mimic skl with WaForceEnableNonCoherent Mika Kuoppala
2016-06-07 14:18 ` [PATCH 07/27] drm/i915/kbl: Add WaEnableGapsTsvCreditFix Mika Kuoppala
2016-06-07 14:19 ` [PATCH 08/27] drm/i915/kbl: Add WaDisableFenceDestinationToSLM for A0 Mika Kuoppala
2016-06-07 14:19 ` [PATCH 09/27] drm/i915/kbl: Add WaDisableSDEUnitClockGating Mika Kuoppala
2016-06-07 14:19 ` [PATCH 10/27] drm/i915/edp: Add WaKVMNotificationOnConfigChange:bdw Mika Kuoppala
2016-06-07 14:19 ` [PATCH 11/27] drm/i915/kbl: Add WaDisableLSQCROPERFforOCL Mika Kuoppala
2016-06-07 14:19 ` [PATCH 12/27] drm/i915/gen9: Enable must set chicken bits in config0 reg Mika Kuoppala
2016-06-07 14:19 ` [PATCH 13/27] drm/i915/kbl: Add WaDisableGamClockGating Mika Kuoppala
2016-06-07 14:19 ` [PATCH 14/27] drm/i915/kbl: Add WaDisableDynamicCreditSharing Mika Kuoppala
2016-06-07 14:19 ` [PATCH 15/27] drm/i915: Add WaInsertDummyPushConstP for bxt and kbl Mika Kuoppala
2016-06-07 14:19 ` [PATCH 16/27] drm/i915/gen9: Add WaDisableSkipCaching Mika Kuoppala
2016-06-07 14:19 ` [PATCH 17/27] drm/i915/skl: Add WAC6entrylatency Mika Kuoppala
2016-06-07 14:19 ` [PATCH 18/27] drm/i915/kbl: Add WaForGAMHang Mika Kuoppala
2016-06-07 14:19 ` [PATCH 19/27] drm/i915/kbl: Add WaDisableGafsUnitClkGating Mika Kuoppala
2016-06-07 14:19 ` [PATCH 20/27] drm/i915/kbl: Add WaDisableSbeCacheDispatchPortSharing Mika Kuoppala
2016-06-07 14:19 ` [PATCH 21/27] drm/i915/gen9: Add WaEnableChickenDCPR Mika Kuoppala
2016-06-07 14:19 ` [PATCH 22/27] drm/i915/skl: Extend WaDisableChickenBitTSGBarrierAckForFFSliceCS Mika Kuoppala
2016-06-07 14:19 ` Mika Kuoppala [this message]
2016-06-07 14:19 ` [PATCH 24/27] drm/i915/gen9: Add WaFbcTurnOffFbcWatermark Mika Kuoppala
2016-06-07 14:19 ` [PATCH 25/27] drm/i915/gen9: Add WaFbcWakeMemOn Mika Kuoppala
2016-06-07 14:19 ` [PATCH 26/27] drm/i195/fbc: Add WaFbcNukeOnHostModify Mika Kuoppala
2016-06-07 14:19 ` [PATCH 27/27] drm/i915/gen9: Add WaFbcHighMemBwCorruptionAvoidance Mika Kuoppala
2016-06-07 16:04   ` Ville Syrjälä
2016-06-08 14:29     ` Mika Kuoppala
2016-06-07 14:52 ` ✓ Ro.CI.BAT: success for gen9 workarounds v3 Patchwork
2016-06-08  0:06   ` Chris Wilson
2016-06-08 14:28     ` Mika Kuoppala
2016-06-08 14:56       ` Chris Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1465309159-30531-24-git-send-email-mika.kuoppala@intel.com \
    --to=mika.kuoppala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.