Skip to contentSkip to conversation

More MTL WA and powerwell patches

PATCH Superseded Radhakrishna Sripada 5 participants 13 messages Mar 16, 2023 – Apr 20, 2023

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover More MTL WA and powerwell patches

This series adds 2 MTL WA's, 2 patches to fix re-use "DC off" power wells and another patch to sync BIOS and driver for C6 enabling.

Haridhar Kalvala (1):
drm/i915/mtl: WA to clear RDOP clock gating

Madhumitha Tolakanahalli Pradeep (1):
drm/i915/mtl: Extend Wa_22011802037 to MTL A-step

Matt Roper (2):
drm/i915: Use separate "DC off" power well for ADL-P and DG2 drm/i915/mtl: Re-use ADL-P's "DC off" power well

Vinay Belgaumkar (1):
drm/i915/mtl: Synchronize i915/BIOS on C6 enabling

 .../i915/display/intel_display_power_map.c    | 57 +++++++++++++------
 drivers/gpu/drm/i915/gt/intel_rc6.c           | 21 +++++++
 drivers/gpu/drm/i915/gt/intel_rc6_types.h     |  1 +
 drivers/gpu/drm/i915/gt/intel_workarounds.c   |  3 +
 .../gpu/drm/i915/gt/uc/intel_guc_submission.c |  4 +-
 5 files changed, 67 insertions(+), 19 deletions(-)
Signature · 1 line
2.34.1
#1 lore raw

PATCH 1/5 drm/i915: Use separate "DC off" power well for ADL-P and DG2

From: Matt Roper <[email protected]>

Although ADL-P and DG2 both use the same general power well setup, the DC5/DC6 requirements are slightly different which means each platform should have its own "DC off" power well.

DG2 (i.e., Xe_HPD IP) requires that DC5 be disabled whenever PG2 is active. However ADL-P (i.e., Xe_LPD IP) only requires DC5/DC6 to be disabled when the PGC or PGD subwells are active; we should be able to remain in these DC states when PGB and general PG2 functionality is in use.

Bspec: 49193

---
 .../i915/display/intel_display_power_map.c    | 41 +++++++++++++++++--
 1 file changed, 38 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/display/intel_display_power_map.c +38 -3
index 6645eb1911d8..d9e02cc9cf3c 100644
@@ -1301,7 +1301,8 @@ I915_DECL_PW_DOMAINS(xelpd_pwdoms_pw_2,
  */
 
 I915_DECL_PW_DOMAINS(xelpd_pwdoms_dc_off,
-	XELPD_PW_2_POWER_DOMAINS,
+	XELPD_PW_C_POWER_DOMAINS,
+	XELPD_PW_D_POWER_DOMAINS,
 	POWER_DOMAIN_PORT_DSI,
 	POWER_DOMAIN_AUDIO_MMIO,
 	POWER_DOMAIN_AUX_A,
@@ -1310,14 +1311,38 @@ I915_DECL_PW_DOMAINS(xelpd_pwdoms_dc_off,
 	POWER_DOMAIN_DC_OFF,
 	POWER_DOMAIN_INIT);
 
-static const struct i915_power_well_desc xelpd_power_wells_main[] = {
+static const struct i915_power_well_desc xelpd_power_wells_dcoff[] = {
 	{
 		.instances = &I915_PW_INSTANCES(
 			I915_PW("DC_off", &xelpd_pwdoms_dc_off,
 				.id = SKL_DISP_DC_OFF),
 		),
 		.ops = &gen9_dc_off_power_well_ops,
-	}, {
+	}
+};
+
+I915_DECL_PW_DOMAINS(xehpd_pwdoms_dc_off,
+	XELPD_PW_2_POWER_DOMAINS,
+	POWER_DOMAIN_PORT_DSI,
+	POWER_DOMAIN_AUDIO_MMIO,
+	POWER_DOMAIN_AUX_A,
+	POWER_DOMAIN_AUX_B,
+	POWER_DOMAIN_MODESET,
+	POWER_DOMAIN_DC_OFF,
+	POWER_DOMAIN_INIT);
+
+static const struct i915_power_well_desc xehpd_power_wells_dcoff[] = {
+	{
+		.instances = &I915_PW_INSTANCES(
+			I915_PW("DC_off", &xehpd_pwdoms_dc_off,
+				.id = SKL_DISP_DC_OFF),
+		),
+		.ops = &gen9_dc_off_power_well_ops,
+	}
+};
+
+static const struct i915_power_well_desc xelpd_power_wells_main[] = {
+	{
 		.instances = &I915_PW_INSTANCES(
 			I915_PW("PW_2", &xelpd_pwdoms_pw_2,
 				.hsw.idx = ICL_PW_CTL_IDX_PW_2,
@@ -1400,6 +1425,14 @@ static const struct i915_power_well_desc xelpd_power_wells_main[] = {
 static const struct i915_power_well_desc_list xelpd_power_wells[] = {
 	I915_PW_DESCRIPTORS(i9xx_power_wells_always_on),
 	I915_PW_DESCRIPTORS(icl_power_wells_pw_1),
+	I915_PW_DESCRIPTORS(xelpd_power_wells_dcoff),
+	I915_PW_DESCRIPTORS(xelpd_power_wells_main),
+};
+
+static const struct i915_power_well_desc_list xehpd_power_wells[] = {
+	I915_PW_DESCRIPTORS(i9xx_power_wells_always_on),
+	I915_PW_DESCRIPTORS(icl_power_wells_pw_1),
+	I915_PW_DESCRIPTORS(xehpd_power_wells_dcoff),
 	I915_PW_DESCRIPTORS(xelpd_power_wells_main),
 };
 
@@ -1624,6 +1657,8 @@ int intel_display_power_map_init(struct i915_power_domains *power_domains)
 
 	if (DISPLAY_VER(i915) >= 14)
 		return set_power_wells(power_domains, xelpdp_power_wells);
+	else if (IS_DG2(i915))
+		return set_power_wells(power_domains, xehpd_power_wells);
 	else if (DISPLAY_VER(i915) >= 13)
 		return set_power_wells(power_domains, xelpd_power_wells);
 	else if (IS_DG1(i915))
Signature · 1 line
2.34.1
Reviewed-by on v1 1/5
#2 lore raw

Re: [Intel-gfx] [PATCH 1/5] drm/i915: Use separate "DC off" power well for ADL-P and DG2

Quoted 34 lines · Radhakrishna Sripada

From: Matt Roper <[email protected]>

Although ADL-P and DG2 both use the same general power well setup, the DC5/DC6 requirements are slightly different which means each platform should have its own "DC off" power well.

DG2 (i.e., Xe_HPD IP) requires that DC5 be disabled whenever PG2 is active. However ADL-P (i.e., Xe_LPD IP) only requires DC5/DC6 to be disabled when the PGC or PGD subwells are active; we should be able to remain in these DC states when PGB and general PG2 functionality is in use.

Bspec: 49193

---
 .../i915/display/intel_display_power_map.c    | 41 +++++++++++++++++--
 1 file changed, 38 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/display/intel_display_power_map.c +2 -1
index 6645eb1911d8..d9e02cc9cf3c 100644
@@ -1301,7 +1301,8 @@ I915_DECL_PW_DOMAINS(xelpd_pwdoms_pw_2,
  */
 
 I915_DECL_PW_DOMAINS(xelpd_pwdoms_dc_off,
-	XELPD_PW_2_POWER_DOMAINS,
+	XELPD_PW_C_POWER_DOMAINS,
+	XELPD_PW_D_POWER_DOMAINS,
 	POWER_DOMAIN_PORT_DSI,
 	POWER_DOMAIN_AUDIO_MMIO,
 	POWER_DOMAIN_AUX_A,

drivers/gpu/drm/i915/display/intel_display_power_map.c I915_DECL_PW_DOMAINS(xelpd_pwdoms_dc_off, · line 1314

Quoted 5 lines
drivers/gpu/drm/i915/display/intel_display_power_map.c +1 -1
@@ -1310,14 +1311,38 @@ I915_DECL_PW_DOMAINS(xelpd_pwdoms_dc_off,
 	POWER_DOMAIN_DC_OFF,
 	POWER_DOMAIN_INIT);
 
-static const struct i915_power_well_desc xelpd_power_wells_main[] = {
+static const struct i915_power_well_desc xelpd_power_wells_dcoff[] = {

Nit: Here and in the xehpd defintion, s/dcoff/dc_off/ to match other platforms.

Quoted 19 lines
drivers/gpu/drm/i915/display/intel_display_power_map.c +12 -1
 	{
 		.instances = &I915_PW_INSTANCES(
 			I915_PW("DC_off", &xelpd_pwdoms_dc_off,
 				.id = SKL_DISP_DC_OFF),
 		),
 		.ops = &gen9_dc_off_power_well_ops,
-	}, {
+	}
+};
+
+I915_DECL_PW_DOMAINS(xehpd_pwdoms_dc_off,
+	XELPD_PW_2_POWER_DOMAINS,
+	POWER_DOMAIN_PORT_DSI,
+	POWER_DOMAIN_AUDIO_MMIO,
+	POWER_DOMAIN_AUX_A,
+	POWER_DOMAIN_AUX_B,
+	POWER_DOMAIN_MODESET,
+	POWER_DOMAIN_DC_OFF,
+	POWER_DOMAIN_INIT);

drivers/gpu/drm/i915/display/intel_display_power_map.c I915_DECL_PW_DOMAINS(xelpd_pwdoms_dc_off, · line 1342

Quoted 10 lines
drivers/gpu/drm/i915/display/intel_display_power_map.c +10 -0
+
+static const struct i915_power_well_desc xehpd_power_wells_dcoff[] = {
+	{
+		.instances = &I915_PW_INSTANCES(
+			I915_PW("DC_off", &xehpd_pwdoms_dc_off,
+				.id = SKL_DISP_DC_OFF),
+		),
+		.ops = &gen9_dc_off_power_well_ops,
+	}
+};

Could you move the xehpd definitions to precede xehpd_power_wells[]?

Patches 1, 2 look ok to me:

Quoted 33 lines
drivers/gpu/drm/i915/display/intel_display_power_map.c +13 -0
+
+static const struct i915_power_well_desc xelpd_power_wells_main[] = {
+	{
 		.instances = &I915_PW_INSTANCES(
 			I915_PW("PW_2", &xelpd_pwdoms_pw_2,
 				.hsw.idx = ICL_PW_CTL_IDX_PW_2,
@@ -1400,6 +1425,14 @@ static const struct i915_power_well_desc xelpd_power_wells_main[] = {
 static const struct i915_power_well_desc_list xelpd_power_wells[] = {
 	I915_PW_DESCRIPTORS(i9xx_power_wells_always_on),
 	I915_PW_DESCRIPTORS(icl_power_wells_pw_1),
+	I915_PW_DESCRIPTORS(xelpd_power_wells_dcoff),
+	I915_PW_DESCRIPTORS(xelpd_power_wells_main),
+};
+
+static const struct i915_power_well_desc_list xehpd_power_wells[] = {
+	I915_PW_DESCRIPTORS(i9xx_power_wells_always_on),
+	I915_PW_DESCRIPTORS(icl_power_wells_pw_1),
+	I915_PW_DESCRIPTORS(xehpd_power_wells_dcoff),
 	I915_PW_DESCRIPTORS(xelpd_power_wells_main),
 };
 
@@ -1624,6 +1657,8 @@ int intel_display_power_map_init(struct i915_power_domains *power_domains)
 
 	if (DISPLAY_VER(i915) >= 14)
 		return set_power_wells(power_domains, xelpdp_power_wells);
+	else if (IS_DG2(i915))
+		return set_power_wells(power_domains, xehpd_power_wells);
 	else if (DISPLAY_VER(i915) >= 13)
 		return set_power_wells(power_domains, xelpd_power_wells);
 	else if (IS_DG1(i915))
Signature · 1 line
2.34.1
#3 lore raw

Re: [Intel-gfx] [PATCH 1/5] drm/i915: Use separate "DC off" power well for ADL-P and DG2

Quoted 88 lines

-----Original Message-----
From: Deak, Imre <[email protected]>
Sent: Friday, March 17, 2023 10:43 AM
To: Sripada, Radhakrishna <[email protected]>
Cc: [email protected]; De Marchi, Lucas <[email protected]>
Subject: Re: [Intel-gfx] [PATCH 1/5] drm/i915: Use separate "DC off" power well for ADL-P and DG2

Quoted 12 lines · Radhakrishna Sripada

From: Matt Roper <[email protected]>

Although ADL-P and DG2 both use the same general power well setup, the DC5/DC6 requirements are slightly different which means each platform should have its own "DC off" power well.

DG2 (i.e., Xe_HPD IP) requires that DC5 be disabled whenever PG2 is active. However ADL-P (i.e., Xe_LPD IP) only requires DC5/DC6 to be disabled when the PGC or PGD subwells are active; we should be able to remain in these DC states when PGB and general PG2 functionality is in use.

Review

Quoted 8 lines

Bspec: 49193

---
 .../i915/display/intel_display_power_map.c    | 41 +++++++++++++++++--
 1 file changed, 38 insertions(+), 3 deletions(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/i915/display/intel_display_power_map.c

drivers/gpu/drm/i915/display/intel_display_power_map.c

Quoted 14 lines

index 6645eb1911d8..d9e02cc9cf3c 100644

drivers/gpu/drm/i915/display/intel_display_power_map.c +2 -1
@@ -1301,7 +1301,8 @@ I915_DECL_PW_DOMAINS(xelpd_pwdoms_pw_2,
  */
 
 I915_DECL_PW_DOMAINS(xelpd_pwdoms_dc_off,
-	XELPD_PW_2_POWER_DOMAINS,
+	XELPD_PW_C_POWER_DOMAINS,
+	XELPD_PW_D_POWER_DOMAINS,
 	POWER_DOMAIN_PORT_DSI,
 	POWER_DOMAIN_AUDIO_MMIO,
 	POWER_DOMAIN_AUX_A,
@@ -1310,14 +1311,38 @@

I915_DECL_PW_DOMAINS(xelpd_pwdoms_dc_off,

drivers/gpu/drm/i915/display/intel_display_power_map.c I915_DECL_PW_DOMAINS(xelpd_pwdoms_dc_off, · line 1314

Quoted 5 lines
drivers/gpu/drm/i915/display/intel_display_power_map.c +1 -1
 	POWER_DOMAIN_DC_OFF,
 	POWER_DOMAIN_INIT);
 
-static const struct i915_power_well_desc xelpd_power_wells_main[] = {
+static const struct i915_power_well_desc xelpd_power_wells_dcoff[] = {

Nit: Here and in the xehpd defintion, s/dcoff/dc_off/ to match other platforms.

Quoted 19 lines
drivers/gpu/drm/i915/display/intel_display_power_map.c +12 -1
 	{
 		.instances = &I915_PW_INSTANCES(
 			I915_PW("DC_off", &xelpd_pwdoms_dc_off,
 				.id = SKL_DISP_DC_OFF),
 		),
 		.ops = &gen9_dc_off_power_well_ops,
-	}, {
+	}
+};
+
+I915_DECL_PW_DOMAINS(xehpd_pwdoms_dc_off,
+	XELPD_PW_2_POWER_DOMAINS,
+	POWER_DOMAIN_PORT_DSI,
+	POWER_DOMAIN_AUDIO_MMIO,
+	POWER_DOMAIN_AUX_A,
+	POWER_DOMAIN_AUX_B,
+	POWER_DOMAIN_MODESET,
+	POWER_DOMAIN_DC_OFF,
+	POWER_DOMAIN_INIT);

drivers/gpu/drm/i915/display/intel_display_power_map.c I915_DECL_PW_DOMAINS(xelpd_pwdoms_dc_off, · line 1342

Quoted 10 lines
drivers/gpu/drm/i915/display/intel_display_power_map.c +10 -0
+
+static const struct i915_power_well_desc xehpd_power_wells_dcoff[] = {
+	{
+		.instances = &I915_PW_INSTANCES(
+			I915_PW("DC_off", &xehpd_pwdoms_dc_off,
+				.id = SKL_DISP_DC_OFF),
+		),
+		.ops = &gen9_dc_off_power_well_ops,
+	}
+};

Could you move the xehpd definitions to precede xehpd_power_wells[]?

Quoted 2 lines

Patches 1, 2 look ok to me:

Thank you for the R-b merged Patches 1, 2

- Radhakrishna(RK) Sripada

Quoted 36 lines

drivers/gpu/drm/i915/display/intel_display_power_map.c static const struct i915_power_well_desc

Quoted 8 lines
drivers/gpu/drm/i915/display/intel_display_power_map.c +3 -0
+
+static const struct i915_power_well_desc xelpd_power_wells_main[] = {
+	{
 		.instances = &I915_PW_INSTANCES(
 			I915_PW("PW_2", &xelpd_pwdoms_pw_2,
 				.hsw.idx = ICL_PW_CTL_IDX_PW_2,
@@ -1400,6 +1425,14 @@ static const struct i915_power_well_desc

xelpd_power_wells_main[] = {

drivers/gpu/drm/i915/display/intel_display_power_map.c int intel_display_power_map_init(struct

Quoted 15 lines
drivers/gpu/drm/i915/display/intel_display_power_map.c +8 -0
 static const struct i915_power_well_desc_list xelpd_power_wells[] = {
 	I915_PW_DESCRIPTORS(i9xx_power_wells_always_on),
 	I915_PW_DESCRIPTORS(icl_power_wells_pw_1),
+	I915_PW_DESCRIPTORS(xelpd_power_wells_dcoff),
+	I915_PW_DESCRIPTORS(xelpd_power_wells_main),
+};
+
+static const struct i915_power_well_desc_list xehpd_power_wells[] = {
+	I915_PW_DESCRIPTORS(i9xx_power_wells_always_on),
+	I915_PW_DESCRIPTORS(icl_power_wells_pw_1),
+	I915_PW_DESCRIPTORS(xehpd_power_wells_dcoff),
 	I915_PW_DESCRIPTORS(xelpd_power_wells_main),
 };
 
@@ -1624,6 +1657,8 @@ int intel_display_power_map_init(struct

i915_power_domains *power_domains)

Quoted 11 lines
drivers/gpu/drm/i915/display/intel_display_power_map.c +2 -1
 	if (DISPLAY_VER(i915) >= 14)
 		return set_power_wells(power_domains, xelpdp_power_wells);
+	else if (IS_DG2(i915))
+		return set_power_wells(power_domains, xehpd_power_wells);
 	else if (DISPLAY_VER(i915) >= 13)
 		return set_power_wells(power_domains, xelpd_power_wells);
 	else if (IS_DG1(i915))
--

2.34.1

#4 lore raw

PATCH 2/5 drm/i915/mtl: Re-use ADL-P's "DC off" power well

In reply to Radhakrishna Sripada

From: Matt Roper <[email protected]>

As with ADL-P, MTL's "DC off" power well should be a dependency of the PGC and PGD power wells, not the entire PG2 well. In fact, the DC5/DC6 requirements between the two platforms are the same, so the Xe_LPD "DC off" well definition can just be re-used for Xe_LPD+.

Bspec: 49193

---
 .../drm/i915/display/intel_display_power_map.c   | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)
drivers/gpu/drm/i915/display/intel_display_power_map.c +1 -15
index d9e02cc9cf3c..452b6cbdfd98 100644
@@ -1456,15 +1456,6 @@ I915_DECL_PW_DOMAINS(xelpdp_pwdoms_pw_2,
 	XELPDP_PW_2_POWER_DOMAINS,
 	POWER_DOMAIN_INIT);
 
-I915_DECL_PW_DOMAINS(xelpdp_pwdoms_dc_off,
-	XELPDP_PW_2_POWER_DOMAINS,
-	POWER_DOMAIN_AUDIO_MMIO,
-	POWER_DOMAIN_MODESET,
-	POWER_DOMAIN_AUX_A,
-	POWER_DOMAIN_AUX_B,
-	POWER_DOMAIN_DC_OFF,
-	POWER_DOMAIN_INIT);
-
 I915_DECL_PW_DOMAINS(xelpdp_pwdoms_aux_tc1,
 	POWER_DOMAIN_AUX_USBC1,
 	POWER_DOMAIN_AUX_TBT1);
@@ -1483,12 +1474,6 @@ I915_DECL_PW_DOMAINS(xelpdp_pwdoms_aux_tc4,
 
 static const struct i915_power_well_desc xelpdp_power_wells_main[] = {
 	{
-		.instances = &I915_PW_INSTANCES(
-			I915_PW("DC_off", &xelpdp_pwdoms_dc_off,
-				.id = SKL_DISP_DC_OFF),
-		),
-		.ops = &gen9_dc_off_power_well_ops,
-	}, {
 		.instances = &I915_PW_INSTANCES(
 			I915_PW("PW_2", &xelpdp_pwdoms_pw_2,
 				.hsw.idx = ICL_PW_CTL_IDX_PW_2,
@@ -1545,6 +1530,7 @@ static const struct i915_power_well_desc xelpdp_power_wells_main[] = {
 static const struct i915_power_well_desc_list xelpdp_power_wells[] = {
 	I915_PW_DESCRIPTORS(i9xx_power_wells_always_on),
 	I915_PW_DESCRIPTORS(icl_power_wells_pw_1),
+	I915_PW_DESCRIPTORS(xelpd_power_wells_dcoff),
 	I915_PW_DESCRIPTORS(xelpdp_power_wells_main),
 };
 
Signature · 1 line
2.34.1
#5 lore raw

PATCH 3/5 drm/i915/mtl: Extend Wa_22011802037 to MTL A-step

In reply to Radhakrishna Sripada

From: Madhumitha Tolakanahalli Pradeep <[email protected]>

Wa_22011802037 was being applied to all graphics_ver 11 & 12. This patch updates the if statement to apply the W/A to right platforms and extends it to MTL-M:A0.

---
 drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +3 -1
index 88e881b100cf..e8c4fb9c4901 100644
@@ -1629,7 +1629,9 @@ static void guc_reset_state(struct intel_context *ce, u32 head, bool scrub)
 
 static void guc_engine_reset_prepare(struct intel_engine_cs *engine)
 {
-	if (!IS_GRAPHICS_VER(engine->i915, 11, 12))
+	if (!(IS_MTL_GRAPHICS_STEP(engine->i915, M, STEP_A0, STEP_B0) ||
+	    (GRAPHICS_VER(engine->i915) >= 11 &&
+	     GRAPHICS_VER_FULL(engine->i915) < IP_VER(12, 70))))
 		return;
 
 	intel_engine_stop_cs(engine);
Signature · 1 line
2.34.1
#6 lore raw

PATCH 1/1 drm/i915/mtl: Extend Wa_22011802037 to MTL A-step

From: Madhumitha Tolakanahalli Pradeep <[email protected]>

Wa_22011802037 was being applied to all graphics_ver 11 & 12. This patch updates the if statement to apply the W/A to right platforms and extends it to MTL-M:A0.

v1.1: Fix checkpatch warning.

---
 drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +3 -1
index 88e881b100cf..a099406dcc38 100644
@@ -1629,7 +1629,9 @@ static void guc_reset_state(struct intel_context *ce, u32 head, bool scrub)
 
 static void guc_engine_reset_prepare(struct intel_engine_cs *engine)
 {
-	if (!IS_GRAPHICS_VER(engine->i915, 11, 12))
+	if (!(IS_MTL_GRAPHICS_STEP(engine->i915, M, STEP_A0, STEP_B0) ||
+	      (GRAPHICS_VER(engine->i915) >= 11 &&
+	       GRAPHICS_VER_FULL(engine->i915) < IP_VER(12, 70))))
 		return;
 
 	intel_engine_stop_cs(engine);
Signature · 1 line
2.34.1
#7 lore raw

Re: [Intel-gfx] [PATCH dii-client v1.1] drm/i915/mtl: Extend Wa_22011802037 to MTL A-step

Quoted 5 lines · Radhakrishna Sripada

From: Madhumitha Tolakanahalli Pradeep <[email protected]>

Wa_22011802037 was being applied to all graphics_ver 11 & 12. This patch updates the if statement to apply the W/A to right platforms and extends it to MTL-M:A0.

it should be any A stepping, not just A0. But the code is correct, it's only here that is wrong.

btw wrong subject-prefix here, not sure CI will pick it up for execution.

Quoted 14 lines

v1.1: Fix checkpatch warning.

---
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 4 +++-

1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +0 -0
index 88e881b100cf..a099406dcc38 100644

drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c static void guc_reset_state(struct intel_context *ce, u32 head, bool scrub) · line 1634

Quoted 7 lines
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +3 -1
@@ -1629,7 +1629,9 @@ static void guc_reset_state(struct intel_context *ce, u32 head, bool scrub)
 
 static void guc_engine_reset_prepare(struct intel_engine_cs *engine)
 {
-	if (!IS_GRAPHICS_VER(engine->i915, 11, 12))
+	if (!(IS_MTL_GRAPHICS_STEP(engine->i915, M, STEP_A0, STEP_B0) ||
+	      (GRAPHICS_VER(engine->i915) >= 11 &&
+	       GRAPHICS_VER_FULL(engine->i915) < IP_VER(12, 70))))

the double negation + parenthesis + line wrap make it hard to read. It seems that in commit 0667429ce68e ("drm/i915/reset: Add additional steps for Wa_22011802037 for execlist backend") the Wa comment got misplaced as the call to intel_engine_stop_cs() is part of the Wa handling, no?

+Umesh

Maybe let's change to a positive check and move the Wa comment to be above the check?

	static void guc_engine_reset_prepare(struct intel_engine_cs *engine)
	{
		/*
		 * Wa_22011802037: stop the cs and wait for any pending mi force
		 * wakeups
		 */
		if (IS_MTL_GRAPHICS_STEP(gt->i915, M, STEP_A0, STEP_B0) ||
		    (GRAPHICS_VER(gt->i915) >= 11 &&
		     GRAPHICS_VER_FULL(gt->i915) < IP_VER(12, 70))) {
			 intel_engine_stop_cs(engine);
			 intel_engine_wait_for_pending_mi_fw(engine);
		}
	}

This matches the condition checked everywhere else in the driver:

	$ git grep Wa_22011802037
	drivers/gpu/drm/i915/gt/intel_engine_cs.c:       * Wa_22011802037: Prior to doing a reset, ensure CS is
	drivers/gpu/drm/i915/gt/intel_engine_cs.c: * Wa_22011802037:gen12: In addition to stopping the cs, we need to wait for any
	drivers/gpu/drm/i915/gt/intel_execlists_submission.c:    * Wa_22011802037: In addition to stopping the cs, we need
	drivers/gpu/drm/i915/gt/uc/intel_guc.c: /* Wa_22011802037: graphics version 11/12 */
	drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c:       * Wa_22011802037: In addition to stopping the cs, we need

Btw then comments about graphics versions didn't age well: they are not matching the code anymore

Lucas De Marchi

#8 lore raw

PATCH 4/5 drm/i915/mtl: Synchronize i915/BIOS on C6 enabling

In reply to Radhakrishna Sripada

From: Vinay Belgaumkar <[email protected]>

If BIOS enables/disables C6, i915 should do the same. Also, retain this value across driver reloads. This is needed only for MTL as of now due to an existing bug in OA which needs C6 disabled for it to function. BIOS behavior is also different across platforms in terms of how C6 is enabled.

v2: Review comments (Umesh)
v3: Cache the C6 enable value for all MTL. The OA WA is needed only for A/B step, but we don't need to check for that here.
v4: Rename to mtl_check_bios_c6_setup()

---
 drivers/gpu/drm/i915/gt/intel_rc6.c       | 21 +++++++++++++++++++++
 drivers/gpu/drm/i915/gt/intel_rc6_types.h |  1 +
 2 files changed, 22 insertions(+)
drivers/gpu/drm/i915/gt/intel_rc6.c +21 -0
index f4150f61f39c..517d14e29aac 100644
@@ -420,6 +420,15 @@ static void vlv_rc6_enable(struct intel_rc6 *rc6)
 	    GEN7_RC_CTL_TO_MODE | VLV_RC_CTL_CTX_RST_PARALLEL;
 }
 
+static bool mtl_check_bios_c6_setup(struct intel_rc6 *rc6)
+{
+	struct intel_uncore *uncore = rc6_to_uncore(rc6);
+
+	rc6->bios_rc_state = intel_uncore_read(uncore, GEN6_RC_STATE);
+
+	return rc6->bios_rc_state & RC_SW_TARGET_STATE_MASK;
+}
+
 static bool bxt_check_bios_rc6_setup(struct intel_rc6 *rc6)
 {
 	struct intel_uncore *uncore = rc6_to_uncore(rc6);
@@ -503,6 +512,13 @@ static bool rc6_supported(struct intel_rc6 *rc6)
 		return false;
 	}
 
+	if (IS_METEORLAKE(gt->i915) &&
+	    !mtl_check_bios_c6_setup(rc6)) {
+		drm_notice(&i915->drm,
+			   "C6 disabled by BIOS\n");
+		return false;
+	}
+
 	if (IS_MTL_MEDIA_STEP(gt->i915, STEP_A0, STEP_B0) &&
 	    gt->type == GT_MEDIA) {
 		drm_notice(&i915->drm,
@@ -707,9 +723,14 @@ void intel_rc6_disable(struct intel_rc6 *rc6)
 void intel_rc6_fini(struct intel_rc6 *rc6)
 {
 	struct drm_i915_gem_object *pctx;
+	struct intel_uncore *uncore = rc6_to_uncore(rc6);
 
 	intel_rc6_disable(rc6);
 
+	/* We want the BIOS C6 state preserved across loads for MTL */
+	if (IS_METEORLAKE(rc6_to_i915(rc6)))
+		set(uncore, GEN6_RC_STATE, rc6->bios_rc_state);
+
 	pctx = fetch_and_zero(&rc6->pctx);
 	if (pctx)
 		i915_gem_object_put(pctx);
drivers/gpu/drm/i915/gt/intel_rc6_types.h +1 -0
index fa23c4dce00b..57bb437bcbbd 100644
@@ -29,6 +29,7 @@ struct intel_rc6 {
 	u64 cur_residency[INTEL_RC6_RES_MAX];
 
 	u32 ctl_enable;
+	u32 bios_rc_state;
 
 	struct drm_i915_gem_object *pctx;
 
Signature · 1 line
2.34.1
#9 lore raw

Re: [Intel-gfx] [PATCH 4/5] drm/i915/mtl: Synchronize i915/BIOS on C6 enabling

Quoted 8 lines · Radhakrishna Sripada

From: Vinay Belgaumkar <[email protected]>

If BIOS enables/disables C6, i915 should do the same. Also, retain this value across driver reloads. This is needed only for MTL as of now due to an existing bug in OA which needs C6 disabled for it to function. BIOS behavior is also different across platforms in terms of how C6 is enabled.

Quoted 7 lines

v2: Review comments (Umesh)
v3: Cache the C6 enable value for all MTL. The OA WA is needed only for A/B step, but we don't need to check for that here.
v4: Rename to mtl_check_bios_c6_setup()

This one's already pushed with the MTL OA series.

Regards,
Umesh

#10 lore raw

Re: [Intel-gfx] [PATCH 4/5] drm/i915/mtl: Synchronize i915/BIOS on C6 enabling

Quoted 14 lines · Umesh Nerlige Ramappa
Quoted 13 lines · Radhakrishna Sripada

From: Vinay Belgaumkar <[email protected]>

If BIOS enables/disables C6, i915 should do the same. Also, retain this value across driver reloads. This is needed only for MTL as of now due to an existing bug in OA which needs C6 disabled for it to function. BIOS behavior is also different across platforms in terms of how C6 is enabled.

v2: Review comments (Umesh)
v3: Cache the C6 enable value for all MTL. The OA WA is needed only for A/B step, but we don't need to check for that here.
v4: Rename to mtl_check_bios_c6_setup()

Quoted 4 lines
Quoted 2 lines

This one's already pushed with the MTL OA series.

Thank you for the update. Skipped this patch in the latest rev at [1].

[1] https://patchwork.freedesktop.org/series/115292/#rev3

- Radhakrishna Sripada

Quoted 3 lines

Regards,
Umesh

#11 lore raw

PATCH 5/5 drm/i915/mtl: WA to clear RDOP clock gating

In reply to Radhakrishna Sripada

From: Haridhar Kalvala <[email protected]>

Workaround implementation to clear RDOP clock gating.

Bspec: 33453

---
 drivers/gpu/drm/i915/gt/intel_workarounds.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/i915/gt/intel_workarounds.c +3 -0
index e7ee24bcad89..92cfc71324c4 100644
@@ -1703,6 +1703,9 @@ xelpg_gt_workarounds_init(struct intel_gt *gt, struct i915_wa_list *wal)
 		/* Wa_18018781329 */
 		wa_mcr_write_or(wal, RENDER_MOD_CTRL, FORCE_MISS_FTLB);
 		wa_mcr_write_or(wal, COMP_MOD_CTRL, FORCE_MISS_FTLB);
+
+		/* Wa_14015795083 */
+		wa_write_clr(wal, GEN7_MISCCPCTL, GEN12_DOP_CLOCK_GATE_RENDER_ENABLE);
 	}
 
 	/*
Signature · 1 line
2.34.1
#12 lore raw

[Intel-gfx] ✗ Fi.CI.BAT: failure for More MTL WA and powerwell patches (rev2)

In reply to Radhakrishna Sripada
== Series Details ==

== Series Details ==

Series: More MTL WA and powerwell patches (rev2)
URL : https://patchwork.freedesktop.org/series/115292/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_12872 -> Patchwork_115292v2
====================================================

Summary
-------

**FAILURE**

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

If you think the reported changes have nothing to do with the changes introduced in Patchwork_115292v2, 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_115292v2/index.html

Participating hosts (35 -> 35)
------------------------------

Additional (2): bat-atsm-1 fi-pnv-d510
Missing (2): fi-kbl-soraka fi-snb-2520m

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

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

### IGT changes ###

#### Possible regressions ####

* igt@i915_module_load@load:
- bat-dg2-11: [PASS][1] -> [ABORT][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12872/bat-dg2-11/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115292v2/bat-dg2-11/igt@[email protected]
- bat-adlm-1: [PASS][3] -> [ABORT][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12872/bat-adlm-1/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115292v2/bat-adlm-1/igt@[email protected]

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

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

### IGT changes ###

#### Issues hit ####

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

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

* igt@gem_sync@basic-each:
- bat-atsm-1: NOTRUN -> [FAIL][7] ([i915#8062]) +1 similar issue
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115292v2/bat-atsm-1/igt@[email protected]

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

* igt@gem_tiled_pread_basic:
- bat-atsm-1: NOTRUN -> [SKIP][9] ([i915#4079]) +1 similar issue
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115292v2/bat-atsm-1/igt@gem_tiled_pread_basic.html

* igt@i915_hangman@error-state-basic:
- bat-atsm-1: NOTRUN -> [ABORT][10] ([i915#8060])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115292v2/bat-atsm-1/igt@[email protected]

* igt@i915_selftest@live@execlists:
- fi-bsw-n3050: [PASS][11] -> [ABORT][12] ([i915#7911])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12872/fi-bsw-n3050/igt@i915_selftest@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115292v2/fi-bsw-n3050/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@slpc:
- bat-rpls-1: [PASS][13] -> [DMESG-FAIL][14] ([i915#6367])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12872/bat-rpls-1/igt@i915_selftest@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115292v2/bat-rpls-1/igt@i915_selftest@[email protected]

* igt@kms_chamelium_hpd@common-hpd-after-suspend:
- bat-dg1-5: NOTRUN -> [SKIP][15] ([i915#7828])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115292v2/bat-dg1-5/igt@[email protected]
- bat-adln-1: NOTRUN -> [SKIP][16] ([i915#7828])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115292v2/bat-adln-1/igt@[email protected]

* igt@kms_pipe_crc_basic@suspend-read-crc@pipe-b-dp-3:
- bat-dg2-9: [PASS][17] -> [FAIL][18] ([fdo#103375]) +1 similar issue
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12872/bat-dg2-9/igt@kms_pipe_crc_basic@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115292v2/bat-dg2-9/igt@kms_pipe_crc_basic@[email protected]

* igt@kms_pipe_crc_basic@suspend-read-crc@pipe-c-dp-3:
- bat-dg2-9: [PASS][19] -> [FAIL][20] ([fdo#103375] / [i915#7932])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12872/bat-dg2-9/igt@kms_pipe_crc_basic@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115292v2/bat-dg2-9/igt@kms_pipe_crc_basic@[email protected]

* igt@kms_psr@primary_page_flip:
- fi-pnv-d510: NOTRUN -> [SKIP][21] ([fdo#109271]) +38 similar issues
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115292v2/fi-pnv-d510/igt@kms_psr@primary_page_flip.html

#### Possible fixes ####

* igt@dmabuf@all-tests@dma_fence:
- bat-adln-1: [FAIL][22] ([i915#8064]) -> [PASS][23]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12872/bat-adln-1/igt@dmabuf@all-tests@dma_fence.html
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115292v2/bat-adln-1/igt@dmabuf@all-tests@dma_fence.html

* igt@dmabuf@all-tests@sanitycheck:
- bat-adln-1: [ABORT][24] ([i915#8144]) -> [PASS][25]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12872/bat-adln-1/igt@dmabuf@[email protected]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115292v2/bat-adln-1/igt@dmabuf@[email protected]

* igt@i915_selftest@live@hangcheck:
- bat-dg1-5: [ABORT][26] ([i915#4983]) -> [PASS][27]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12872/bat-dg1-5/igt@i915_selftest@[email protected]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115292v2/bat-dg1-5/igt@i915_selftest@[email protected]

[fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#7911]: https://gitlab.freedesktop.org/drm/intel/issues/7911
[i915#7932]: https://gitlab.freedesktop.org/drm/intel/issues/7932
[i915#8060]: https://gitlab.freedesktop.org/drm/intel/issues/8060
[i915#8062]: https://gitlab.freedesktop.org/drm/intel/issues/8062
[i915#8064]: https://gitlab.freedesktop.org/drm/intel/issues/8064
[i915#8144]: https://gitlab.freedesktop.org/drm/intel/issues/8144

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

* Linux: CI_DRM_12872 -> Patchwork_115292v2

CI-20190529: 20190529
CI_DRM_12872: f65e171596ef70c076fe02be596de29e83cfc8a3 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7202: b4ec7dac375eed2dda89c64d4de94c4c9205b601 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_115292v2: f65e171596ef70c076fe02be596de29e83cfc8a3 @ git://anongit.freedesktop.org/gfx-ci/linux

### Linux commits

f2cb9ac39f74 drm/i915/mtl: WA to clear RDOP clock gating 69acbf599183 drm/i915/mtl: Synchronize i915/BIOS on C6 enabling 8c5ddb6aadac drm/i915/mtl: Extend Wa_22011802037 to MTL A-step baf84b01bec6 drm/i915/mtl: Re-use ADL-P's "DC off" power well ffa4a6bde432 drm/i915: Use separate "DC off" power well for ADL-P and DG2

== Logs ==

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