Skip to contentSkip to conversation

Enable compute and related WAs for DG2

PATCH In review Umesh Nerlige Ramappa 5 participants 21 messages Apr 13, 2022 – Apr 15, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover Enable compute and related WAs for DG2

Enable compute, work arounds and relevant GuC FW for DG2.

Daniele Ceraolo Spurio (1):
drm/i915: Xe_HP SDV and DG2 have 4 CCS engines

John Harrison (5):
drm/i915/guc: Update context registration to new GuC API drm/i915/guc: Update scheduling policies to new GuC API drm/i915/guc: Update to GuC version 70.1.1 drm/i915/guc: Enable GuC based workarounds for DG2 drm/i915/dg2: Enable Wa_22012727170/Wa_22012727685

Matt Roper (1):
drm/i915/xehp: Add compute engine ABI

Matthew Brost (1):
drm/i915/dg2: Enable Wa_14014475959 - RCS / CCS context exit

Tilak Tangudu (1):
drm/i915: Add Wa_22011802037 force cs halt

Vinay Belgaumkar (1):
drm/i915/guc: Apply Wa_16011777198

 drivers/gpu/drm/i915/gt/gen8_engine_cs.c      |  41 ++
 drivers/gpu/drm/i915/gt/intel_engine_cs.c     |   9 +
 drivers/gpu/drm/i915/gt/intel_engine_regs.h   |   1 +
 drivers/gpu/drm/i915/gt/intel_engine_types.h  |   8 +
 drivers/gpu/drm/i915/gt/intel_engine_user.c   |   2 +-
 drivers/gpu/drm/i915/gt/intel_gpu_commands.h  |   7 +
 drivers/gpu/drm/i915/gt/intel_gt.c            |   1 +
 drivers/gpu/drm/i915/gt/intel_gt_pm.c         |   9 +-
 drivers/gpu/drm/i915/gt/intel_gt_regs.h       |  18 +
 drivers/gpu/drm/i915/gt/intel_reset.c         |   5 +-
 .../gpu/drm/i915/gt/uc/abi/guc_actions_abi.h  |   4 +-
 drivers/gpu/drm/i915/gt/uc/abi/guc_klvs_abi.h |  15 +
 drivers/gpu/drm/i915/gt/uc/intel_guc.c        |  35 ++
 drivers/gpu/drm/i915/gt/uc/intel_guc.h        |   5 -
 drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h   |  75 ++-
 .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 464 ++++++++++++------
 drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c      |  32 +-
 drivers/gpu/drm/i915/i915_drm_client.c        |   1 +
 drivers/gpu/drm/i915/i915_drm_client.h        |   2 +-
 drivers/gpu/drm/i915/i915_pci.c               |   6 +-
 include/uapi/drm/i915_drm.h                   |  62 ++-
 21 files changed, 580 insertions(+), 222 deletions(-)
Signature · 1 line
2.35.1
#1 lore raw

PATCH 1/10 drm/i915/guc: Update context registration to new GuC API

From: John Harrison <[email protected]>

The latest GuC firmware drops the context descriptor pool in favour of passing all creation data in the create H2G. It also greatly simplifies the work queue and removes the process descriptor used for multi-LRC submission. So, remove all mention of LRC and process descriptors and update the registration code accordingly.

Unfortunately, the new API also removes the ability to set default values for the scheduling policies at context registration time. Instead, a follow up H2G must be sent. This will be addressed in the next patch.

---
 drivers/gpu/drm/i915/gt/uc/intel_guc.h        |   5 -
 drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h   |  52 ++---
 .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 221 ++++++++----------
 3 files changed, 116 insertions(+), 162 deletions(-)
drivers/gpu/drm/i915/gt/uc/intel_guc.h +0 -5
index 4e431c14b118..3f3373f68123 100644
@@ -170,11 +170,6 @@ struct intel_guc {
 	/** @ads_engine_usage_size: size of engine usage in the ADS */
 	u32 ads_engine_usage_size;
 
-	/** @lrc_desc_pool: object allocated to hold the GuC LRC descriptor pool */
-	struct i915_vma *lrc_desc_pool;
-	/** @lrc_desc_pool_vaddr: contents of the GuC LRC descriptor pool */
-	void *lrc_desc_pool_vaddr;
-
 	/**
 	 * @context_lookup: used to resolve intel_context from guc_id, if a
 	 * context is present in this structure it is registered with the GuC
drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h +16 -36

70 lines not on this page · raw message

drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +100 -121

411 lines not on this page · raw message

Signature · 1 line
2.35.1
#2 lore raw

PATCH 2/10 drm/i915/guc: Update scheduling policies to new GuC API

In reply to Umesh Nerlige Ramappa

From: John Harrison <[email protected]>

The latest GuC firmware drops the individual scheduling policy update H2G commands in favour of a single KLV based H2G. So, change the update wrappers accordingly.

Unfortunately, the API changes also mean losing the ability to set any scheduling policy values during context registration. Instead the same KLV based H2G must be sent after the registration. Of course, that second H2G per registration might fail due to being backed up. The registration code has a complicated state machine to cope with the actual registration call failing. However, if that works then there is no support for unwinding if a further call should fail. Unwinding would require sending a H2G to de-register - but that can't be done because the CTB is already backed up.

So instead, add a new flag to say whether the context has a pending policy update. This is set if the policy H2G fails at registration time. The submission code checks for this flag and retries the policy update if set. If that call fails, the submission path early exists with a retry error. This is something that is already supported for other reasons.

---
 .../gpu/drm/i915/gt/uc/abi/guc_actions_abi.h  |   4 +-
 drivers/gpu/drm/i915/gt/uc/abi/guc_klvs_abi.h |  15 ++
 drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h   |  19 +-
 .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 176 ++++++++++++++----
 4 files changed, 175 insertions(+), 39 deletions(-)
drivers/gpu/drm/i915/gt/uc/abi/guc_actions_abi.h +1 -3
index 9ad6df1b6fbc..be9ac47fa9d0 100644
@@ -122,11 +122,9 @@ enum intel_guc_action {
 	INTEL_GUC_ACTION_SCHED_CONTEXT_MODE_DONE = 0x1002,
 	INTEL_GUC_ACTION_SCHED_ENGINE_MODE_SET = 0x1003,
 	INTEL_GUC_ACTION_SCHED_ENGINE_MODE_DONE = 0x1004,
-	INTEL_GUC_ACTION_SET_CONTEXT_PRIORITY = 0x1005,
-	INTEL_GUC_ACTION_SET_CONTEXT_EXECUTION_QUANTUM = 0x1006,
-	INTEL_GUC_ACTION_SET_CONTEXT_PREEMPTION_TIMEOUT = 0x1007,
 	INTEL_GUC_ACTION_CONTEXT_RESET_NOTIFICATION = 0x1008,
 	INTEL_GUC_ACTION_ENGINE_FAILURE_NOTIFICATION = 0x1009,
+	INTEL_GUC_ACTION_HOST2GUC_UPDATE_CONTEXT_POLICIES = 0x100B,
 	INTEL_GUC_ACTION_SETUP_PC_GUCRC = 0x3004,
 	INTEL_GUC_ACTION_AUTHENTICATE_HUC = 0x4000,
 	INTEL_GUC_ACTION_GET_HWCONFIG = 0x4100,
drivers/gpu/drm/i915/gt/uc/abi/guc_klvs_abi.h +15 -0
index f0814a57c191..4a59478c3b5c 100644
@@ -6,6 +6,8 @@
 #ifndef _ABI_GUC_KLVS_ABI_H
 #define _ABI_GUC_KLVS_ABI_H
 
+#include <linux/types.h>
+
 /**
  * DOC: GuC KLV
  *
@@ -79,4 +81,17 @@
 #define GUC_KLV_SELF_CFG_G2H_CTB_SIZE_KEY		0x0907
 #define GUC_KLV_SELF_CFG_G2H_CTB_SIZE_LEN		1u
 
+/*
+ * Per context scheduling policy update keys.
+ */
+enum  {
+	GUC_CONTEXT_POLICIES_KLV_ID_EXECUTION_QUANTUM			= 0x2001,
+	GUC_CONTEXT_POLICIES_KLV_ID_PREEMPTION_TIMEOUT			= 0x2002,
+	GUC_CONTEXT_POLICIES_KLV_ID_SCHEDULING_PRIORITY			= 0x2003,
+	GUC_CONTEXT_POLICIES_KLV_ID_PREEMPT_TO_IDLE_ON_QUANTUM_EXPIRY	= 0x2004,
+	GUC_CONTEXT_POLICIES_KLV_ID_SLPM_GT_FREQUENCY			= 0x2005,
+
+	GUC_CONTEXT_POLICIES_KLV_NUM_IDS = 5,
+};
+
 #endif /* _ABI_GUC_KLVS_ABI_H */
drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h +15 -4
index 0e1e8d0079b5..c154b5efccde 100644
@@ -221,11 +221,22 @@ struct guc_ctxt_registration_info {
 };
 #define CONTEXT_REGISTRATION_FLAG_KMD	BIT(0)
 
-#define CONTEXT_POLICY_DEFAULT_EXECUTION_QUANTUM_US 1000000
-#define CONTEXT_POLICY_DEFAULT_PREEMPTION_TIME_US 500000
+/* 32-bit KLV structure as used by policy updates and others */
+struct guc_klv_generic_dw_t {
+	u32 kl;
+	u32 value;
+} __packed;
 
-/* Preempt to idle on quantum expiry */
-#define CONTEXT_POLICY_FLAG_PREEMPT_TO_IDLE	BIT(0)
+/* Format of the UPDATE_CONTEXT_POLICIES H2G data packet */
+struct guc_update_context_policy_header {
+	u32 action;
+	u32 ctx_id;
+} __packed;
+
+struct guc_update_context_policy {
+	struct guc_update_context_policy_header header;
+	struct guc_klv_generic_dw_t klv[GUC_CONTEXT_POLICIES_KLV_NUM_IDS];
+} __packed;
 
 #define GUC_POWER_UNSPECIFIED	0
 #define GUC_POWER_D0		1
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +144 -32

253 lines not on this page · raw message

Signature · 1 line
2.35.1
#3 lore raw

PATCH 3/10 drm/i915/guc: Update to GuC version 70.1.1

In reply to Umesh Nerlige Ramappa

From: John Harrison <[email protected]>

Update to the latest GuC firmware release.

---
 drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 32 ++++++++++++------------
 1 file changed, 16 insertions(+), 16 deletions(-)
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +16 -16
index bb864655c495..cb5dd16421d0 100644
@@ -53,22 +53,22 @@ void intel_uc_fw_change_status(struct intel_uc_fw *uc_fw,
  * firmware as TGL.
  */
 #define INTEL_GUC_FIRMWARE_DEFS(fw_def, guc_def) \
-	fw_def(DG2,          0, guc_def(dg2,  69, 0, 3)) \
-	fw_def(ALDERLAKE_P,  0, guc_def(adlp, 69, 0, 3)) \
-	fw_def(ALDERLAKE_S,  0, guc_def(tgl,  69, 0, 3)) \
-	fw_def(DG1,          0, guc_def(dg1,  69, 0, 3)) \
-	fw_def(ROCKETLAKE,   0, guc_def(tgl,  69, 0, 3)) \
-	fw_def(TIGERLAKE,    0, guc_def(tgl,  69, 0, 3)) \
-	fw_def(JASPERLAKE,   0, guc_def(ehl,  69, 0, 3)) \
-	fw_def(ELKHARTLAKE,  0, guc_def(ehl,  69, 0, 3)) \
-	fw_def(ICELAKE,      0, guc_def(icl,  69, 0, 3)) \
-	fw_def(COMETLAKE,    5, guc_def(cml,  69, 0, 3)) \
-	fw_def(COMETLAKE,    0, guc_def(kbl,  69, 0, 3)) \
-	fw_def(COFFEELAKE,   0, guc_def(kbl,  69, 0, 3)) \
-	fw_def(GEMINILAKE,   0, guc_def(glk,  69, 0, 3)) \
-	fw_def(KABYLAKE,     0, guc_def(kbl,  69, 0, 3)) \
-	fw_def(BROXTON,      0, guc_def(bxt,  69, 0, 3)) \
-	fw_def(SKYLAKE,      0, guc_def(skl,  69, 0, 3))
+	fw_def(DG2,          0, guc_def(dg2,  70, 1, 1)) \
+	fw_def(ALDERLAKE_P,  0, guc_def(adlp, 70, 1, 1)) \
+	fw_def(ALDERLAKE_S,  0, guc_def(tgl,  70, 1, 1)) \
+	fw_def(DG1,          0, guc_def(dg1,  70, 1, 1)) \
+	fw_def(ROCKETLAKE,   0, guc_def(tgl,  70, 1, 1)) \
+	fw_def(TIGERLAKE,    0, guc_def(tgl,  70, 1, 1)) \
+	fw_def(JASPERLAKE,   0, guc_def(ehl,  70, 1, 1)) \
+	fw_def(ELKHARTLAKE,  0, guc_def(ehl,  70, 1, 1)) \
+	fw_def(ICELAKE,      0, guc_def(icl,  70, 1, 1)) \
+	fw_def(COMETLAKE,    5, guc_def(cml,  70, 1, 1)) \
+	fw_def(COMETLAKE,    0, guc_def(kbl,  70, 1, 1)) \
+	fw_def(COFFEELAKE,   0, guc_def(kbl,  70, 1, 1)) \
+	fw_def(GEMINILAKE,   0, guc_def(glk,  70, 1, 1)) \
+	fw_def(KABYLAKE,     0, guc_def(kbl,  70, 1, 1)) \
+	fw_def(BROXTON,      0, guc_def(bxt,  70, 1, 1)) \
+	fw_def(SKYLAKE,      0, guc_def(skl,  70, 1, 1))
 
 #define INTEL_HUC_FIRMWARE_DEFS(fw_def, huc_def) \
 	fw_def(ALDERLAKE_P,  0, huc_def(tgl,  7, 9, 3)) \
Signature · 1 line
2.35.1
#4 lore raw

PATCH 4/10 drm/i915/xehp: Add compute engine ABI

In reply to Umesh Nerlige Ramappa

From: Matt Roper <[email protected]>

We're now ready to start exposing compute engines to userspace.

While we're at it, let's extend the kerneldoc description for the other engine types as well.

Cc: Daniele Ceraolo Spurio <[email protected]>
Cc: Tvrtko Ursulin <[email protected]>
Cc: Vinay Belgaumkar <[email protected]>
Cc: Jordan Justen <[email protected]>
Cc: Szymon Morek <[email protected]>
UMD (mesa): https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14395
UMD (compute): https://github.com/intel/compute-runtime/pull/451

---
 drivers/gpu/drm/i915/gt/intel_engine_user.c |  2 +-
 drivers/gpu/drm/i915/gt/intel_gt.c          |  1 +
 drivers/gpu/drm/i915/i915_drm_client.c      |  1 +
 drivers/gpu/drm/i915/i915_drm_client.h      |  2 +-
 include/uapi/drm/i915_drm.h                 | 62 +++++++++++++++++++--
 5 files changed, 60 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/gt/intel_engine_user.c +1 -1
index 0f6cd96b459f..46a174f8aa00 100644
@@ -47,7 +47,7 @@ static const u8 uabi_classes[] = {
 	[COPY_ENGINE_CLASS] = I915_ENGINE_CLASS_COPY,
 	[VIDEO_DECODE_CLASS] = I915_ENGINE_CLASS_VIDEO,
 	[VIDEO_ENHANCEMENT_CLASS] = I915_ENGINE_CLASS_VIDEO_ENHANCE,
-	/* TODO: Add COMPUTE_CLASS mapping once ABI is available */
+	[COMPUTE_CLASS] = I915_ENGINE_CLASS_COMPUTE,
 };
 
 static int engine_cmp(void *priv, const struct list_head *A,
drivers/gpu/drm/i915/gt/intel_gt.c +1 -0
index f0014c5072c9..65a579c200ef 100644
@@ -1172,6 +1172,7 @@ void intel_gt_invalidate_tlbs(struct intel_gt *gt)
 		[VIDEO_DECODE_CLASS]		= GEN12_VD_TLB_INV_CR,
 		[VIDEO_ENHANCEMENT_CLASS]	= GEN12_VE_TLB_INV_CR,
 		[COPY_ENGINE_CLASS]		= GEN12_BLT_TLB_INV_CR,
+		[COMPUTE_CLASS]			= GEN12_GFX_TLB_INV_CR,
 	};
 	struct drm_i915_private *i915 = gt->i915;
 	struct intel_uncore *uncore = gt->uncore;
drivers/gpu/drm/i915/i915_drm_client.c +1 -0
index e539f6b23060..118db6f03f15 100644
@@ -81,6 +81,7 @@ static const char * const uabi_class_names[] = {
 	[I915_ENGINE_CLASS_COPY] = "copy",
 	[I915_ENGINE_CLASS_VIDEO] = "video",
 	[I915_ENGINE_CLASS_VIDEO_ENHANCE] = "video-enhance",
+	[I915_ENGINE_CLASS_COMPUTE] = "compute",
 };
 
 static u64 busy_add(struct i915_gem_context *ctx, unsigned int class)
drivers/gpu/drm/i915/i915_drm_client.h +1 -1
index 5f5b02b01ba0..f796c5e8e060 100644
@@ -13,7 +13,7 @@
 
 #include "gt/intel_engine_types.h"
 
-#define I915_LAST_UABI_ENGINE_CLASS I915_ENGINE_CLASS_VIDEO_ENHANCE
+#define I915_LAST_UABI_ENGINE_CLASS I915_ENGINE_CLASS_COMPUTE
 
 struct drm_i915_private;
 
include/uapi/drm/i915_drm.h +56 -6

77 lines not on this page · raw message

Signature · 1 line
2.35.1
#5 lore raw

PATCH 5/10 drm/i915: Xe_HP SDV and DG2 have 4 CCS engines

In reply to Umesh Nerlige Ramappa

From: Daniele Ceraolo Spurio <[email protected]>

---
 drivers/gpu/drm/i915/i915_pci.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_pci.c +4 -2
index 736e04078f56..fe13e14c19a7 100644
@@ -1036,7 +1036,8 @@ static const struct intel_device_info xehpsdv_info = {
 		BIT(RCS0) | BIT(BCS0) |
 		BIT(VECS0) | BIT(VECS1) | BIT(VECS2) | BIT(VECS3) |
 		BIT(VCS0) | BIT(VCS1) | BIT(VCS2) | BIT(VCS3) |
-		BIT(VCS4) | BIT(VCS5) | BIT(VCS6) | BIT(VCS7),
+		BIT(VCS4) | BIT(VCS5) | BIT(VCS6) | BIT(VCS7) |
+		BIT(CCS0) | BIT(CCS1) | BIT(CCS2) | BIT(CCS3),
 	.require_force_probe = 1,
 };
 
@@ -1054,7 +1055,8 @@ static const struct intel_device_info xehpsdv_info = {
 	.platform_engine_mask = \
 		BIT(RCS0) | BIT(BCS0) | \
 		BIT(VECS0) | BIT(VECS1) | \
-		BIT(VCS0) | BIT(VCS2)
+		BIT(VCS0) | BIT(VCS2) | \
+		BIT(CCS0) | BIT(CCS1) | BIT(CCS2) | BIT(CCS3)
 
 static const struct intel_device_info dg2_info = {
 	DG2_FEATURES,
Signature · 1 line
2.35.1
#6 lore raw

PATCH 6/10 drm/i915: Add Wa_22011802037 force cs halt

In reply to Umesh Nerlige Ramappa

From: Tilak Tangudu <[email protected]>

Prior to doing a reset, SW must ensure command streamer is stopped, as a workaround, to eliminate a race condition in GPM flow. Setting both the ring stop and prefetch disable bits, will cause the command streamer to halt.

v2: 1. Removed duplicate code and added only prefetch disable -Chris Wilson

v3: 1. Applied wa for all gen12+ -Lahtinen Joonas/Vivi Rodrigo

v4: 1. Added description in comment
2. Added WA prior to read barrier-Chris Wilson

v5: 1. Modified to disable prefetch and wait for idle ack -Chris Wilson

---
 drivers/gpu/drm/i915/gt/intel_engine_cs.c   | 9 +++++++++
 drivers/gpu/drm/i915/gt/intel_engine_regs.h | 1 +
 2 files changed, 10 insertions(+)
drivers/gpu/drm/i915/gt/intel_engine_cs.c +9 -0
index 98b61ff13c95..14c6ddbbfde8 100644
@@ -1280,6 +1280,15 @@ static int __intel_engine_stop_cs(struct intel_engine_cs *engine,
 	int err;
 
 	intel_uncore_write_fw(uncore, mode, _MASKED_BIT_ENABLE(STOP_RING));
+
+	/*
+	 * Wa_22011802037 : gen12, Prior to doing a reset, ensure CS is
+	 * stopped, set ring stop bit and prefetch disable bit to halt CS
+	 */
+	if (GRAPHICS_VER(engine->i915) == 12)
+		intel_uncore_write_fw(uncore, RING_MODE_GEN7(engine->mmio_base),
+				      _MASKED_BIT_ENABLE(GEN12_GFX_PREFETCH_DISABLE));
+
 	err = __intel_wait_for_register_fw(engine->uncore, mode,
 					   MODE_IDLE, MODE_IDLE,
 					   fast_timeout_us,
drivers/gpu/drm/i915/gt/intel_engine_regs.h +1 -0
index 0bf8b45c9319..594a629cb28f 100644
@@ -181,6 +181,7 @@
 #define   GFX_SURFACE_FAULT_ENABLE		(1 << 12)
 #define   GFX_REPLAY_MODE			(1 << 11)
 #define   GFX_PSMI_GRANULARITY			(1 << 10)
+#define   GEN12_GFX_PREFETCH_DISABLE		REG_BIT(10)
 #define   GFX_PPGTT_ENABLE			(1 << 9)
 #define   GEN8_GFX_PPGTT_48B			(1 << 7)
 #define   GFX_FORWARD_VBLANK_MASK		(3 << 5)
Signature · 1 line
2.35.1
Reviewed-by on v1 6/10
#7 lore raw

Re: [Intel-gfx] [PATCH 06/10] drm/i915: Add Wa_22011802037 force cs halt

Quoted 7 lines · Umesh Nerlige Ramappa

From: Tilak Tangudu <[email protected]>

Prior to doing a reset, SW must ensure command streamer is stopped, as a workaround, to eliminate a race condition in GPM flow. Setting both the ring stop and prefetch disable bits, will cause the command streamer to halt.

Quoted 8 lines

v2: 1. Removed duplicate code and added only prefetch disable -Chris Wilson

v3: 1. Applied wa for all gen12+ -Lahtinen Joonas/Vivi Rodrigo

v4: 1. Added description in comment
2. Added WA prior to read barrier-Chris Wilson

v5: 1. Modified to disable prefetch and wait for idle ack -Chris Wilson

Is this comment accurate? I'm not seeing a 'wait for idle ack' in the deltas. There is a wait for idle function but it is already present and not part of this patch change.

Quoted 32 lines
---
  drivers/gpu/drm/i915/gt/intel_engine_cs.c   | 9 +++++++++
  drivers/gpu/drm/i915/gt/intel_engine_regs.h | 1 +
  2 files changed, 10 insertions(+)
drivers/gpu/drm/i915/gt/intel_engine_cs.c +9 -0
index 98b61ff13c95..14c6ddbbfde8 100644
@@ -1280,6 +1280,15 @@ static int __intel_engine_stop_cs(struct intel_engine_cs *engine,
  	int err;
 
  	intel_uncore_write_fw(uncore, mode, _MASKED_BIT_ENABLE(STOP_RING));
+
+	/*
+	 * Wa_22011802037 : gen12, Prior to doing a reset, ensure CS is
+	 * stopped, set ring stop bit and prefetch disable bit to halt CS
+	 */
+	if (GRAPHICS_VER(engine->i915) == 12)
+		intel_uncore_write_fw(uncore, RING_MODE_GEN7(engine->mmio_base),
+				      _MASKED_BIT_ENABLE(GEN12_GFX_PREFETCH_DISABLE));
+
  	err = __intel_wait_for_register_fw(engine->uncore, mode,
  					   MODE_IDLE, MODE_IDLE,
  					   fast_timeout_us,
drivers/gpu/drm/i915/gt/intel_engine_regs.h +0 -0
index 0bf8b45c9319..594a629cb28f 100644

drivers/gpu/drm/i915/gt/intel_engine_regs.h line 184

Quoted 4 lines
drivers/gpu/drm/i915/gt/intel_engine_regs.h +1 -0
@@ -181,6 +181,7 @@
  #define   GFX_SURFACE_FAULT_ENABLE		(1 << 12)
  #define   GFX_REPLAY_MODE			(1 << 11)
  #define   GFX_PSMI_GRANULARITY			(1 << 10)
+#define   GEN12_GFX_PREFETCH_DISABLE		REG_BIT(10)

So the PSMI_GRANULARITY bit is not valid for Gen12 onwards? I'm not actually seeing it being used anywhere. So I guess it doesn't matte anyway!

Quoted 3 lines
drivers/gpu/drm/i915/gt/intel_engine_regs.h +0 -0
  #define   GFX_PPGTT_ENABLE			(1 << 9)
  #define   GEN8_GFX_PPGTT_48B			(1 << 7)
  #define   GFX_FORWARD_VBLANK_MASK		(3 << 5)
#8 lore raw

PATCH 7/10 drm/i915/guc: Enable GuC based workarounds for DG2

In reply to Umesh Nerlige Ramappa

From: John Harrison <[email protected]>

There are some workarounds for DG2 that are implemented in the GuC firmware. However, the KMD is required to enable these by setting the appropriate flag as GuC does not know what platform it is running on.
Wa_16011759253
Wa_14012630569
Wa_14013746162

v2: Add a couple more workarounds and drop the FIXME prefix as the HSDs seem to be updated now. (JohnH)
v3: Add remaining parts of Wa_22011802037 (Umesh)
v4: (Daniele)
- Fix R-b versioning
- Add engine->reset.prepare hook for Wa_22011802037
- Apply Wa_22011802037 to graphics version 11 and onwards
- Fix comments on stepping validity for WAs
v5: (Daniele)
- Enable the Wa_22011802037 for 12+ platforms only for now
- Use GEM_WARN_ON to warn if ring is not idle
v6: (CI)
- Since reset_prepare(gt) is being called from VF, move the WA to GuC's engine reset_prepare vfunc and ensure that the vfunc is nop for VF.
v7: (Daniele, Rodrigo)
- Stop submission before stopping ring
- ORing not needed for pending forcewake
- Fix Wa_22011802037 to apply to gen12 only
v8:
- Make sure CS is resumed after reset
- Fix uninitialized MSG_IDLE access
v9: (Daniele)
- Drop cs resume as not needed in GT reset path
- Use same loop for reset.prepare and status_page.sanitize
v10: Add TODO for timeout on intel_engine_stop_cs (Umesh)

---
 drivers/gpu/drm/i915/gt/intel_gt_pm.c         |  9 +-
 drivers/gpu/drm/i915/gt/intel_gt_regs.h       | 18 ++++
 drivers/gpu/drm/i915/gt/intel_reset.c         |  5 +-
 drivers/gpu/drm/i915/gt/uc/intel_guc.c        | 18 ++++
 drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h   |  5 +-
 .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 85 ++++++++++++++++++-
 6 files changed, 132 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/gt/intel_gt_pm.c +5 -4
index eeead40485fb..f553e2173bda 100644
@@ -182,15 +182,16 @@ static void gt_sanitize(struct intel_gt *gt, bool force)
 	if (intel_gt_is_wedged(gt))
 		intel_gt_unset_wedged(gt);
 
-	for_each_engine(engine, gt, id)
+	/* For GuC mode, ensure submission is disabled before stopping ring */
+	intel_uc_reset_prepare(&gt->uc);
+
+	for_each_engine(engine, gt, id) {
 		if (engine->reset.prepare)
 			engine->reset.prepare(engine);
 
-	intel_uc_reset_prepare(&gt->uc);
-
-	for_each_engine(engine, gt, id)
 		if (engine->sanitize)
 			engine->sanitize(engine);
+	}
 
 	if (reset_engines(gt) || force) {
 		for_each_engine(engine, gt, id)
drivers/gpu/drm/i915/gt/intel_gt_regs.h +18 -0
index 0a5c2648aaf0..12d892851684 100644
@@ -841,6 +841,24 @@
 #define   CTC_SHIFT_PARAMETER_SHIFT		1
 #define   CTC_SHIFT_PARAMETER_MASK		(0x3 << CTC_SHIFT_PARAMETER_SHIFT)
 
+/* GPM MSG_IDLE */
+#define MSG_IDLE_CS		_MMIO(0x8000)
+#define MSG_IDLE_VCS0		_MMIO(0x8004)
+#define MSG_IDLE_VCS1		_MMIO(0x8008)
+#define MSG_IDLE_BCS		_MMIO(0x800C)
+#define MSG_IDLE_VECS0		_MMIO(0x8010)
+#define MSG_IDLE_VCS2		_MMIO(0x80C0)
+#define MSG_IDLE_VCS3		_MMIO(0x80C4)
+#define MSG_IDLE_VCS4		_MMIO(0x80C8)
+#define MSG_IDLE_VCS5		_MMIO(0x80CC)
+#define MSG_IDLE_VCS6		_MMIO(0x80D0)
+#define MSG_IDLE_VCS7		_MMIO(0x80D4)
+#define MSG_IDLE_VECS1		_MMIO(0x80D8)
+#define MSG_IDLE_VECS2		_MMIO(0x80DC)
+#define MSG_IDLE_VECS3		_MMIO(0x80E0)
+#define  MSG_IDLE_FW_MASK	REG_GENMASK(13, 9)
+#define  MSG_IDLE_FW_SHIFT	9
+
 #define FORCEWAKE_MEDIA_GEN9			_MMIO(0xa270)
 #define FORCEWAKE_RENDER_GEN9			_MMIO(0xa278)
 
drivers/gpu/drm/i915/gt/intel_reset.c +3 -2
index f52015e79fdf..5422a3b84bd4 100644
@@ -772,14 +772,15 @@ static intel_engine_mask_t reset_prepare(struct intel_gt *gt)
 	intel_engine_mask_t awake = 0;
 	enum intel_engine_id id;
 
+	/* For GuC mode, ensure submission is disabled before stopping ring */
+	intel_uc_reset_prepare(&gt->uc);
+
 	for_each_engine(engine, gt, id) {
 		if (intel_engine_pm_get_if_awake(engine))
 			awake |= engine->mask;
 		reset_prepare_engine(engine);
 	}
 
-	intel_uc_reset_prepare(&gt->uc);
-
 	return awake;
 }
 
drivers/gpu/drm/i915/gt/uc/intel_guc.c +18 -0
index cda7e4bb8bac..fd04c4cd9d44 100644
@@ -292,6 +292,24 @@ static u32 guc_ctl_wa_flags(struct intel_guc *guc)
 	    GRAPHICS_VER_FULL(gt->i915) < IP_VER(12, 50))
 		flags |= GUC_WA_POLLCS;
 
+	/* Wa_16011759253:dg2_g10:a0 */
+	if (IS_DG2_GRAPHICS_STEP(gt->i915, G10, STEP_A0, STEP_B0))
+		flags |= GUC_WA_GAM_CREDITS;
+
+	/*
+	 * Wa_14012197797:dg2_g10:a0,dg2_g11:a0
+	 * Wa_22011391025:dg2_g10,dg2_g11,dg2_g12
+	 *
+	 * The same WA bit is used for both and 22011391025 is applicable to
+	 * all DG2.
+	 */
+	if (IS_DG2(gt->i915))
+		flags |= GUC_WA_DUAL_QUEUE;
+
+	/* Wa_22011802037: graphics version 12 */
+	if (GRAPHICS_VER(gt->i915) == 12)
+		flags |= GUC_WA_PRE_PARSER;
+
 	return flags;
 }
 
drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h +4 -1
index c154b5efccde..fe5751f67b19 100644
@@ -98,7 +98,10 @@
 #define   GUC_LOG_BUF_ADDR_SHIFT	12
 
 #define GUC_CTL_WA			1
-#define   GUC_WA_POLLCS                 BIT(18)
+#define   GUC_WA_GAM_CREDITS		BIT(10)
+#define   GUC_WA_DUAL_QUEUE		BIT(11)
+#define   GUC_WA_PRE_PARSER		BIT(14)
+#define   GUC_WA_POLLCS			BIT(18)
 
 #define GUC_CTL_FEATURE			2
 #define   GUC_CTL_ENABLE_SLPC		BIT(2)
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +84 -1

97 lines not on this page · raw message

Signature · 1 line
2.35.1
#9 lore raw

Re: [Intel-gfx] [PATCH 07/10] drm/i915/guc: Enable GuC based workarounds for DG2

Quoted 26 lines · Umesh Nerlige Ramappa

From: John Harrison <[email protected]>

There are some workarounds for DG2 that are implemented in the GuC firmware. However, the KMD is required to enable these by setting the appropriate flag as GuC does not know what platform it is running on.
Wa_16011759253
Wa_14012630569
Wa_14013746162

v2: Add a couple more workarounds and drop the FIXME prefix as the HSDs seem to be updated now. (JohnH)
v3: Add remaining parts of Wa_22011802037 (Umesh)
v4: (Daniele)
- Fix R-b versioning
- Add engine->reset.prepare hook for Wa_22011802037
- Apply Wa_22011802037 to graphics version 11 and onwards
- Fix comments on stepping validity for WAs
v5: (Daniele)
- Enable the Wa_22011802037 for 12+ platforms only for now
- Use GEM_WARN_ON to warn if ring is not idle
v6: (CI)
- Since reset_prepare(gt) is being called from VF, move the WA to GuC's engine reset_prepare vfunc and ensure that the vfunc is nop for VF.
v7: (Daniele, Rodrigo)
- Stop submission before stopping ring
- ORing not needed for pending forcewake

Quoted 8 lines

- Fix Wa_22011802037 to apply to gen12 only
v8:
- Make sure CS is resumed after reset
- Fix uninitialized MSG_IDLE access
v9: (Daniele)
- Drop cs resume as not needed in GT reset path
- Use same loop for reset.prepare and status_page.sanitize
v10: Add TODO for timeout on intel_engine_stop_cs (Umesh)

Internal changelog should be scrubbed as some of it doesn't make sense on this ML

Quoted 103 lines
---
  drivers/gpu/drm/i915/gt/intel_gt_pm.c         |  9 +-
  drivers/gpu/drm/i915/gt/intel_gt_regs.h       | 18 ++++
  drivers/gpu/drm/i915/gt/intel_reset.c         |  5 +-
  drivers/gpu/drm/i915/gt/uc/intel_guc.c        | 18 ++++
  drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h   |  5 +-
  .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 85 ++++++++++++++++++-
  6 files changed, 132 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/gt/intel_gt_pm.c +5 -4
index eeead40485fb..f553e2173bda 100644
@@ -182,15 +182,16 @@ static void gt_sanitize(struct intel_gt *gt, bool force)
  	if (intel_gt_is_wedged(gt))
  		intel_gt_unset_wedged(gt);
 
-	for_each_engine(engine, gt, id)
+	/* For GuC mode, ensure submission is disabled before stopping ring */
+	intel_uc_reset_prepare(&gt->uc);
+
+	for_each_engine(engine, gt, id) {
  		if (engine->reset.prepare)
  			engine->reset.prepare(engine);
 
-	intel_uc_reset_prepare(&gt->uc);
-
-	for_each_engine(engine, gt, id)
  		if (engine->sanitize)
  			engine->sanitize(engine);
+	}
 
  	if (reset_engines(gt) || force) {
  		for_each_engine(engine, gt, id)
drivers/gpu/drm/i915/gt/intel_gt_regs.h +18 -0
index 0a5c2648aaf0..12d892851684 100644
@@ -841,6 +841,24 @@
  #define   CTC_SHIFT_PARAMETER_SHIFT		1
  #define   CTC_SHIFT_PARAMETER_MASK		(0x3 << CTC_SHIFT_PARAMETER_SHIFT)
 
+/* GPM MSG_IDLE */
+#define MSG_IDLE_CS		_MMIO(0x8000)
+#define MSG_IDLE_VCS0		_MMIO(0x8004)
+#define MSG_IDLE_VCS1		_MMIO(0x8008)
+#define MSG_IDLE_BCS		_MMIO(0x800C)
+#define MSG_IDLE_VECS0		_MMIO(0x8010)
+#define MSG_IDLE_VCS2		_MMIO(0x80C0)
+#define MSG_IDLE_VCS3		_MMIO(0x80C4)
+#define MSG_IDLE_VCS4		_MMIO(0x80C8)
+#define MSG_IDLE_VCS5		_MMIO(0x80CC)
+#define MSG_IDLE_VCS6		_MMIO(0x80D0)
+#define MSG_IDLE_VCS7		_MMIO(0x80D4)
+#define MSG_IDLE_VECS1		_MMIO(0x80D8)
+#define MSG_IDLE_VECS2		_MMIO(0x80DC)
+#define MSG_IDLE_VECS3		_MMIO(0x80E0)
+#define  MSG_IDLE_FW_MASK	REG_GENMASK(13, 9)
+#define  MSG_IDLE_FW_SHIFT	9
+
  #define FORCEWAKE_MEDIA_GEN9			_MMIO(0xa270)
  #define FORCEWAKE_RENDER_GEN9			_MMIO(0xa278)
 
drivers/gpu/drm/i915/gt/intel_reset.c +3 -2
index f52015e79fdf..5422a3b84bd4 100644
@@ -772,14 +772,15 @@ static intel_engine_mask_t reset_prepare(struct intel_gt *gt)
  	intel_engine_mask_t awake = 0;
  	enum intel_engine_id id;
 
+	/* For GuC mode, ensure submission is disabled before stopping ring */
+	intel_uc_reset_prepare(&gt->uc);
+
  	for_each_engine(engine, gt, id) {
  		if (intel_engine_pm_get_if_awake(engine))
  			awake |= engine->mask;
  		reset_prepare_engine(engine);
  	}
 
-	intel_uc_reset_prepare(&gt->uc);
-
  	return awake;
  }
 
drivers/gpu/drm/i915/gt/uc/intel_guc.c +7 -0
index cda7e4bb8bac..fd04c4cd9d44 100644
@@ -292,6 +292,24 @@ static u32 guc_ctl_wa_flags(struct intel_guc *guc)
  	    GRAPHICS_VER_FULL(gt->i915) < IP_VER(12, 50))
  		flags |= GUC_WA_POLLCS;
 
+	/* Wa_16011759253:dg2_g10:a0 */
+	if (IS_DG2_GRAPHICS_STEP(gt->i915, G10, STEP_A0, STEP_B0))
+		flags |= GUC_WA_GAM_CREDITS;
+
+	/*
+	 * Wa_14012197797:dg2_g10:a0,dg2_g11:a0
+	 * Wa_22011391025:dg2_g10,dg2_g11,dg2_g12

drivers/gpu/drm/i915/gt/uc/intel_guc.c static u32 guc_ctl_wa_flags(struct intel_guc *guc) · line 311

Quoted 10 lines
drivers/gpu/drm/i915/gt/uc/intel_guc.c +10 -0
+	 *
+	 * The same WA bit is used for both and 22011391025 is applicable to
+	 * all DG2.
+	 */
+	if (IS_DG2(gt->i915))
+		flags |= GUC_WA_DUAL_QUEUE;
+
+	/* Wa_22011802037: graphics version 12 */
+	if (GRAPHICS_VER(gt->i915) == 12)
+		flags |= GUC_WA_PRE_PARSER;

This is being applied to all Gen12 and not just DG2, so hiding it in a patch that specifically says that the WAs are for DG2 could lead to it being missed for backports and similar. IMO it should be split to its own patch. Also, the database says this also applies to gen11. BTW, this WA needs an execlists submission implementation because all gen11 and early gen12 platforms are still defaulting to that. Not a blocker to merging the GuC implementation, but please make sure it is tracked.

Daniele

Quoted 123 lines
drivers/gpu/drm/i915/gt/uc/intel_guc.c +1 -0
+
  	return flags;
  }
 
drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h +4 -1
index c154b5efccde..fe5751f67b19 100644
@@ -98,7 +98,10 @@
  #define   GUC_LOG_BUF_ADDR_SHIFT	12
 
  #define GUC_CTL_WA			1
-#define   GUC_WA_POLLCS                 BIT(18)
+#define   GUC_WA_GAM_CREDITS		BIT(10)
+#define   GUC_WA_DUAL_QUEUE		BIT(11)
+#define   GUC_WA_PRE_PARSER		BIT(14)
+#define   GUC_WA_POLLCS			BIT(18)
 
  #define GUC_CTL_FEATURE			2
  #define   GUC_CTL_ENABLE_SLPC		BIT(2)
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +84 -1
index 2bd680064942..38ba9f783312 100644
@@ -1540,6 +1540,89 @@ static void guc_reset_state(struct intel_context *ce, u32 head, bool scrub)
  	lrc_update_regs(ce, engine, head);
  }
 
+static u32 __cs_pending_mi_force_wakes(struct intel_engine_cs *engine)
+{
+	static const i915_reg_t _reg[I915_NUM_ENGINES] = {
+		[RCS0] = MSG_IDLE_CS,
+		[BCS0] = MSG_IDLE_BCS,
+		[VCS0] = MSG_IDLE_VCS0,
+		[VCS1] = MSG_IDLE_VCS1,
+		[VCS2] = MSG_IDLE_VCS2,
+		[VCS3] = MSG_IDLE_VCS3,
+		[VCS4] = MSG_IDLE_VCS4,
+		[VCS5] = MSG_IDLE_VCS5,
+		[VCS6] = MSG_IDLE_VCS6,
+		[VCS7] = MSG_IDLE_VCS7,
+		[VECS0] = MSG_IDLE_VECS0,
+		[VECS1] = MSG_IDLE_VECS1,
+		[VECS2] = MSG_IDLE_VECS2,
+		[VECS3] = MSG_IDLE_VECS3,
+		[CCS0] = MSG_IDLE_CS,
+		[CCS1] = MSG_IDLE_CS,
+		[CCS2] = MSG_IDLE_CS,
+		[CCS3] = MSG_IDLE_CS,
+	};
+	u32 val;
+
+	if (!_reg[engine->id].reg)
+		return 0;
+
+	val = intel_uncore_read(engine->uncore, _reg[engine->id]);
+
+	/* bits[29:25] & bits[13:9] >> shift */
+	return (val & (val >> 16) & MSG_IDLE_FW_MASK) >> MSG_IDLE_FW_SHIFT;
+}
+
+static void __gpm_wait_for_fw_complete(struct intel_gt *gt, u32 fw_mask)
+{
+	int ret;
+
+	/* Ensure GPM receives fw up/down after CS is stopped */
+	udelay(1);
+
+	/* Wait for forcewake request to complete in GPM */
+	ret =  __intel_wait_for_register_fw(gt->uncore,
+					    GEN9_PWRGT_DOMAIN_STATUS,
+					    fw_mask, fw_mask, 5000, 0, NULL);
+
+	/* Ensure CS receives fw ack from GPM */
+	udelay(1);
+
+	if (ret)
+		GT_TRACE(gt, "Failed to complete pending forcewake %d\n", ret);
+}
+
+/*
+ * Wa_22011802037:gen12: In addition to stopping the cs, we need to wait for any
+ * pending MI_FORCE_WAKEUP requests that the CS has initiated to complete. The
+ * pending status is indicated by bits[13:9] (masked by bits[ 29:25]) in the
+ * MSG_IDLE register. There's one MSG_IDLE register per reset domain. Since we
+ * are concerned only with the gt reset here, we use a logical OR of pending
+ * forcewakeups from all reset domains and then wait for them to complete by
+ * querying PWRGT_DOMAIN_STATUS.
+ */
+static void guc_engine_reset_prepare(struct intel_engine_cs *engine)
+{
+	u32 fw_pending;
+
+	if (GRAPHICS_VER(engine->i915) != 12)
+		return;
+
+	/*
+	 * Wa_22011802037
+	 * TODO: Occassionally trying to stop the cs times out, but does not
+	 * adversely affect functionality. The timeout is set as a config
+	 * parameter that defaults to 100ms. Assuming that this timeout is
+	 * sufficient for any pending MI_FORCEWAKEs to complete, ignore the
+	 * timeout returned here until it is root caused.
+	 */
+	intel_engine_stop_cs(engine);
+
+	fw_pending = __cs_pending_mi_force_wakes(engine);
+	if (fw_pending)
+		__gpm_wait_for_fw_complete(engine->gt, fw_pending);
+}
+
  static void guc_reset_nop(struct intel_engine_cs *engine)
  {
  }
@@ -3795,7 +3878,7 @@ static void guc_default_vfuncs(struct intel_engine_cs *engine)
 
  	engine->sched_engine->schedule = i915_schedule;
 
-	engine->reset.prepare = guc_reset_nop;
+	engine->reset.prepare = guc_engine_reset_prepare;
  	engine->reset.rewind = guc_rewind_nop;
  	engine->reset.cancel = guc_reset_nop;
  	engine->reset.finish = guc_reset_nop;
#10 lore raw

PATCH 8/10 drm/i915/guc: Apply Wa_16011777198

In reply to Umesh Nerlige Ramappa

From: Vinay Belgaumkar <[email protected]>

Enable GuC Wa to reset RCS/CCS before it goes into RC6.

v2: Comments from Matt R.

---
 drivers/gpu/drm/i915/gt/uc/intel_guc.c      | 5 +++++
 drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h | 1 +
 2 files changed, 6 insertions(+)
drivers/gpu/drm/i915/gt/uc/intel_guc.c +5 -0
index fd04c4cd9d44..830889349756 100644
@@ -310,6 +310,11 @@ static u32 guc_ctl_wa_flags(struct intel_guc *guc)
 	if (GRAPHICS_VER(gt->i915) == 12)
 		flags |= GUC_WA_PRE_PARSER;
 
+	/* Wa_16011777198:dg2 */
+	if (IS_DG2_GRAPHICS_STEP(gt->i915, G10, STEP_A0, STEP_C0) ||
+	    IS_DG2_GRAPHICS_STEP(gt->i915, G11, STEP_A0, STEP_B0))
+		flags |= GUC_WA_RCS_RESET_BEFORE_RC6;
+
 	return flags;
 }
 
drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h +1 -0
index fe5751f67b19..126e67ea1619 100644
@@ -100,6 +100,7 @@
 #define GUC_CTL_WA			1
 #define   GUC_WA_GAM_CREDITS		BIT(10)
 #define   GUC_WA_DUAL_QUEUE		BIT(11)
+#define   GUC_WA_RCS_RESET_BEFORE_RC6	BIT(13)
 #define   GUC_WA_PRE_PARSER		BIT(14)
 #define   GUC_WA_POLLCS			BIT(18)
 
Signature · 1 line
2.35.1
Reviewed-by on v1 8/10
#11 lore raw

Re: [Intel-gfx] [PATCH 08/10] drm/i915/guc: Apply Wa_16011777198

Quoted 7 lines · Umesh Nerlige Ramappa

From: Vinay Belgaumkar <[email protected]>

Enable GuC Wa to reset RCS/CCS before it goes into RC6.

v2: Comments from Matt R.

Quoted 33 lines
---
  drivers/gpu/drm/i915/gt/uc/intel_guc.c      | 5 +++++
  drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h | 1 +
  2 files changed, 6 insertions(+)
drivers/gpu/drm/i915/gt/uc/intel_guc.c +5 -0
index fd04c4cd9d44..830889349756 100644
@@ -310,6 +310,11 @@ static u32 guc_ctl_wa_flags(struct intel_guc *guc)
  	if (GRAPHICS_VER(gt->i915) == 12)
  		flags |= GUC_WA_PRE_PARSER;
 
+	/* Wa_16011777198:dg2 */
+	if (IS_DG2_GRAPHICS_STEP(gt->i915, G10, STEP_A0, STEP_C0) ||
+	    IS_DG2_GRAPHICS_STEP(gt->i915, G11, STEP_A0, STEP_B0))
+		flags |= GUC_WA_RCS_RESET_BEFORE_RC6;
+
  	return flags;
  }
 
drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h +1 -0
index fe5751f67b19..126e67ea1619 100644
@@ -100,6 +100,7 @@
  #define GUC_CTL_WA			1
  #define   GUC_WA_GAM_CREDITS		BIT(10)
  #define   GUC_WA_DUAL_QUEUE		BIT(11)
+#define   GUC_WA_RCS_RESET_BEFORE_RC6	BIT(13)
  #define   GUC_WA_PRE_PARSER		BIT(14)
  #define   GUC_WA_POLLCS			BIT(18)
 
#12 lore raw

PATCH 9/10 drm/i915/dg2: Enable Wa_14014475959 - RCS / CCS context exit

In reply to Umesh Nerlige Ramappa

From: Matthew Brost <[email protected]>

There is bug in DG2 where if the CCS contexts switches out while the RCS is running it can cause memory corruption. To workaround this add an atomic to a memory address with a value 1 and semaphore wait to the same address for a value of 0. The GuC firmware is responsible for writing 0 to the memory address when it is safe for the context to switch out.

v2: Add atomic GPU instructions
v3: Add w/a number (JohnH)
v4: Set DW length to 9 atomic GPU instruction with inline data
v5: Rebase (Umesh)
v6: Split MI_ATOMIC definition into 2 (Daniele)
v7: (Daniele)
- For non-inline MI_ATOMIC, len should be 1
- Make INLINE flag part of MI_ATOMIC_INLINE definition

---
 drivers/gpu/drm/i915/gt/gen8_engine_cs.c      | 41 +++++++++++++++++++
 drivers/gpu/drm/i915/gt/intel_engine_types.h  |  8 ++++
 drivers/gpu/drm/i915/gt/intel_gpu_commands.h  |  7 ++++
 drivers/gpu/drm/i915/gt/uc/intel_guc.c        |  4 ++
 drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h   |  1 +
 .../gpu/drm/i915/gt/uc/intel_guc_submission.c |  4 ++
 6 files changed, 65 insertions(+)
drivers/gpu/drm/i915/gt/gen8_engine_cs.c +41 -0
index 047b5a710149..9529c5455bc3 100644
@@ -583,6 +583,43 @@ static u32 *gen12_emit_preempt_busywait(struct i915_request *rq, u32 *cs)
 	return cs;
 }
 
+/* Wa_14014475959:dg2 */
+#define CCS_SEMAPHORE_PPHWSP_OFFSET	0x540
+static u32 ccs_semaphore_offset(struct i915_request *rq)
+{
+	return i915_ggtt_offset(rq->context->state) +
+		(LRC_PPHWSP_PN * PAGE_SIZE) + CCS_SEMAPHORE_PPHWSP_OFFSET;
+}
+
+/* Wa_14014475959:dg2 */
+static u32 *ccs_emit_wa_busywait(struct i915_request *rq, u32 *cs)
+{
+	int i;
+
+	*cs++ = MI_ATOMIC_INLINE | MI_ATOMIC_GLOBAL_GTT | MI_ATOMIC_CS_STALL |
+		MI_ATOMIC_MOVE;
+	*cs++ = ccs_semaphore_offset(rq);
+	*cs++ = 0;
+	*cs++ = 1;
+
+	/*
+	 * When MI_ATOMIC_INLINE_DATA set this command must be 11 DW + (1 NOP)
+	 * to align. 4 DWs above + 8 filler DWs here.
+	 */
+	for (i = 0; i < 8; ++i)
+		*cs++ = 0;
+
+	*cs++ = MI_SEMAPHORE_WAIT |
+		MI_SEMAPHORE_GLOBAL_GTT |
+		MI_SEMAPHORE_POLL |
+		MI_SEMAPHORE_SAD_EQ_SDD;
+	*cs++ = 0;
+	*cs++ = ccs_semaphore_offset(rq);
+	*cs++ = 0;
+
+	return cs;
+}
+
 static __always_inline u32*
 gen12_emit_fini_breadcrumb_tail(struct i915_request *rq, u32 *cs)
 {
@@ -593,6 +630,10 @@ gen12_emit_fini_breadcrumb_tail(struct i915_request *rq, u32 *cs)
 	    !intel_uc_uses_guc_submission(&rq->engine->gt->uc))
 		cs = gen12_emit_preempt_busywait(rq, cs);
 
+	/* Wa_14014475959:dg2 */
+	if (intel_engine_uses_wa_hold_ccs_switchout(rq->engine))
+		cs = ccs_emit_wa_busywait(rq, cs);
+
 	rq->tail = intel_ring_offset(rq, cs);
 	assert_ring_tail_valid(rq->ring, rq->tail);
 
drivers/gpu/drm/i915/gt/intel_engine_types.h +8 -0
index eac20112709c..298f2cc7a879 100644
@@ -529,6 +529,7 @@ struct intel_engine_cs {
 #define I915_ENGINE_HAS_RCS_REG_STATE  BIT(9)
 #define I915_ENGINE_HAS_EU_PRIORITY    BIT(10)
 #define I915_ENGINE_FIRST_RENDER_COMPUTE BIT(11)
+#define I915_ENGINE_USES_WA_HOLD_CCS_SWITCHOUT BIT(12)
 	unsigned int flags;
 
 	/*
@@ -629,6 +630,13 @@ intel_engine_has_relative_mmio(const struct intel_engine_cs * const engine)
 	return engine->flags & I915_ENGINE_HAS_RELATIVE_MMIO;
 }
 
+/* Wa_14014475959:dg2 */
+static inline bool
+intel_engine_uses_wa_hold_ccs_switchout(struct intel_engine_cs *engine)
+{
+	return engine->flags & I915_ENGINE_USES_WA_HOLD_CCS_SWITCHOUT;
+}
+
 #define instdone_has_slice(dev_priv___, sseu___, slice___) \
 	((GRAPHICS_VER(dev_priv___) == 7 ? 1 : ((sseu___)->slice_mask)) & BIT(slice___))
 
drivers/gpu/drm/i915/gt/intel_gpu_commands.h +7 -0
index 4243be030bc1..f3fe7d4c3234 100644
@@ -134,6 +134,13 @@
 #define   MI_MEM_VIRTUAL	(1 << 22) /* 945,g33,965 */
 #define   MI_USE_GGTT		(1 << 22) /* g4x+ */
 #define MI_STORE_DWORD_INDEX	MI_INSTR(0x21, 1)
+#define MI_ATOMIC		MI_INSTR(0x2f, 1)
+#define MI_ATOMIC_INLINE	(MI_INSTR(0x2f, 9) | MI_ATOMIC_INLINE_DATA)
+#define   MI_ATOMIC_GLOBAL_GTT		(1 << 22)
+#define   MI_ATOMIC_INLINE_DATA		(1 << 18)
+#define   MI_ATOMIC_CS_STALL		(1 << 17)
+#define	  MI_ATOMIC_MOVE		(0x4 << 8)
+
 /*
  * Official intel docs are somewhat sloppy concerning MI_LOAD_REGISTER_IMM:
  * - Always issue a MI_NOOP _before_ the MI_LOAD_REGISTER_IMM - otherwise hw
drivers/gpu/drm/i915/gt/uc/intel_guc.c +4 -0
index 830889349756..228070e31ef0 100644
@@ -296,6 +296,10 @@ static u32 guc_ctl_wa_flags(struct intel_guc *guc)
 	if (IS_DG2_GRAPHICS_STEP(gt->i915, G10, STEP_A0, STEP_B0))
 		flags |= GUC_WA_GAM_CREDITS;
 
+	/* Wa_14014475959:dg2 */
+	if (IS_DG2(gt->i915))
+		flags |= GUC_WA_HOLD_CCS_SWITCHOUT;
+
 	/*
 	 * Wa_14012197797:dg2_g10:a0,dg2_g11:a0
 	 * Wa_22011391025:dg2_g10,dg2_g11,dg2_g12
drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h +1 -0
index 126e67ea1619..e389a3a041a2 100644
@@ -102,6 +102,7 @@
 #define   GUC_WA_DUAL_QUEUE		BIT(11)
 #define   GUC_WA_RCS_RESET_BEFORE_RC6	BIT(13)
 #define   GUC_WA_PRE_PARSER		BIT(14)
+#define   GUC_WA_HOLD_CCS_SWITCHOUT	BIT(17)
 #define   GUC_WA_POLLCS			BIT(18)
 
 #define GUC_CTL_FEATURE			2
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +4 -0
index 38ba9f783312..1cb88e99b040 100644
@@ -3897,6 +3897,10 @@ static void guc_default_vfuncs(struct intel_engine_cs *engine)
 	engine->flags |= I915_ENGINE_HAS_PREEMPTION;
 	engine->flags |= I915_ENGINE_HAS_TIMESLICES;
 
+	/* Wa_14014475959:dg2 */
+	if (IS_DG2(engine->i915) && engine->class == COMPUTE_CLASS)
+		engine->flags |= I915_ENGINE_USES_WA_HOLD_CCS_SWITCHOUT;
+
 	/*
 	 * TODO: GuC supports timeslicing and semaphores as well, but they're
 	 * handled by the firmware so some minor tweaks are required before
Signature · 1 line
2.35.1
Reviewed-by on v1 9/10
#13 lore raw

Re: [Intel-gfx] [PATCH 09/10] drm/i915/dg2: Enable Wa_14014475959 - RCS / CCS context exit

Quoted 17 lines · Umesh Nerlige Ramappa

From: Matthew Brost <[email protected]>

There is bug in DG2 where if the CCS contexts switches out while the RCS is running it can cause memory corruption. To workaround this add an atomic to a memory address with a value 1 and semaphore wait to the same address for a value of 0. The GuC firmware is responsible for writing 0 to the memory address when it is safe for the context to switch out.

v2: Add atomic GPU instructions
v3: Add w/a number (JohnH)
v4: Set DW length to 9 atomic GPU instruction with inline data
v5: Rebase (Umesh)
v6: Split MI_ATOMIC definition into 2 (Daniele)
v7: (Daniele)
- For non-inline MI_ATOMIC, len should be 1
- Make INLINE flag part of MI_ATOMIC_INLINE definition

Quoted 1 line
Quoted 154 lines
---
  drivers/gpu/drm/i915/gt/gen8_engine_cs.c      | 41 +++++++++++++++++++
  drivers/gpu/drm/i915/gt/intel_engine_types.h  |  8 ++++
  drivers/gpu/drm/i915/gt/intel_gpu_commands.h  |  7 ++++
  drivers/gpu/drm/i915/gt/uc/intel_guc.c        |  4 ++
  drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h   |  1 +
  .../gpu/drm/i915/gt/uc/intel_guc_submission.c |  4 ++
  6 files changed, 65 insertions(+)
drivers/gpu/drm/i915/gt/gen8_engine_cs.c +41 -0
index 047b5a710149..9529c5455bc3 100644
@@ -583,6 +583,43 @@ static u32 *gen12_emit_preempt_busywait(struct i915_request *rq, u32 *cs)
  	return cs;
  }
 
+/* Wa_14014475959:dg2 */
+#define CCS_SEMAPHORE_PPHWSP_OFFSET	0x540
+static u32 ccs_semaphore_offset(struct i915_request *rq)
+{
+	return i915_ggtt_offset(rq->context->state) +
+		(LRC_PPHWSP_PN * PAGE_SIZE) + CCS_SEMAPHORE_PPHWSP_OFFSET;
+}
+
+/* Wa_14014475959:dg2 */
+static u32 *ccs_emit_wa_busywait(struct i915_request *rq, u32 *cs)
+{
+	int i;
+
+	*cs++ = MI_ATOMIC_INLINE | MI_ATOMIC_GLOBAL_GTT | MI_ATOMIC_CS_STALL |
+		MI_ATOMIC_MOVE;
+	*cs++ = ccs_semaphore_offset(rq);
+	*cs++ = 0;
+	*cs++ = 1;
+
+	/*
+	 * When MI_ATOMIC_INLINE_DATA set this command must be 11 DW + (1 NOP)
+	 * to align. 4 DWs above + 8 filler DWs here.
+	 */
+	for (i = 0; i < 8; ++i)
+		*cs++ = 0;
+
+	*cs++ = MI_SEMAPHORE_WAIT |
+		MI_SEMAPHORE_GLOBAL_GTT |
+		MI_SEMAPHORE_POLL |
+		MI_SEMAPHORE_SAD_EQ_SDD;
+	*cs++ = 0;
+	*cs++ = ccs_semaphore_offset(rq);
+	*cs++ = 0;
+
+	return cs;
+}
+
  static __always_inline u32*
  gen12_emit_fini_breadcrumb_tail(struct i915_request *rq, u32 *cs)
  {
@@ -593,6 +630,10 @@ gen12_emit_fini_breadcrumb_tail(struct i915_request *rq, u32 *cs)
  	    !intel_uc_uses_guc_submission(&rq->engine->gt->uc))
  		cs = gen12_emit_preempt_busywait(rq, cs);
 
+	/* Wa_14014475959:dg2 */
+	if (intel_engine_uses_wa_hold_ccs_switchout(rq->engine))
+		cs = ccs_emit_wa_busywait(rq, cs);
+
  	rq->tail = intel_ring_offset(rq, cs);
  	assert_ring_tail_valid(rq->ring, rq->tail);
 
drivers/gpu/drm/i915/gt/intel_engine_types.h +8 -0
index eac20112709c..298f2cc7a879 100644
@@ -529,6 +529,7 @@ struct intel_engine_cs {
  #define I915_ENGINE_HAS_RCS_REG_STATE  BIT(9)
  #define I915_ENGINE_HAS_EU_PRIORITY    BIT(10)
  #define I915_ENGINE_FIRST_RENDER_COMPUTE BIT(11)
+#define I915_ENGINE_USES_WA_HOLD_CCS_SWITCHOUT BIT(12)
  	unsigned int flags;
 
  	/*
@@ -629,6 +630,13 @@ intel_engine_has_relative_mmio(const struct intel_engine_cs * const engine)
  	return engine->flags & I915_ENGINE_HAS_RELATIVE_MMIO;
  }
 
+/* Wa_14014475959:dg2 */
+static inline bool
+intel_engine_uses_wa_hold_ccs_switchout(struct intel_engine_cs *engine)
+{
+	return engine->flags & I915_ENGINE_USES_WA_HOLD_CCS_SWITCHOUT;
+}
+
  #define instdone_has_slice(dev_priv___, sseu___, slice___) \
  	((GRAPHICS_VER(dev_priv___) == 7 ? 1 : ((sseu___)->slice_mask)) & BIT(slice___))
 
drivers/gpu/drm/i915/gt/intel_gpu_commands.h +7 -0
index 4243be030bc1..f3fe7d4c3234 100644
@@ -134,6 +134,13 @@
  #define   MI_MEM_VIRTUAL	(1 << 22) /* 945,g33,965 */
  #define   MI_USE_GGTT		(1 << 22) /* g4x+ */
  #define MI_STORE_DWORD_INDEX	MI_INSTR(0x21, 1)
+#define MI_ATOMIC		MI_INSTR(0x2f, 1)
+#define MI_ATOMIC_INLINE	(MI_INSTR(0x2f, 9) | MI_ATOMIC_INLINE_DATA)
+#define   MI_ATOMIC_GLOBAL_GTT		(1 << 22)
+#define   MI_ATOMIC_INLINE_DATA		(1 << 18)
+#define   MI_ATOMIC_CS_STALL		(1 << 17)
+#define	  MI_ATOMIC_MOVE		(0x4 << 8)
+
  /*
   * Official intel docs are somewhat sloppy concerning MI_LOAD_REGISTER_IMM:
   * - Always issue a MI_NOOP _before_ the MI_LOAD_REGISTER_IMM - otherwise hw
drivers/gpu/drm/i915/gt/uc/intel_guc.c +4 -0
index 830889349756..228070e31ef0 100644
@@ -296,6 +296,10 @@ static u32 guc_ctl_wa_flags(struct intel_guc *guc)
  	if (IS_DG2_GRAPHICS_STEP(gt->i915, G10, STEP_A0, STEP_B0))
  		flags |= GUC_WA_GAM_CREDITS;
 
+	/* Wa_14014475959:dg2 */
+	if (IS_DG2(gt->i915))
+		flags |= GUC_WA_HOLD_CCS_SWITCHOUT;
+
  	/*
  	 * Wa_14012197797:dg2_g10:a0,dg2_g11:a0
  	 * Wa_22011391025:dg2_g10,dg2_g11,dg2_g12
drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h +1 -0
index 126e67ea1619..e389a3a041a2 100644
@@ -102,6 +102,7 @@
  #define   GUC_WA_DUAL_QUEUE		BIT(11)
  #define   GUC_WA_RCS_RESET_BEFORE_RC6	BIT(13)
  #define   GUC_WA_PRE_PARSER		BIT(14)
+#define   GUC_WA_HOLD_CCS_SWITCHOUT	BIT(17)
  #define   GUC_WA_POLLCS			BIT(18)
 
  #define GUC_CTL_FEATURE			2
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +4 -0
index 38ba9f783312..1cb88e99b040 100644
@@ -3897,6 +3897,10 @@ static void guc_default_vfuncs(struct intel_engine_cs *engine)
  	engine->flags |= I915_ENGINE_HAS_PREEMPTION;
  	engine->flags |= I915_ENGINE_HAS_TIMESLICES;
 
+	/* Wa_14014475959:dg2 */
+	if (IS_DG2(engine->i915) && engine->class == COMPUTE_CLASS)
+		engine->flags |= I915_ENGINE_USES_WA_HOLD_CCS_SWITCHOUT;
+
  	/*
  	 * TODO: GuC supports timeslicing and semaphores as well, but they're
  	 * handled by the firmware so some minor tweaks are required before
#14 lore raw

Re: [Intel-gfx] [PATCH 09/10] drm/i915/dg2: Enable Wa_14014475959 - RCS / CCS context exit

In reply to Umesh Nerlige Ramappa
Quoted 8 lines · Umesh Nerlige Ramappa

From: Matthew Brost <[email protected]>

There is bug in DG2 where if the CCS contexts switches out while the RCS is running it can cause memory corruption. To workaround this add an atomic to a memory address with a value 1 and semaphore wait to the same address for a value of 0. The GuC firmware is responsible for writing 0 to the memory address when it is safe for the context to switch out.

Quoted 9 lines

v2: Add atomic GPU instructions
v3: Add w/a number (JohnH)
v4: Set DW length to 9 atomic GPU instruction with inline data
v5: Rebase (Umesh)
v6: Split MI_ATOMIC definition into 2 (Daniele)
v7: (Daniele)
- For non-inline MI_ATOMIC, len should be 1
- Make INLINE flag part of MI_ATOMIC_INLINE definition

The internal version log should be dropped before posting upstream.

Matt

Quoted 158 lines
---
 drivers/gpu/drm/i915/gt/gen8_engine_cs.c      | 41 +++++++++++++++++++
 drivers/gpu/drm/i915/gt/intel_engine_types.h  |  8 ++++
 drivers/gpu/drm/i915/gt/intel_gpu_commands.h  |  7 ++++
 drivers/gpu/drm/i915/gt/uc/intel_guc.c        |  4 ++
 drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h   |  1 +
 .../gpu/drm/i915/gt/uc/intel_guc_submission.c |  4 ++
 6 files changed, 65 insertions(+)
drivers/gpu/drm/i915/gt/gen8_engine_cs.c +41 -0
index 047b5a710149..9529c5455bc3 100644
@@ -583,6 +583,43 @@ static u32 *gen12_emit_preempt_busywait(struct i915_request *rq, u32 *cs)
 	return cs;
 }
 
+/* Wa_14014475959:dg2 */
+#define CCS_SEMAPHORE_PPHWSP_OFFSET	0x540
+static u32 ccs_semaphore_offset(struct i915_request *rq)
+{
+	return i915_ggtt_offset(rq->context->state) +
+		(LRC_PPHWSP_PN * PAGE_SIZE) + CCS_SEMAPHORE_PPHWSP_OFFSET;
+}
+
+/* Wa_14014475959:dg2 */
+static u32 *ccs_emit_wa_busywait(struct i915_request *rq, u32 *cs)
+{
+	int i;
+
+	*cs++ = MI_ATOMIC_INLINE | MI_ATOMIC_GLOBAL_GTT | MI_ATOMIC_CS_STALL |
+		MI_ATOMIC_MOVE;
+	*cs++ = ccs_semaphore_offset(rq);
+	*cs++ = 0;
+	*cs++ = 1;
+
+	/*
+	 * When MI_ATOMIC_INLINE_DATA set this command must be 11 DW + (1 NOP)
+	 * to align. 4 DWs above + 8 filler DWs here.
+	 */
+	for (i = 0; i < 8; ++i)
+		*cs++ = 0;
+
+	*cs++ = MI_SEMAPHORE_WAIT |
+		MI_SEMAPHORE_GLOBAL_GTT |
+		MI_SEMAPHORE_POLL |
+		MI_SEMAPHORE_SAD_EQ_SDD;
+	*cs++ = 0;
+	*cs++ = ccs_semaphore_offset(rq);
+	*cs++ = 0;
+
+	return cs;
+}
+
 static __always_inline u32*
 gen12_emit_fini_breadcrumb_tail(struct i915_request *rq, u32 *cs)
 {
@@ -593,6 +630,10 @@ gen12_emit_fini_breadcrumb_tail(struct i915_request *rq, u32 *cs)
 	    !intel_uc_uses_guc_submission(&rq->engine->gt->uc))
 		cs = gen12_emit_preempt_busywait(rq, cs);
 
+	/* Wa_14014475959:dg2 */
+	if (intel_engine_uses_wa_hold_ccs_switchout(rq->engine))
+		cs = ccs_emit_wa_busywait(rq, cs);
+
 	rq->tail = intel_ring_offset(rq, cs);
 	assert_ring_tail_valid(rq->ring, rq->tail);
 
drivers/gpu/drm/i915/gt/intel_engine_types.h +8 -0
index eac20112709c..298f2cc7a879 100644
@@ -529,6 +529,7 @@ struct intel_engine_cs {
 #define I915_ENGINE_HAS_RCS_REG_STATE  BIT(9)
 #define I915_ENGINE_HAS_EU_PRIORITY    BIT(10)
 #define I915_ENGINE_FIRST_RENDER_COMPUTE BIT(11)
+#define I915_ENGINE_USES_WA_HOLD_CCS_SWITCHOUT BIT(12)
 	unsigned int flags;
 
 	/*
@@ -629,6 +630,13 @@ intel_engine_has_relative_mmio(const struct intel_engine_cs * const engine)
 	return engine->flags & I915_ENGINE_HAS_RELATIVE_MMIO;
 }
 
+/* Wa_14014475959:dg2 */
+static inline bool
+intel_engine_uses_wa_hold_ccs_switchout(struct intel_engine_cs *engine)
+{
+	return engine->flags & I915_ENGINE_USES_WA_HOLD_CCS_SWITCHOUT;
+}
+
 #define instdone_has_slice(dev_priv___, sseu___, slice___) \
 	((GRAPHICS_VER(dev_priv___) == 7 ? 1 : ((sseu___)->slice_mask)) & BIT(slice___))
 
drivers/gpu/drm/i915/gt/intel_gpu_commands.h +7 -0
index 4243be030bc1..f3fe7d4c3234 100644
@@ -134,6 +134,13 @@
 #define   MI_MEM_VIRTUAL	(1 << 22) /* 945,g33,965 */
 #define   MI_USE_GGTT		(1 << 22) /* g4x+ */
 #define MI_STORE_DWORD_INDEX	MI_INSTR(0x21, 1)
+#define MI_ATOMIC		MI_INSTR(0x2f, 1)
+#define MI_ATOMIC_INLINE	(MI_INSTR(0x2f, 9) | MI_ATOMIC_INLINE_DATA)
+#define   MI_ATOMIC_GLOBAL_GTT		(1 << 22)
+#define   MI_ATOMIC_INLINE_DATA		(1 << 18)
+#define   MI_ATOMIC_CS_STALL		(1 << 17)
+#define	  MI_ATOMIC_MOVE		(0x4 << 8)
+
 /*
  * Official intel docs are somewhat sloppy concerning MI_LOAD_REGISTER_IMM:
  * - Always issue a MI_NOOP _before_ the MI_LOAD_REGISTER_IMM - otherwise hw
drivers/gpu/drm/i915/gt/uc/intel_guc.c +4 -0
index 830889349756..228070e31ef0 100644
@@ -296,6 +296,10 @@ static u32 guc_ctl_wa_flags(struct intel_guc *guc)
 	if (IS_DG2_GRAPHICS_STEP(gt->i915, G10, STEP_A0, STEP_B0))
 		flags |= GUC_WA_GAM_CREDITS;
 
+	/* Wa_14014475959:dg2 */
+	if (IS_DG2(gt->i915))
+		flags |= GUC_WA_HOLD_CCS_SWITCHOUT;
+
 	/*
 	 * Wa_14012197797:dg2_g10:a0,dg2_g11:a0
 	 * Wa_22011391025:dg2_g10,dg2_g11,dg2_g12
drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h +1 -0
index 126e67ea1619..e389a3a041a2 100644
@@ -102,6 +102,7 @@
 #define   GUC_WA_DUAL_QUEUE		BIT(11)
 #define   GUC_WA_RCS_RESET_BEFORE_RC6	BIT(13)
 #define   GUC_WA_PRE_PARSER		BIT(14)
+#define   GUC_WA_HOLD_CCS_SWITCHOUT	BIT(17)
 #define   GUC_WA_POLLCS			BIT(18)
 
 #define GUC_CTL_FEATURE			2
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +4 -0
index 38ba9f783312..1cb88e99b040 100644
@@ -3897,6 +3897,10 @@ static void guc_default_vfuncs(struct intel_engine_cs *engine)
 	engine->flags |= I915_ENGINE_HAS_PREEMPTION;
 	engine->flags |= I915_ENGINE_HAS_TIMESLICES;
 
+	/* Wa_14014475959:dg2 */
+	if (IS_DG2(engine->i915) && engine->class == COMPUTE_CLASS)
+		engine->flags |= I915_ENGINE_USES_WA_HOLD_CCS_SWITCHOUT;
+
 	/*
 	 * TODO: GuC supports timeslicing and semaphores as well, but they're
 	 * handled by the firmware so some minor tweaks are required before
Signature · 1 line
2.35.1
#15 lore raw

PATCH 10/10 drm/i915/dg2: Enable Wa_22012727170/Wa_22012727685

In reply to Umesh Nerlige Ramappa

From: John Harrison <[email protected]>

The above two workaronuds regarding context isolation are implemented by GuC. The KMD just needs to enable them.

v2: Use dg2 stepping for ctx isolation WA (Umesh)
v3: Rebase (Umesh)
v4: Fix WA comments (Daniele)
v5: Drop Wa_22012727685 for G10 as it is n/a
v6: Undo v5 change since the G10 condition is needed

---
 drivers/gpu/drm/i915/gt/uc/intel_guc.c      | 8 ++++++++
 drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h | 1 +
 2 files changed, 9 insertions(+)
drivers/gpu/drm/i915/gt/uc/intel_guc.c +8 -0
index 228070e31ef0..2c4ad4a65089 100644
@@ -319,6 +319,14 @@ static u32 guc_ctl_wa_flags(struct intel_guc *guc)
 	    IS_DG2_GRAPHICS_STEP(gt->i915, G11, STEP_A0, STEP_B0))
 		flags |= GUC_WA_RCS_RESET_BEFORE_RC6;
 
+	/*
+	 * Wa_22012727170:dg2_g10[a0-c0), dg2_g11[a0..)
+	 * Wa_22012727685:dg2_g11[a0..)
+	 */
+	if (IS_DG2_GRAPHICS_STEP(gt->i915, G10, STEP_A0, STEP_C0) ||
+	    IS_DG2_GRAPHICS_STEP(gt->i915, G11, STEP_A0, STEP_FOREVER))
+		flags |= GUC_WA_CONTEXT_ISOLATION;
+
 	return flags;
 }
 
drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h +1 -0
index e389a3a041a2..42cb7a9a6199 100644
@@ -101,6 +101,7 @@
 #define   GUC_WA_GAM_CREDITS		BIT(10)
 #define   GUC_WA_DUAL_QUEUE		BIT(11)
 #define   GUC_WA_RCS_RESET_BEFORE_RC6	BIT(13)
+#define   GUC_WA_CONTEXT_ISOLATION	BIT(15)
 #define   GUC_WA_PRE_PARSER		BIT(14)
 #define   GUC_WA_HOLD_CCS_SWITCHOUT	BIT(17)
 #define   GUC_WA_POLLCS			BIT(18)
Signature · 1 line
2.35.1
#16 lore raw

Re: [Intel-gfx] [PATCH 10/10] drm/i915/dg2: Enable Wa_22012727170/Wa_22012727685

Quoted 3 lines · Umesh Nerlige Ramappa

From: John Harrison <[email protected]>

The above two workaronuds regarding context isolation are implemented

workaronuds -> workarounds

Quoted 45 lines

by GuC. The KMD just needs to enable them.

v2: Use dg2 stepping for ctx isolation WA (Umesh)
v3: Rebase (Umesh)
v4: Fix WA comments (Daniele)
v5: Drop Wa_22012727685 for G10 as it is n/a
v6: Undo v5 change since the G10 condition is needed

---
  drivers/gpu/drm/i915/gt/uc/intel_guc.c      | 8 ++++++++
  drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h | 1 +
  2 files changed, 9 insertions(+)
drivers/gpu/drm/i915/gt/uc/intel_guc.c +8 -0
index 228070e31ef0..2c4ad4a65089 100644
@@ -319,6 +319,14 @@ static u32 guc_ctl_wa_flags(struct intel_guc *guc)
  	    IS_DG2_GRAPHICS_STEP(gt->i915, G11, STEP_A0, STEP_B0))
  		flags |= GUC_WA_RCS_RESET_BEFORE_RC6;
 
+	/*
+	 * Wa_22012727170:dg2_g10[a0-c0), dg2_g11[a0..)
+	 * Wa_22012727685:dg2_g11[a0..)
+	 */
+	if (IS_DG2_GRAPHICS_STEP(gt->i915, G10, STEP_A0, STEP_C0) ||
+	    IS_DG2_GRAPHICS_STEP(gt->i915, G11, STEP_A0, STEP_FOREVER))
+		flags |= GUC_WA_CONTEXT_ISOLATION;
+
  	return flags;
  }
 
drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h +1 -0
index e389a3a041a2..42cb7a9a6199 100644
@@ -101,6 +101,7 @@
  #define   GUC_WA_GAM_CREDITS		BIT(10)
  #define   GUC_WA_DUAL_QUEUE		BIT(11)
  #define   GUC_WA_RCS_RESET_BEFORE_RC6	BIT(13)
+#define   GUC_WA_CONTEXT_ISOLATION	BIT(15)
  #define   GUC_WA_PRE_PARSER		BIT(14)
  #define   GUC_WA_HOLD_CCS_SWITCHOUT	BIT(17)
  #define   GUC_WA_POLLCS			BIT(18)
author Reviewed-by
#17 lore raw

Re: [Intel-gfx] [PATCH 10/10] drm/i915/dg2: Enable Wa_22012727170/Wa_22012727685

Quoted 15 lines · John Harrison
Quoted 3 lines · Umesh Nerlige Ramappa

From: John Harrison <[email protected]>

The above two workaronuds regarding context isolation are implemented

workaronuds -> workarounds

Quoted 9 lines

by GuC. The KMD just needs to enable them.

v2: Use dg2 stepping for ctx isolation WA (Umesh)
v3: Rebase (Umesh)
v4: Fix WA comments (Daniele)
v5: Drop Wa_22012727685 for G10 as it is n/a
v6: Undo v5 change since the G10 condition is needed

with spelling corrected above, this is

Umesh

Quoted 35 lines
Quoted 34 lines
---
 drivers/gpu/drm/i915/gt/uc/intel_guc.c      | 8 ++++++++
 drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h | 1 +
 2 files changed, 9 insertions(+)
drivers/gpu/drm/i915/gt/uc/intel_guc.c +8 -0
index 228070e31ef0..2c4ad4a65089 100644
@@ -319,6 +319,14 @@ static u32 guc_ctl_wa_flags(struct intel_guc *guc)
 	    IS_DG2_GRAPHICS_STEP(gt->i915, G11, STEP_A0, STEP_B0))
 		flags |= GUC_WA_RCS_RESET_BEFORE_RC6;
+	/*
+	 * Wa_22012727170:dg2_g10[a0-c0), dg2_g11[a0..)
+	 * Wa_22012727685:dg2_g11[a0..)
+	 */
+	if (IS_DG2_GRAPHICS_STEP(gt->i915, G10, STEP_A0, STEP_C0) ||
+	    IS_DG2_GRAPHICS_STEP(gt->i915, G11, STEP_A0, STEP_FOREVER))
+		flags |= GUC_WA_CONTEXT_ISOLATION;
+
 	return flags;
 }
drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h +1 -0
index e389a3a041a2..42cb7a9a6199 100644
@@ -101,6 +101,7 @@
 #define   GUC_WA_GAM_CREDITS		BIT(10)
 #define   GUC_WA_DUAL_QUEUE		BIT(11)
 #define   GUC_WA_RCS_RESET_BEFORE_RC6	BIT(13)
+#define   GUC_WA_CONTEXT_ISOLATION	BIT(15)
 #define   GUC_WA_PRE_PARSER		BIT(14)
 #define   GUC_WA_HOLD_CCS_SWITCHOUT	BIT(17)
 #define   GUC_WA_POLLCS			BIT(18)
#18 lore raw

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Enable compute and related WAs for DG2

In reply to Umesh Nerlige Ramappa
== Series Details ==

== Series Details ==

Series: Enable compute and related WAs for DG2
URL : https://patchwork.freedesktop.org/series/102667/
State : warning

== Summary ==

Error: dim checkpatch failed
e449143c2530 drm/i915/guc: Update context registration to new GuC API -:419: WARNING:IF_0: Consider removing the code enclosed by this #if 0 and its #endif #419: FILE: drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c:2194:
+#if 0

total: 0 errors, 1 warnings, 0 checks, 492 lines checked
7d00a3489714 drm/i915/guc: Update scheduling policies to new GuC API d476780adbbe drm/i915/guc: Update to GuC version 70.1.1
9be440cddd2c drm/i915/xehp: Add compute engine ABI
df16d39d09ae drm/i915: Xe_HP SDV and DG2 have 4 CCS engines
d22706dcd7f6 drm/i915: Add Wa_22011802037 force cs halt
69f8895e82df drm/i915/guc: Enable GuC based workarounds for DG2
-:241: WARNING:TYPO_SPELLING: 'Occassionally' may be misspelled - perhaps 'Occasionally'? #241: FILE: drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c:1613:
+ * TODO: Occassionally trying to stop the cs times out, but does not
^^^^^^^^^^^^^

total: 0 errors, 1 warnings, 0 checks, 193 lines checked fdefd71ed98e drm/i915/guc: Apply Wa_16011777198
4690e3f7ff95 drm/i915/dg2: Enable Wa_14014475959 - RCS / CCS context exit 3f4b7f566f11 drm/i915/dg2: Enable Wa_22012727170/Wa_22012727685

#20 lore raw

[Intel-gfx] ✗ Fi.CI.BAT: failure for Enable compute and related WAs for DG2

In reply to Umesh Nerlige Ramappa
== Series Details ==

== Series Details ==

Series: Enable compute and related WAs for DG2
URL : https://patchwork.freedesktop.org/series/102667/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_11497 -> Patchwork_102667v1
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_102667v1 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_102667v1, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/index.html

Participating hosts (39 -> 46)
------------------------------

Additional (9): bat-dg1-6 bat-dg1-5 bat-dg2-8 fi-icl-u2 bat-dg2-9 bat-adlp-6 bat-adlp-4 bat-rpls-1 bat-jsl-1
Missing (2): fi-bsw-cyan fi-bdw-samus

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in Patchwork_102667v1:

### IGT changes ###

#### Possible regressions ####

* igt@gem_lmem_swapping@parallel-random-engines:
- bat-dg1-5: NOTRUN -> [FAIL][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg1-5/igt@[email protected]
- bat-dg1-6: NOTRUN -> [FAIL][2]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg1-6/igt@[email protected]

#### Suppressed ####

The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.

* igt@gem_lmem_swapping@random-engines:
- {bat-dg2-8}: NOTRUN -> [FAIL][3]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg2-8/igt@[email protected]

* igt@gem_ringfill@basic-all:
- {bat-dg2-8}: NOTRUN -> [TIMEOUT][4]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg2-8/igt@[email protected]

* igt@i915_pm_rpm@module-reload:
- {bat-dg2-9}: NOTRUN -> [SKIP][5] +1 similar issue
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg2-9/igt@[email protected]

* igt@i915_selftest@live@gem:
- {bat-dg2-9}: NOTRUN -> [FAIL][6] +35 similar issues
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg2-9/igt@i915_selftest@[email protected]

New tests
---------

New tests have been introduced between CI_DRM_11497 and Patchwork_102667v1:

### New IGT tests (24) ###

* igt@gem_exec_basic@basic@ccs0-lmem0:
- Statuses : 1 pass(s)
- Exec time: [0.0] s

* igt@gem_exec_basic@basic@ccs0-smem:
- Statuses : 1 pass(s)
- Exec time: [0.00] s

* igt@gem_exec_basic@basic@ccs1-lmem0:
- Statuses : 1 pass(s)
- Exec time: [0.0] s

* igt@gem_exec_basic@basic@ccs1-smem:
- Statuses : 1 pass(s)
- Exec time: [0.00] s

* igt@gem_exec_basic@basic@ccs2-lmem0:
- Statuses : 1 pass(s)
- Exec time: [0.0] s

* igt@gem_exec_basic@basic@ccs2-smem:
- Statuses : 1 pass(s)
- Exec time: [0.0] s

* igt@gem_exec_basic@basic@ccs3-lmem0:
- Statuses : 1 pass(s)
- Exec time: [0.0] s

* igt@gem_exec_basic@basic@ccs3-smem:
- Statuses : 1 pass(s)
- Exec time: [0.00] s

* igt@gem_exec_fence@basic-await@ccs0:
- Statuses : 1 pass(s)
- Exec time: [0.10] s

* igt@gem_exec_fence@basic-await@ccs1:
- Statuses : 1 pass(s)
- Exec time: [0.09] s

* igt@gem_exec_fence@basic-await@ccs2:
- Statuses : 1 pass(s)
- Exec time: [0.09] s

* igt@gem_exec_fence@basic-await@ccs3:
- Statuses : 1 pass(s)
- Exec time: [0.09] s

* igt@gem_exec_fence@basic-busy@ccs0:
- Statuses : 1 pass(s)
- Exec time: [0.04] s

* igt@gem_exec_fence@basic-busy@ccs1:
- Statuses : 1 pass(s)
- Exec time: [0.03] s

* igt@gem_exec_fence@basic-busy@ccs2:
- Statuses : 1 pass(s)
- Exec time: [0.03] s

* igt@gem_exec_fence@basic-busy@ccs3:
- Statuses : 1 pass(s)
- Exec time: [0.03] s

* igt@gem_exec_fence@basic-wait@ccs0:
- Statuses : 1 pass(s)
- Exec time: [0.04] s

* igt@gem_exec_fence@basic-wait@ccs1:
- Statuses : 1 pass(s)
- Exec time: [0.04] s

* igt@gem_exec_fence@basic-wait@ccs2:
- Statuses : 1 pass(s)
- Exec time: [0.04] s

* igt@gem_exec_fence@basic-wait@ccs3:
- Statuses : 1 pass(s)
- Exec time: [0.04] s

* igt@gem_exec_fence@nb-await@ccs0:
- Statuses : 1 pass(s)
- Exec time: [0.09] s

* igt@gem_exec_fence@nb-await@ccs1:
- Statuses : 1 pass(s)
- Exec time: [0.07] s

* igt@gem_exec_fence@nb-await@ccs2:
- Statuses : 1 pass(s)
- Exec time: [0.07] s

* igt@gem_exec_fence@nb-await@ccs3:
- Statuses : 1 pass(s)
- Exec time: [0.09] s

Known issues
------------

Here are the changes found in Patchwork_102667v1 that come from known issues:

### CI changes ###

#### Possible fixes ####

* boot:
- fi-ilk-650: [FAIL][7] -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11497/fi-ilk-650/boot.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/fi-ilk-650/boot.html

### IGT changes ###

#### Issues hit ####

* igt@debugfs_test@read_all_entries:
- fi-kbl-soraka: [PASS][9] -> [DMESG-WARN][10] ([i915#1982])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11497/fi-kbl-soraka/igt@debugfs_test@read_all_entries.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/fi-kbl-soraka/igt@debugfs_test@read_all_entries.html

* igt@fbdev@write:
- bat-dg1-5: NOTRUN -> [SKIP][11] ([i915#2582]) +4 similar issues
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg1-5/igt@[email protected]

* igt@gem_huc_copy@huc-copy:
- fi-ilk-650: NOTRUN -> [SKIP][12] ([fdo#109271]) +21 similar issues
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/fi-ilk-650/igt@[email protected]
- fi-icl-u2: NOTRUN -> [SKIP][13] ([i915#2190])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/fi-icl-u2/igt@[email protected]

* igt@gem_lmem_swapping@parallel-random-engines:
- fi-icl-u2: NOTRUN -> [SKIP][14] ([i915#4613]) +3 similar issues
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/fi-icl-u2/igt@[email protected]

* igt@gem_mmap@basic:
- bat-dg1-6: NOTRUN -> [SKIP][15] ([i915#4083])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg1-6/igt@[email protected]
- bat-dg1-5: NOTRUN -> [SKIP][16] ([i915#4083])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg1-5/igt@[email protected]

* igt@gem_tiled_blits@basic:
- bat-dg1-6: NOTRUN -> [SKIP][17] ([i915#4077]) +2 similar issues
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg1-6/igt@[email protected]

* igt@gem_tiled_fence_blits@basic:
- bat-dg1-5: NOTRUN -> [SKIP][18] ([i915#4077]) +2 similar issues
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg1-5/igt@[email protected]

* igt@gem_tiled_pread_basic:
- bat-dg1-5: NOTRUN -> [SKIP][19] ([i915#4079]) +1 similar issue
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg1-5/igt@gem_tiled_pread_basic.html
- bat-dg1-6: NOTRUN -> [SKIP][20] ([i915#4079]) +1 similar issue
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg1-6/igt@gem_tiled_pread_basic.html

* igt@i915_pm_backlight@basic-brightness:
- bat-dg1-5: NOTRUN -> [SKIP][21] ([i915#1155])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg1-5/igt@[email protected]
- bat-dg1-6: NOTRUN -> [SKIP][22] ([i915#1155])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg1-6/igt@[email protected]

* igt@i915_selftest@live@hangcheck:
- fi-hsw-4770: [PASS][23] -> [INCOMPLETE][24] ([i915#4785])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11497/fi-hsw-4770/igt@i915_selftest@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/fi-hsw-4770/igt@i915_selftest@[email protected]

* igt@kms_addfb_basic@addfb25-x-tiled-legacy:
- bat-dg1-6: NOTRUN -> [SKIP][25] ([i915#4212]) +7 similar issues
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg1-6/igt@[email protected]

* igt@kms_addfb_basic@basic-y-tiled-legacy:
- bat-dg1-5: NOTRUN -> [SKIP][26] ([i915#4215])
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg1-5/igt@[email protected]
- bat-dg1-6: NOTRUN -> [SKIP][27] ([i915#4215])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg1-6/igt@[email protected]

* igt@kms_addfb_basic@tile-pitch-mismatch:
- bat-dg1-5: NOTRUN -> [SKIP][28] ([i915#4212]) +7 similar issues
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg1-5/igt@[email protected]

* igt@kms_busy@basic:
- bat-dg1-5: NOTRUN -> [SKIP][29] ([i915#4303])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg1-5/igt@[email protected]

* igt@kms_chamelium@dp-hpd-fast:
- fi-ilk-650: NOTRUN -> [SKIP][30] ([fdo#109271] / [fdo#111827]) +8 similar issues
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/fi-ilk-650/igt@[email protected]

* igt@kms_chamelium@hdmi-edid-read:
- bat-dg1-6: NOTRUN -> [SKIP][31] ([fdo#111827]) +8 similar issues
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg1-6/igt@[email protected]

* igt@kms_chamelium@hdmi-hpd-fast:
- fi-icl-u2: NOTRUN -> [SKIP][32] ([fdo#111827]) +8 similar issues
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/fi-icl-u2/igt@[email protected]
- bat-dg1-5: NOTRUN -> [SKIP][33] ([fdo#111827]) +8 similar issues
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg1-5/igt@[email protected]

* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
- bat-dg1-6: NOTRUN -> [SKIP][34] ([i915#4103] / [i915#4213]) +1 similar issue
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg1-6/igt@[email protected]

* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- fi-icl-u2: NOTRUN -> [SKIP][35] ([fdo#109278]) +2 similar issues
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/fi-icl-u2/igt@[email protected]
- bat-dg1-5: NOTRUN -> [SKIP][36] ([i915#4103] / [i915#4213]) +1 similar issue
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg1-5/igt@[email protected]

* igt@kms_flip@basic-flip-vs-dpms:
- bat-dg1-5: NOTRUN -> [SKIP][37] ([i915#4078]) +23 similar issues
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg1-5/igt@[email protected]

* igt@kms_force_connector_basic@force-load-detect:
- bat-dg1-6: NOTRUN -> [SKIP][38] ([fdo#109285])
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg1-6/igt@[email protected]
- bat-dg1-5: NOTRUN -> [SKIP][39] ([fdo#109285])
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg1-5/igt@[email protected]
- fi-icl-u2: NOTRUN -> [SKIP][40] ([fdo#109285])
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/fi-icl-u2/igt@[email protected]

* igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-c:
- bat-dg1-5: NOTRUN -> [SKIP][41] ([i915#4078] / [i915#5341])
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg1-5/igt@[email protected]
- fi-ilk-650: NOTRUN -> [SKIP][42] ([fdo#109271] / [i915#5341])
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/fi-ilk-650/igt@[email protected]

* igt@kms_psr@primary_page_flip:
- bat-dg1-5: NOTRUN -> [SKIP][43] ([i915#1072] / [i915#4078]) +3 similar issues
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg1-5/igt@kms_psr@primary_page_flip.html

* igt@kms_psr@sprite_plane_onoff:
- bat-dg1-6: NOTRUN -> [SKIP][44] ([i915#1072] / [i915#4078]) +3 similar issues
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg1-6/igt@kms_psr@sprite_plane_onoff.html

* igt@kms_setmode@basic-clone-single-crtc:
- fi-icl-u2: NOTRUN -> [SKIP][45] ([i915#3555])
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/fi-icl-u2/igt@[email protected]
- bat-dg1-6: NOTRUN -> [SKIP][46] ([i915#3555])
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg1-6/igt@[email protected]
- bat-dg1-5: NOTRUN -> [SKIP][47] ([i915#3555])
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg1-5/igt@[email protected]

* igt@prime_vgem@basic-fence-mmap:
- bat-dg1-5: NOTRUN -> [SKIP][48] ([i915#3708] / [i915#4077]) +1 similar issue
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg1-5/igt@[email protected]

* igt@prime_vgem@basic-gtt:
- bat-dg1-6: NOTRUN -> [SKIP][49] ([i915#3708] / [i915#4077]) +1 similar issue
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg1-6/igt@[email protected]

* igt@prime_vgem@basic-userptr:
- fi-icl-u2: NOTRUN -> [SKIP][50] ([i915#3301])
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/fi-icl-u2/igt@[email protected]
- bat-dg1-6: NOTRUN -> [SKIP][51] ([i915#3708] / [i915#4873])
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg1-6/igt@[email protected]
- bat-dg1-5: NOTRUN -> [SKIP][52] ([i915#3708] / [i915#4873])
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg1-5/igt@[email protected]

* igt@prime_vgem@basic-write:
- bat-dg1-5: NOTRUN -> [SKIP][53] ([i915#3708]) +3 similar issues
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg1-5/igt@[email protected]
- bat-dg1-6: NOTRUN -> [SKIP][54] ([i915#3708]) +3 similar issues
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg1-6/igt@[email protected]

* igt@runner@aborted:
- bat-dg1-5: NOTRUN -> [FAIL][55] ([i915#4312])
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg1-5/igt@[email protected]
- fi-bdw-5557u: NOTRUN -> [FAIL][56] ([i915#4312])
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/fi-bdw-5557u/igt@[email protected]
- bat-adlp-4: NOTRUN -> [FAIL][57] ([i915#5457])
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-adlp-4/igt@[email protected]
- bat-dg1-6: NOTRUN -> [FAIL][58] ([i915#4312])
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/bat-dg1-6/igt@[email protected]

#### Possible fixes ####

* igt@i915_selftest@live@gt_heartbeat:
- fi-skl-guc: [DMESG-FAIL][59] -> [PASS][60]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11497/fi-skl-guc/igt@i915_selftest@live@gt_heartbeat.html
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/fi-skl-guc/igt@i915_selftest@live@gt_heartbeat.html

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1155]: https://gitlab.freedesktop.org/drm/intel/issues/1155
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#3003]: https://gitlab.freedesktop.org/drm/intel/issues/3003
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
[i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3576]: https://gitlab.freedesktop.org/drm/intel/issues/3576
[i915#3595]: https://gitlab.freedesktop.org/drm/intel/issues/3595
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
[i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
[i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213
[i915#4215]: https://gitlab.freedesktop.org/drm/intel/issues/4215
[i915#4303]: https://gitlab.freedesktop.org/drm/intel/issues/4303
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4785]: https://gitlab.freedesktop.org/drm/intel/issues/4785
[i915#4873]: https://gitlab.freedesktop.org/drm/intel/issues/4873
[i915#4897]: https://gitlab.freedesktop.org/drm/intel/issues/4897
[i915#5171]: https://gitlab.freedesktop.org/drm/intel/issues/5171
[i915#5174]: https://gitlab.freedesktop.org/drm/intel/issues/5174
[i915#5190]: https://gitlab.freedesktop.org/drm/intel/issues/5190
[i915#5193]: https://gitlab.freedesktop.org/drm/intel/issues/5193
[i915#5274]: https://gitlab.freedesktop.org/drm/intel/issues/5274
[i915#5275]: https://gitlab.freedesktop.org/drm/intel/issues/5275
[i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
[i915#5341]: https://gitlab.freedesktop.org/drm/intel/issues/5341
[i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
[i915#5457]: https://gitlab.freedesktop.org/drm/intel/issues/5457
[i915#5606]: https://gitlab.freedesktop.org/drm/intel/issues/5606
[i915#5608]: https://gitlab.freedesktop.org/drm/intel/issues/5608
[i915#5634]: https://gitlab.freedesktop.org/drm/intel/issues/5634

Build changes
-------------

* Linux: CI_DRM_11497 -> Patchwork_102667v1

CI-20190529: 20190529
CI_DRM_11497: d883cffbf2383a96420fd6dc099056295de24a12 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_6420: a3885810ccc0ce9e6552a20c910a0a322eca466c @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_102667v1: d883cffbf2383a96420fd6dc099056295de24a12 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

e40dfdda26a0 drm/i915/dg2: Enable Wa_22012727170/Wa_22012727685 71e6e29db3c0 drm/i915/dg2: Enable Wa_14014475959 - RCS / CCS context exit 0a82ca52e194 drm/i915/guc: Apply Wa_16011777198
0197385736ad drm/i915/guc: Enable GuC based workarounds for DG2 ef8a08aee138 drm/i915: Add Wa_22011802037 force cs halt e9160a97bbe7 drm/i915: Xe_HP SDV and DG2 have 4 CCS engines 3254062a54cc drm/i915/xehp: Add compute engine ABI 7d91fc2ee596 drm/i915/guc: Update to GuC version 70.1.1 caeefa09d477 drm/i915/guc: Update scheduling policies to new GuC API 3eea8978a5dd drm/i915/guc: Update context registration to new GuC API

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102667v1/index.html