Skip to contentSkip to conversation

drm/i915/xelpmp: Add Wa_16021867713

PATCH Superseded Gustavo Sousa 2 participants 3 messages Nov 6, 2023

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915/xelpmp: Add Wa_16021867713

This workaround applies to all steppings of Xe_LPM+. Implement the KMD part.

---
 drivers/gpu/drm/i915/gt/intel_engine_regs.h |  3 +++
 drivers/gpu/drm/i915/gt/intel_workarounds.c | 14 ++++++++++++++
 2 files changed, 17 insertions(+)
drivers/gpu/drm/i915/gt/intel_engine_regs.h +3 -0
index c0c8c12edea1..7060ce4fe058 100644
@@ -260,6 +260,9 @@
 #define VDBOX_CGCTL3F10(base)			_MMIO((base) + 0x3f10)
 #define   IECPUNIT_CLKGATE_DIS			REG_BIT(22)
 
+#define VDBOX_CGCTL3F1C(base)			_MMIO((base) + 0x3f1c)
+#define   MFXPIPE_CLKGATE_DIS			REG_BIT(3)
+
 #define VDBOX_CGCTL3F18(base)			_MMIO((base) + 0x3f18)
 #define   ALNUNIT_CLKGATE_DIS			REG_BIT(13)
 
drivers/gpu/drm/i915/gt/intel_workarounds.c +14 -0
index 12859b8d2092..63205edfea50 100644
@@ -1662,9 +1662,23 @@ xelpg_gt_workarounds_init(struct intel_gt *gt, struct i915_wa_list *wal)
 	debug_dump_steering(gt);
 }
 
+static void
+wa_16021867713(struct intel_gt *gt, struct i915_wa_list *wal)
+{
+	struct intel_engine_cs *engine;
+	int id;
+
+	for_each_engine(engine, gt, id)
+		if (engine->class == VIDEO_DECODE_CLASS)
+			wa_write_or(wal, VDBOX_CGCTL3F1C(engine->mmio_base),
+				    MFXPIPE_CLKGATE_DIS);
+}
+
 static void
 xelpmp_gt_workarounds_init(struct intel_gt *gt, struct i915_wa_list *wal)
 {
+	wa_16021867713(gt, wal);
+
 	/*
 	 * Wa_14018778641
 	 * Wa_18018781329
Signature · 1 line
2.42.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 14 lines · Gustavo Sousa

This workaround applies to all steppings of Xe_LPM+. Implement the KMD part.

---
 drivers/gpu/drm/i915/gt/intel_engine_regs.h |  3 +++
 drivers/gpu/drm/i915/gt/intel_workarounds.c | 14 ++++++++++++++
 2 files changed, 17 insertions(+)
drivers/gpu/drm/i915/gt/intel_engine_regs.h +0 -0
index c0c8c12edea1..7060ce4fe058 100644

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

Quoted 8 lines
drivers/gpu/drm/i915/gt/intel_engine_regs.h +3 -0
@@ -260,6 +260,9 @@
 #define VDBOX_CGCTL3F10(base)			_MMIO((base) + 0x3f10)
 #define   IECPUNIT_CLKGATE_DIS			REG_BIT(22)
 
+#define VDBOX_CGCTL3F1C(base)			_MMIO((base) + 0x3f1c)
+#define   MFXPIPE_CLKGATE_DIS			REG_BIT(3)
+
 #define VDBOX_CGCTL3F18(base)			_MMIO((base) + 0x3f18)
 #define   ALNUNIT_CLKGATE_DIS			REG_BIT(13)

Nitpick: 3f1c should be sorted after 3f18 to keep the registers in order.

Aside from that,

Quoted 32 lines
drivers/gpu/drm/i915/gt/intel_workarounds.c +14 -0
index 12859b8d2092..63205edfea50 100644
@@ -1662,9 +1662,23 @@ xelpg_gt_workarounds_init(struct intel_gt *gt, struct i915_wa_list *wal)
 	debug_dump_steering(gt);
 }
 
+static void
+wa_16021867713(struct intel_gt *gt, struct i915_wa_list *wal)
+{
+	struct intel_engine_cs *engine;
+	int id;
+
+	for_each_engine(engine, gt, id)
+		if (engine->class == VIDEO_DECODE_CLASS)
+			wa_write_or(wal, VDBOX_CGCTL3F1C(engine->mmio_base),
+				    MFXPIPE_CLKGATE_DIS);
+}
+
 static void
 xelpmp_gt_workarounds_init(struct intel_gt *gt, struct i915_wa_list *wal)
 {
+	wa_16021867713(gt, wal);
+
 	/*
 	 * Wa_14018778641
 	 * Wa_18018781329
Signature · 1 line
2.42.0
Signature · 4 lines
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
#2 lore raw

Quoting Matt Roper (2023-11-06 17:07:21-03:00)

Quoted 18 lines · Gustavo Sousa
Quoted 17 lines

This workaround applies to all steppings of Xe_LPM+. Implement the KMD part.

---
 drivers/gpu/drm/i915/gt/intel_engine_regs.h |  3 +++
 drivers/gpu/drm/i915/gt/intel_workarounds.c | 14 ++++++++++++++
 2 files changed, 17 insertions(+)
drivers/gpu/drm/i915/gt/intel_engine_regs.h +0 -0
index c0c8c12edea1..7060ce4fe058 100644
@@ -260,6 +260,9 @@
 #define VDBOX_CGCTL3F10(base)                        _MMIO((base) + 0x3f10)
 #define   IECPUNIT_CLKGATE_DIS                        REG_BIT(22)
 
Quoted 8 lines

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

Quoted 5 lines
drivers/gpu/drm/i915/gt/intel_engine_regs.h +3 -0
+#define VDBOX_CGCTL3F1C(base)                        _MMIO((base) + 0x3f1c)
+#define   MFXPIPE_CLKGATE_DIS                        REG_BIT(3)
+
 #define VDBOX_CGCTL3F18(base)                        _MMIO((base) + 0x3f18)
 #define   ALNUNIT_CLKGATE_DIS                        REG_BIT(13)

Nitpick: 3f1c should be sorted after 3f18 to keep the registers in order.

Oops.

Quoted 4 lines

Aside from that,

Thanks! I just sent a v2.

--
Gustavo Sousa

Quoted 40 lines
Quoted 34 lines
drivers/gpu/drm/i915/gt/intel_workarounds.c +14 -0
index 12859b8d2092..63205edfea50 100644
@@ -1662,9 +1662,23 @@ xelpg_gt_workarounds_init(struct intel_gt *gt, struct i915_wa_list *wal)
         debug_dump_steering(gt);
 }
 
+static void
+wa_16021867713(struct intel_gt *gt, struct i915_wa_list *wal)
+{
+        struct intel_engine_cs *engine;
+        int id;
+
+        for_each_engine(engine, gt, id)
+                if (engine->class == VIDEO_DECODE_CLASS)
+                        wa_write_or(wal, VDBOX_CGCTL3F1C(engine->mmio_base),
+                                    MFXPIPE_CLKGATE_DIS);
+}
+
 static void
 xelpmp_gt_workarounds_init(struct intel_gt *gt, struct i915_wa_list *wal)
 {
+        wa_16021867713(gt, wal);
+
         /*
          * Wa_14018778641
          * Wa_18018781329
Signature · 1 line
2.42.0
Signature · 4 lines
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation