Skip to contentSkip to conversation

drm/i915/icl: Read the correct Gen11 interrupt registers

PATCH New Oscar Mateo 5 participants 11 messages May 10, 2018 – May 18, 2018

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

PATCH 1/1 drm/i915/icl: Read the correct Gen11 interrupt registers

Stop reading some now deprecated interrupt registers in both debugfs and error state. Instead, read the new equivalents in the Gen11 interrupt repartitioning scheme.

Note that the equivalent to the PM ISR & IIR cannot be read without affecting the current state of the system, so I've opted for leaving them out. See gen11_service_one_iir() for more info.

v2: else if !!! (Paulo)
v3: another else if (Vinay)
v4:
- Rebased
- Renamed patch
- Improved the ordering of GENs
- Improved the printing of per-GEN info

Cc Tvrtko Ursulin <[email protected]>
Cc Daniele Ceraolo Spurio <[email protected]>
Cc Sagar Arun Kamble <[email protected]>
Cc Vinay Belgaumkar <[email protected]>
---
 drivers/gpu/drm/i915/i915_debugfs.c   | 28 ++++++++++++++++++----------
 drivers/gpu/drm/i915/i915_gpu_error.c | 11 ++++++++++-
 drivers/gpu/drm/i915/i915_gpu_error.h |  2 +-
 3 files changed, 29 insertions(+), 12 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +18 -10
index d663a9e0..8a7030a 100644
@@ -1170,19 +1170,22 @@ static int i915_frequency_info(struct seq_file *m, void *unused)
 
 		intel_uncore_forcewake_put(dev_priv, FORCEWAKE_ALL);
 
-		if (IS_GEN6(dev_priv) || IS_GEN7(dev_priv)) {
-			pm_ier = I915_READ(GEN6_PMIER);
-			pm_imr = I915_READ(GEN6_PMIMR);
-			pm_isr = I915_READ(GEN6_PMISR);
-			pm_iir = I915_READ(GEN6_PMIIR);
-			pm_mask = I915_READ(GEN6_PMINTRMSK);
-		} else {
+		if (INTEL_GEN(dev_priv) >= 11) {
+			pm_ier = I915_READ(GEN11_GPM_WGBOXPERF_INTR_ENABLE);
+			pm_imr = I915_READ(GEN11_GPM_WGBOXPERF_INTR_MASK);
+		} else if (INTEL_GEN(dev_priv) >= 8) {
 			pm_ier = I915_READ(GEN8_GT_IER(2));
 			pm_imr = I915_READ(GEN8_GT_IMR(2));
 			pm_isr = I915_READ(GEN8_GT_ISR(2));
 			pm_iir = I915_READ(GEN8_GT_IIR(2));
-			pm_mask = I915_READ(GEN6_PMINTRMSK);
+		} else {
+			pm_ier = I915_READ(GEN6_PMIER);
+			pm_imr = I915_READ(GEN6_PMIMR);
+			pm_isr = I915_READ(GEN6_PMISR);
+			pm_iir = I915_READ(GEN6_PMIIR);
 		}
+		pm_mask = I915_READ(GEN6_PMINTRMSK);
+
 		seq_printf(m, "Video Turbo Mode: %s\n",
 			   yesno(rpmodectl & GEN6_RP_MEDIA_TURBO));
 		seq_printf(m, "HW control enabled: %s\n",
@@ -1190,8 +1193,13 @@ static int i915_frequency_info(struct seq_file *m, void *unused)
 		seq_printf(m, "SW control enabled: %s\n",
 			   yesno((rpmodectl & GEN6_RP_MEDIA_MODE_MASK) ==
 				  GEN6_RP_MEDIA_SW_MODE));
-		seq_printf(m, "PM IER=0x%08x IMR=0x%08x ISR=0x%08x IIR=0x%08x, MASK=0x%08x\n",
-			   pm_ier, pm_imr, pm_isr, pm_iir, pm_mask);
+
+		seq_printf(m, "PM IER=0x%08x IMR=0x%08x, MASK=0x%08x\n",
+			   pm_ier, pm_imr, pm_mask);
+		if (INTEL_GEN(dev_priv) < 11) {
+			seq_printf(m, "PM ISR=0x%08x IIR=0x%08x\n",
+				   pm_isr, pm_iir);
+		}
 		seq_printf(m, "pm_intrmsk_mbz: 0x%08x\n",
 			   rps->pm_intrmsk_mbz);
 		seq_printf(m, "GT_PERF_STATUS: 0x%08x\n", gt_perf_status);
drivers/gpu/drm/i915/i915_gpu_error.c +10 -1
index b98cd44..d9f2f69 100644
@@ -1675,7 +1675,16 @@ static void capture_reg_state(struct i915_gpu_state *error)
 	}
 
 	/* 4: Everything else */
-	if (INTEL_GEN(dev_priv) >= 8) {
+	if (INTEL_GEN(dev_priv) >= 11) {
+		error->ier = I915_READ(GEN8_DE_MISC_IER);
+		error->gtier[0] = I915_READ(GEN11_RENDER_COPY_INTR_ENABLE);
+		error->gtier[1] = I915_READ(GEN11_VCS_VECS_INTR_ENABLE);
+		error->gtier[2] = I915_READ(GEN11_GUC_SG_INTR_ENABLE);
+		error->gtier[3] = I915_READ(GEN11_GPM_WGBOXPERF_INTR_ENABLE);
+		error->gtier[4] = I915_READ(GEN11_CRYPTO_RSVD_INTR_ENABLE);
+		error->gtier[5] = I915_READ(GEN11_GUNIT_CSME_INTR_ENABLE);
+		error->ngtier = 6;
+	} else if (INTEL_GEN(dev_priv) >= 8) {
 		error->ier = I915_READ(GEN8_DE_MISC_IER);
 		for (i = 0; i < 4; i++)
 			error->gtier[i] = I915_READ(GEN8_GT_IER(i));
drivers/gpu/drm/i915/i915_gpu_error.h +1 -1
index dac0f8c..58910f1 100644
@@ -58,7 +58,7 @@ struct i915_gpu_state {
 	u32 eir;
 	u32 pgtbl_er;
 	u32 ier;
-	u32 gtier[4], ngtier;
+	u32 gtier[6], ngtier;
 	u32 ccid;
 	u32 derrmr;
 	u32 forcewake;
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

✗ Fi.CI.BAT: failure for drm/i915/icl: Read the correct Gen11 interrupt registers

== Series Details ==

== Series Details ==

Series: drm/i915/icl: Read the correct Gen11 interrupt registers
URL : https://patchwork.freedesktop.org/series/43027/
State : failure

== Summary ==

CHK include/config/kernel.release

  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CHK     include/generated/bounds.h
  CHK     include/generated/timeconst.h
  CHK     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
  DESCEND  objtool
  CHK     scripts/mod/devicetable-offsets.h
  CHK     include/generated/compile.h
  CHK     kernel/config_data.h
  CC [M]  drivers/gpu/drm/i915/i915_debugfs.o
drivers/gpu/drm/i915/i915_debugfs.c: In function ‘i915_frequency_info’:
drivers/gpu/drm/i915/i915_debugfs.c:1192:4: error: ‘pm_iir’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
    seq_printf(m, "PM ISR=0x%08x IIR=0x%08x\n",
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        pm_isr, pm_iir);
        ~~~~~~~~~~~~~~~

drivers/gpu/drm/i915/i915_debugfs.c:1192:4: error: ‘pm_isr’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
cc1: all warnings being treated as errors
scripts/Makefile.build:312: recipe for target 'drivers/gpu/drm/i915/i915_debugfs.o' failed
make[4]: *** [drivers/gpu/drm/i915/i915_debugfs.o] Error 1
scripts/Makefile.build:559: recipe for target 'drivers/gpu/drm/i915' failed
make[3]: *** [drivers/gpu/drm/i915] Error 2
scripts/Makefile.build:559: recipe for target 'drivers/gpu/drm' failed
make[2]: *** [drivers/gpu/drm] Error 2
scripts/Makefile.build:559: recipe for target 'drivers/gpu' failed
make[1]: *** [drivers/gpu] Error 2
Makefile:1060: recipe for target 'drivers' failed
make: *** [drivers] Error 2

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

PATCH 1/1 drm/i915/icl: Read the correct Gen11 interrupt registers

In reply to Oscar Mateo

Stop reading some now deprecated interrupt registers in both debugfs and error state. Instead, read the new equivalents in the Gen11 interrupt repartitioning scheme.

Note that the equivalent to the PM ISR & IIR cannot be read without affecting the current state of the system, so I've opted for leaving them out. See gen11_service_one_iir() for more info.

v2: else if !!! (Paulo)
v3: another else if (Vinay)
v4:
- Rebased
- Renamed patch
- Improved the ordering of GENs
- Improved the printing of per-GEN info
v5: Avoid maybe-unitialized & add comment explaining the lack
of PM ISR & IIR

Cc Tvrtko Ursulin <[email protected]>
Cc Daniele Ceraolo Spurio <[email protected]>
Cc Sagar Arun Kamble <[email protected]>
Cc Vinay Belgaumkar <[email protected]>
---
 drivers/gpu/drm/i915/i915_debugfs.c   | 34 ++++++++++++++++++++++++----------
 drivers/gpu/drm/i915/i915_gpu_error.c | 11 ++++++++++-
 drivers/gpu/drm/i915/i915_gpu_error.h |  2 +-
 3 files changed, 35 insertions(+), 12 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +24 -10
index d663a9e0..d992dd2 100644
@@ -1170,19 +1170,28 @@ static int i915_frequency_info(struct seq_file *m, void *unused)
 
 		intel_uncore_forcewake_put(dev_priv, FORCEWAKE_ALL);
 
-		if (IS_GEN6(dev_priv) || IS_GEN7(dev_priv)) {
-			pm_ier = I915_READ(GEN6_PMIER);
-			pm_imr = I915_READ(GEN6_PMIMR);
-			pm_isr = I915_READ(GEN6_PMISR);
-			pm_iir = I915_READ(GEN6_PMIIR);
-			pm_mask = I915_READ(GEN6_PMINTRMSK);
-		} else {
+		if (INTEL_GEN(dev_priv) >= 11) {
+			pm_ier = I915_READ(GEN11_GPM_WGBOXPERF_INTR_ENABLE);
+			pm_imr = I915_READ(GEN11_GPM_WGBOXPERF_INTR_MASK);
+			/*
+			 * The equivalent to the PM ISR & IIR cannot be read
+			 * without affecting the current state of the system
+			 */
+			pm_isr = 0;
+			pm_iir = 0;
+		} else if (INTEL_GEN(dev_priv) >= 8) {
 			pm_ier = I915_READ(GEN8_GT_IER(2));
 			pm_imr = I915_READ(GEN8_GT_IMR(2));
 			pm_isr = I915_READ(GEN8_GT_ISR(2));
 			pm_iir = I915_READ(GEN8_GT_IIR(2));
-			pm_mask = I915_READ(GEN6_PMINTRMSK);
+		} else {
+			pm_ier = I915_READ(GEN6_PMIER);
+			pm_imr = I915_READ(GEN6_PMIMR);
+			pm_isr = I915_READ(GEN6_PMISR);
+			pm_iir = I915_READ(GEN6_PMIIR);
 		}
+		pm_mask = I915_READ(GEN6_PMINTRMSK);
+
 		seq_printf(m, "Video Turbo Mode: %s\n",
 			   yesno(rpmodectl & GEN6_RP_MEDIA_TURBO));
 		seq_printf(m, "HW control enabled: %s\n",
@@ -1190,8 +1199,13 @@ static int i915_frequency_info(struct seq_file *m, void *unused)
 		seq_printf(m, "SW control enabled: %s\n",
 			   yesno((rpmodectl & GEN6_RP_MEDIA_MODE_MASK) ==
 				  GEN6_RP_MEDIA_SW_MODE));
-		seq_printf(m, "PM IER=0x%08x IMR=0x%08x ISR=0x%08x IIR=0x%08x, MASK=0x%08x\n",
-			   pm_ier, pm_imr, pm_isr, pm_iir, pm_mask);
+
+		seq_printf(m, "PM IER=0x%08x IMR=0x%08x, MASK=0x%08x\n",
+			   pm_ier, pm_imr, pm_mask);
+		if (INTEL_GEN(dev_priv) < 11) {
+			seq_printf(m, "PM ISR=0x%08x IIR=0x%08x\n",
+				   pm_isr, pm_iir);
+		}
 		seq_printf(m, "pm_intrmsk_mbz: 0x%08x\n",
 			   rps->pm_intrmsk_mbz);
 		seq_printf(m, "GT_PERF_STATUS: 0x%08x\n", gt_perf_status);
drivers/gpu/drm/i915/i915_gpu_error.c +10 -1
index b98cd44..d9f2f69 100644
@@ -1675,7 +1675,16 @@ static void capture_reg_state(struct i915_gpu_state *error)
 	}
 
 	/* 4: Everything else */
-	if (INTEL_GEN(dev_priv) >= 8) {
+	if (INTEL_GEN(dev_priv) >= 11) {
+		error->ier = I915_READ(GEN8_DE_MISC_IER);
+		error->gtier[0] = I915_READ(GEN11_RENDER_COPY_INTR_ENABLE);
+		error->gtier[1] = I915_READ(GEN11_VCS_VECS_INTR_ENABLE);
+		error->gtier[2] = I915_READ(GEN11_GUC_SG_INTR_ENABLE);
+		error->gtier[3] = I915_READ(GEN11_GPM_WGBOXPERF_INTR_ENABLE);
+		error->gtier[4] = I915_READ(GEN11_CRYPTO_RSVD_INTR_ENABLE);
+		error->gtier[5] = I915_READ(GEN11_GUNIT_CSME_INTR_ENABLE);
+		error->ngtier = 6;
+	} else if (INTEL_GEN(dev_priv) >= 8) {
 		error->ier = I915_READ(GEN8_DE_MISC_IER);
 		for (i = 0; i < 4; i++)
 			error->gtier[i] = I915_READ(GEN8_GT_IER(i));
drivers/gpu/drm/i915/i915_gpu_error.h +1 -1
index dac0f8c..58910f1 100644
@@ -58,7 +58,7 @@ struct i915_gpu_state {
 	u32 eir;
 	u32 pgtbl_er;
 	u32 ier;
-	u32 gtier[4], ngtier;
+	u32 gtier[6], ngtier;
 	u32 ccid;
 	u32 derrmr;
 	u32 forcewake;
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 1/1
#3 lore raw
Quoted 18 lines · Oscar Mateo

Stop reading some now deprecated interrupt registers in both debugfs and error state. Instead, read the new equivalents in the Gen11 interrupt repartitioning scheme.

Note that the equivalent to the PM ISR & IIR cannot be read without affecting the current state of the system, so I've opted for leaving them out. See gen11_service_one_iir() for more info.

v2: else if !!! (Paulo)
v3: another else if (Vinay)
v4:
- Rebased
- Renamed patch
- Improved the ordering of GENs
- Improved the printing of per-GEN info
v5: Avoid maybe-unitialized & add comment explaining the lack
of PM ISR & IIR

Quoted 7 lines
Cc Tvrtko Ursulin <[email protected]>
Cc Daniele Ceraolo Spurio <[email protected]>
Cc Sagar Arun Kamble <[email protected]>
Cc Vinay Belgaumkar <[email protected]>

---

Quoted 89 lines
  drivers/gpu/drm/i915/i915_debugfs.c   | 34 ++++++++++++++++++++++++----------
  drivers/gpu/drm/i915/i915_gpu_error.c | 11 ++++++++++-
  drivers/gpu/drm/i915/i915_gpu_error.h |  2 +-
  3 files changed, 35 insertions(+), 12 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +24 -10
index d663a9e0..d992dd2 100644
@@ -1170,19 +1170,28 @@ static int i915_frequency_info(struct seq_file *m, void *unused)
 
  		intel_uncore_forcewake_put(dev_priv, FORCEWAKE_ALL);
 
-		if (IS_GEN6(dev_priv) || IS_GEN7(dev_priv)) {
-			pm_ier = I915_READ(GEN6_PMIER);
-			pm_imr = I915_READ(GEN6_PMIMR);
-			pm_isr = I915_READ(GEN6_PMISR);
-			pm_iir = I915_READ(GEN6_PMIIR);
-			pm_mask = I915_READ(GEN6_PMINTRMSK);
-		} else {
+		if (INTEL_GEN(dev_priv) >= 11) {
+			pm_ier = I915_READ(GEN11_GPM_WGBOXPERF_INTR_ENABLE);
+			pm_imr = I915_READ(GEN11_GPM_WGBOXPERF_INTR_MASK);
+			/*
+			 * The equivalent to the PM ISR & IIR cannot be read
+			 * without affecting the current state of the system
+			 */
+			pm_isr = 0;
+			pm_iir = 0;
+		} else if (INTEL_GEN(dev_priv) >= 8) {
  			pm_ier = I915_READ(GEN8_GT_IER(2));
  			pm_imr = I915_READ(GEN8_GT_IMR(2));
  			pm_isr = I915_READ(GEN8_GT_ISR(2));
  			pm_iir = I915_READ(GEN8_GT_IIR(2));
-			pm_mask = I915_READ(GEN6_PMINTRMSK);
+		} else {
+			pm_ier = I915_READ(GEN6_PMIER);
+			pm_imr = I915_READ(GEN6_PMIMR);
+			pm_isr = I915_READ(GEN6_PMISR);
+			pm_iir = I915_READ(GEN6_PMIIR);
  		}
+		pm_mask = I915_READ(GEN6_PMINTRMSK);
+
  		seq_printf(m, "Video Turbo Mode: %s\n",
  			   yesno(rpmodectl & GEN6_RP_MEDIA_TURBO));
  		seq_printf(m, "HW control enabled: %s\n",
@@ -1190,8 +1199,13 @@ static int i915_frequency_info(struct seq_file *m, void *unused)
  		seq_printf(m, "SW control enabled: %s\n",
  			   yesno((rpmodectl & GEN6_RP_MEDIA_MODE_MASK) ==
  				  GEN6_RP_MEDIA_SW_MODE));
-		seq_printf(m, "PM IER=0x%08x IMR=0x%08x ISR=0x%08x IIR=0x%08x, MASK=0x%08x\n",
-			   pm_ier, pm_imr, pm_isr, pm_iir, pm_mask);
+
+		seq_printf(m, "PM IER=0x%08x IMR=0x%08x, MASK=0x%08x\n",
+			   pm_ier, pm_imr, pm_mask);
+		if (INTEL_GEN(dev_priv) < 11) {
+			seq_printf(m, "PM ISR=0x%08x IIR=0x%08x\n",
+				   pm_isr, pm_iir);
+		}
  		seq_printf(m, "pm_intrmsk_mbz: 0x%08x\n",
  			   rps->pm_intrmsk_mbz);
  		seq_printf(m, "GT_PERF_STATUS: 0x%08x\n", gt_perf_status);
drivers/gpu/drm/i915/i915_gpu_error.c +10 -1
index b98cd44..d9f2f69 100644
@@ -1675,7 +1675,16 @@ static void capture_reg_state(struct i915_gpu_state *error)
  	}
 
  	/* 4: Everything else */
-	if (INTEL_GEN(dev_priv) >= 8) {
+	if (INTEL_GEN(dev_priv) >= 11) {
+		error->ier = I915_READ(GEN8_DE_MISC_IER);
+		error->gtier[0] = I915_READ(GEN11_RENDER_COPY_INTR_ENABLE);
+		error->gtier[1] = I915_READ(GEN11_VCS_VECS_INTR_ENABLE);
+		error->gtier[2] = I915_READ(GEN11_GUC_SG_INTR_ENABLE);
+		error->gtier[3] = I915_READ(GEN11_GPM_WGBOXPERF_INTR_ENABLE);
+		error->gtier[4] = I915_READ(GEN11_CRYPTO_RSVD_INTR_ENABLE);
+		error->gtier[5] = I915_READ(GEN11_GUNIT_CSME_INTR_ENABLE);
+		error->ngtier = 6;
+	} else if (INTEL_GEN(dev_priv) >= 8) {
  		error->ier = I915_READ(GEN8_DE_MISC_IER);
  		for (i = 0; i < 4; i++)
  			error->gtier[i] = I915_READ(GEN8_GT_IER(i));
drivers/gpu/drm/i915/i915_gpu_error.h +0 -0
index dac0f8c..58910f1 100644

drivers/gpu/drm/i915/i915_gpu_error.h struct i915_gpu_state { · line 64

Quoted 8 lines
drivers/gpu/drm/i915/i915_gpu_error.h +1 -1
@@ -58,7 +58,7 @@ struct i915_gpu_state {
  	u32 eir;
  	u32 pgtbl_er;
  	u32 ier;
-	u32 gtier[4], ngtier;
+	u32 gtier[6], ngtier;
  	u32 ccid;
  	u32 derrmr;
  	u32 forcewake;

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw
In reply to Oscar Mateo

Em Qui, 2018-05-10 às 14:59 -0700, Oscar Mateo escreveu:

Quoted 7 lines

Stop reading some now deprecated interrupt registers in both debugfs and error state. Instead, read the new equivalents in the Gen11 interrupt repartitioning scheme.

Note that the equivalent to the PM ISR & IIR cannot be read without affecting the current state of the system, so I've opted for leaving them out. See gen11_service_one_iir() for more info.

I can't find this function. Did you mean something else?

Quoted 128 lines

v2: else if !!! (Paulo)
v3: another else if (Vinay)
v4:
- Rebased
- Renamed patch
- Improved the ordering of GENs
- Improved the printing of per-GEN info
v5: Avoid maybe-unitialized & add comment explaining the lack
of PM ISR & IIR

Cc Tvrtko Ursulin <[email protected]>
Cc Daniele Ceraolo Spurio <[email protected]>
Cc Sagar Arun Kamble <[email protected]>
Cc Vinay Belgaumkar <[email protected]>
---
 drivers/gpu/drm/i915/i915_debugfs.c   | 34 ++++++++++++++++++++++++-
---------
 drivers/gpu/drm/i915/i915_gpu_error.c | 11 ++++++++++-
 drivers/gpu/drm/i915/i915_gpu_error.h |  2 +-
 3 files changed, 35 insertions(+), 12 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +5 -7
index d663a9e0..d992dd2 100644
@@ -1170,19 +1170,28 @@ static int i915_frequency_info(struct
 seq_file *m, void *unused)
 
 		intel_uncore_forcewake_put(dev_priv, FORCEWAKE_ALL);
 
-		if (IS_GEN6(dev_priv) || IS_GEN7(dev_priv)) {
-			pm_ier = I915_READ(GEN6_PMIER);
-			pm_imr = I915_READ(GEN6_PMIMR);
-			pm_isr = I915_READ(GEN6_PMISR);
-			pm_iir = I915_READ(GEN6_PMIIR);
-			pm_mask = I915_READ(GEN6_PMINTRMSK);
-		} else {
+		if (INTEL_GEN(dev_priv) >= 11) {
+			pm_ier =
 I915_READ(GEN11_GPM_WGBOXPERF_INTR_ENABLE);
+			pm_imr =
 I915_READ(GEN11_GPM_WGBOXPERF_INTR_MASK);
+			/*
+			 * The equivalent to the PM ISR & IIR cannot

be read

drivers/gpu/drm/i915/i915_debugfs.c +1 -0
+			 * without affecting the current state of

the system

drivers/gpu/drm/i915/i915_debugfs.c +11 -1
+			 */
+			pm_isr = 0;
+			pm_iir = 0;
+		} else if (INTEL_GEN(dev_priv) >= 8) {
 			pm_ier = I915_READ(GEN8_GT_IER(2));
 			pm_imr = I915_READ(GEN8_GT_IMR(2));
 			pm_isr = I915_READ(GEN8_GT_ISR(2));
 			pm_iir = I915_READ(GEN8_GT_IIR(2));
-			pm_mask = I915_READ(GEN6_PMINTRMSK);
+		} else {
+			pm_ier = I915_READ(GEN6_PMIER);
+			pm_imr = I915_READ(GEN6_PMIMR);
+			pm_isr = I915_READ(GEN6_PMISR);
+			pm_iir = I915_READ(GEN6_PMIIR);
 		}
+		pm_mask = I915_READ(GEN6_PMINTRMSK);
+
 		seq_printf(m, "Video Turbo Mode: %s\n",
 			   yesno(rpmodectl & GEN6_RP_MEDIA_TURBO));
 		seq_printf(m, "HW control enabled: %s\n",
@@ -1190,8 +1199,13 @@ static int i915_frequency_info(struct seq_file
 *m, void *unused)
 		seq_printf(m, "SW control enabled: %s\n",
 			   yesno((rpmodectl &

GEN6_RP_MEDIA_MODE_MASK) ==

drivers/gpu/drm/i915/i915_debugfs.c +0 -1
 				  GEN6_RP_MEDIA_SW_MODE));
-		seq_printf(m, "PM IER=0x%08x IMR=0x%08x ISR=0x%08x

IIR=0x%08x, MASK=0x%08x\n",

drivers/gpu/drm/i915/i915_debugfs.c +2 -1
-			   pm_ier, pm_imr, pm_isr, pm_iir, pm_mask);
+
+		seq_printf(m, "PM IER=0x%08x IMR=0x%08x,

MASK=0x%08x\n",

drivers/gpu/drm/i915/i915_debugfs.c +5 -0
+			   pm_ier, pm_imr, pm_mask);
+		if (INTEL_GEN(dev_priv) < 11) {
+			seq_printf(m, "PM ISR=0x%08x IIR=0x%08x\n",
+				   pm_isr, pm_iir);
+		}
 		seq_printf(m, "pm_intrmsk_mbz: 0x%08x\n",
 			   rps->pm_intrmsk_mbz);
 		seq_printf(m, "GT_PERF_STATUS: 0x%08x\n",

gt_perf_status);

drivers/gpu/drm/i915/i915_gpu_error.c +5 -1
index b98cd44..d9f2f69 100644
@@ -1675,7 +1675,16 @@ static void capture_reg_state(struct
 i915_gpu_state *error)
 	}
 
 	/* 4: Everything else */
-	if (INTEL_GEN(dev_priv) >= 8) {
+	if (INTEL_GEN(dev_priv) >= 11) {
+		error->ier = I915_READ(GEN8_DE_MISC_IER);
+		error->gtier[0] =
 I915_READ(GEN11_RENDER_COPY_INTR_ENABLE);
+		error->gtier[1] =
 I915_READ(GEN11_VCS_VECS_INTR_ENABLE);
+		error->gtier[2] =

I915_READ(GEN11_GUC_SG_INTR_ENABLE);

drivers/gpu/drm/i915/i915_gpu_error.c +1 -0
+		error->gtier[3] =

I915_READ(GEN11_GPM_WGBOXPERF_INTR_ENABLE);

drivers/gpu/drm/i915/i915_gpu_error.c +1 -0
+		error->gtier[4] =

I915_READ(GEN11_CRYPTO_RSVD_INTR_ENABLE);

drivers/gpu/drm/i915/i915_gpu_error.c +1 -0
+		error->gtier[5] =

I915_READ(GEN11_GUNIT_CSME_INTR_ENABLE);

drivers/gpu/drm/i915/i915_gpu_error.c +2 -0
+		error->ngtier = 6;
+	} else if (INTEL_GEN(dev_priv) >= 8) {
 		error->ier = I915_READ(GEN8_DE_MISC_IER);
 		for (i = 0; i < 4; i++)
 			error->gtier[i] = I915_READ(GEN8_GT_IER(i));
drivers/gpu/drm/i915/i915_gpu_error.h +0 -0
index dac0f8c..58910f1 100644

drivers/gpu/drm/i915/i915_gpu_error.h struct i915_gpu_state { · line 64

Quoted 8 lines
drivers/gpu/drm/i915/i915_gpu_error.h +1 -1
@@ -58,7 +58,7 @@ struct i915_gpu_state {
 	u32 eir;
 	u32 pgtbl_er;
 	u32 ier;
-	u32 gtier[4], ngtier;
+	u32 gtier[6], ngtier;
 	u32 ccid;
 	u32 derrmr;
 	u32 forcewake;

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#5 lore raw
Quoted 11 lines · Paulo Zanoni

Em Qui, 2018-05-10 às 14:59 -0700, Oscar Mateo escreveu:

Quoted 7 lines

Stop reading some now deprecated interrupt registers in both debugfs and error state. Instead, read the new equivalents in the Gen11 interrupt repartitioning scheme.

Note that the equivalent to the PM ISR & IIR cannot be read without affecting the current state of the system, so I've opted for leaving them out. See gen11_service_one_iir() for more info.

I can't find this function. Did you mean something else?

s/gen11_service_one_iir/gen11_reset_one_iir/

Quoted 134 lines
Quoted 134 lines

v2: else if !!! (Paulo)
v3: another else if (Vinay)
v4:
- Rebased
- Renamed patch
- Improved the ordering of GENs
- Improved the printing of per-GEN info
v5: Avoid maybe-unitialized & add comment explaining the lack
of PM ISR & IIR

Cc Tvrtko Ursulin <[email protected]>
Cc Daniele Ceraolo Spurio <[email protected]>
Cc Sagar Arun Kamble <[email protected]>
Cc Vinay Belgaumkar <[email protected]>
---
  drivers/gpu/drm/i915/i915_debugfs.c   | 34 ++++++++++++++++++++++++-
---------
  drivers/gpu/drm/i915/i915_gpu_error.c | 11 ++++++++++-
  drivers/gpu/drm/i915/i915_gpu_error.h |  2 +-
  3 files changed, 35 insertions(+), 12 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +5 -7
index d663a9e0..d992dd2 100644
@@ -1170,19 +1170,28 @@ static int i915_frequency_info(struct
 seq_file *m, void *unused)
 
  		intel_uncore_forcewake_put(dev_priv, FORCEWAKE_ALL);
 
-		if (IS_GEN6(dev_priv) || IS_GEN7(dev_priv)) {
-			pm_ier = I915_READ(GEN6_PMIER);
-			pm_imr = I915_READ(GEN6_PMIMR);
-			pm_isr = I915_READ(GEN6_PMISR);
-			pm_iir = I915_READ(GEN6_PMIIR);
-			pm_mask = I915_READ(GEN6_PMINTRMSK);
-		} else {
+		if (INTEL_GEN(dev_priv) >= 11) {
+			pm_ier =
 I915_READ(GEN11_GPM_WGBOXPERF_INTR_ENABLE);
+			pm_imr =
 I915_READ(GEN11_GPM_WGBOXPERF_INTR_MASK);
+			/*
+			 * The equivalent to the PM ISR & IIR cannot

be read

drivers/gpu/drm/i915/i915_debugfs.c +1 -0
+			 * without affecting the current state of

the system

drivers/gpu/drm/i915/i915_debugfs.c +11 -1
+			 */
+			pm_isr = 0;
+			pm_iir = 0;
+		} else if (INTEL_GEN(dev_priv) >= 8) {
  			pm_ier = I915_READ(GEN8_GT_IER(2));
  			pm_imr = I915_READ(GEN8_GT_IMR(2));
  			pm_isr = I915_READ(GEN8_GT_ISR(2));
  			pm_iir = I915_READ(GEN8_GT_IIR(2));
-			pm_mask = I915_READ(GEN6_PMINTRMSK);
+		} else {
+			pm_ier = I915_READ(GEN6_PMIER);
+			pm_imr = I915_READ(GEN6_PMIMR);
+			pm_isr = I915_READ(GEN6_PMISR);
+			pm_iir = I915_READ(GEN6_PMIIR);
  		}
+		pm_mask = I915_READ(GEN6_PMINTRMSK);
+
  		seq_printf(m, "Video Turbo Mode: %s\n",
  			   yesno(rpmodectl & GEN6_RP_MEDIA_TURBO));
  		seq_printf(m, "HW control enabled: %s\n",
@@ -1190,8 +1199,13 @@ static int i915_frequency_info(struct seq_file
 *m, void *unused)
  		seq_printf(m, "SW control enabled: %s\n",
  			   yesno((rpmodectl &

GEN6_RP_MEDIA_MODE_MASK) ==
GEN6_RP_MEDIA_SW_MODE));

drivers/gpu/drm/i915/i915_debugfs.c +0 -1
-		seq_printf(m, "PM IER=0x%08x IMR=0x%08x ISR=0x%08x

IIR=0x%08x, MASK=0x%08x\n",

drivers/gpu/drm/i915/i915_debugfs.c +2 -1
-			   pm_ier, pm_imr, pm_isr, pm_iir, pm_mask);
+
+		seq_printf(m, "PM IER=0x%08x IMR=0x%08x,

MASK=0x%08x\n",

drivers/gpu/drm/i915/i915_debugfs.c +5 -0
+			   pm_ier, pm_imr, pm_mask);
+		if (INTEL_GEN(dev_priv) < 11) {
+			seq_printf(m, "PM ISR=0x%08x IIR=0x%08x\n",
+				   pm_isr, pm_iir);
+		}
  		seq_printf(m, "pm_intrmsk_mbz: 0x%08x\n",
  			   rps->pm_intrmsk_mbz);
  		seq_printf(m, "GT_PERF_STATUS: 0x%08x\n",

gt_perf_status);

drivers/gpu/drm/i915/i915_gpu_error.c +5 -1
index b98cd44..d9f2f69 100644
@@ -1675,7 +1675,16 @@ static void capture_reg_state(struct
 i915_gpu_state *error)
  	}
 
  	/* 4: Everything else */
-	if (INTEL_GEN(dev_priv) >= 8) {
+	if (INTEL_GEN(dev_priv) >= 11) {
+		error->ier = I915_READ(GEN8_DE_MISC_IER);
+		error->gtier[0] =
 I915_READ(GEN11_RENDER_COPY_INTR_ENABLE);
+		error->gtier[1] =
 I915_READ(GEN11_VCS_VECS_INTR_ENABLE);
+		error->gtier[2] =

I915_READ(GEN11_GUC_SG_INTR_ENABLE);

drivers/gpu/drm/i915/i915_gpu_error.c +1 -0
+		error->gtier[3] =

I915_READ(GEN11_GPM_WGBOXPERF_INTR_ENABLE);

drivers/gpu/drm/i915/i915_gpu_error.c +1 -0
+		error->gtier[4] =

I915_READ(GEN11_CRYPTO_RSVD_INTR_ENABLE);

drivers/gpu/drm/i915/i915_gpu_error.c +1 -0
+		error->gtier[5] =

I915_READ(GEN11_GUNIT_CSME_INTR_ENABLE);

drivers/gpu/drm/i915/i915_gpu_error.c +2 -0
+		error->ngtier = 6;
+	} else if (INTEL_GEN(dev_priv) >= 8) {
  		error->ier = I915_READ(GEN8_DE_MISC_IER);
  		for (i = 0; i < 4; i++)
  			error->gtier[i] = I915_READ(GEN8_GT_IER(i));
drivers/gpu/drm/i915/i915_gpu_error.h +0 -1
index dac0f8c..58910f1 100644
@@ -58,7 +58,7 @@ struct i915_gpu_state {
  	u32 eir;
  	u32 pgtbl_er;
  	u32 ier;
-	u32 gtier[4], ngtier;
Quoted 9 lines

drivers/gpu/drm/i915/i915_gpu_error.h struct i915_gpu_state { · line 64

Quoted 4 lines
drivers/gpu/drm/i915/i915_gpu_error.h +1 -0
+	u32 gtier[6], ngtier;
  	u32 ccid;
  	u32 derrmr;
  	u32 forcewake;

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#6 lore raw
Quoted 6 lines · Michel Thierry
Quoted 5 lines · Paulo Zanoni

Em Qui, 2018-05-10 às 14:59 -0700, Oscar Mateo escreveu:

Quoted 4 lines

Stop reading some now deprecated interrupt registers in both debugfs and error state. Instead, read the new equivalents in the Gen11 interrupt repartitioning scheme.

Quoted 9 lines
Quoted 6 lines
Quoted 3 lines

Note that the equivalent to the PM ISR & IIR cannot be read without affecting the current state of the system, so I've opted for leaving them out. See gen11_service_one_iir() for more info.

I can't find this function. Did you mean something else?

s/gen11_service_one_iir/gen11_reset_one_iir/

Yup, that's right. Thanks Michel, I didn't realize this had been renamed in upstream.

Quoted 132 lines
Quoted 132 lines
Quoted 132 lines

v2: else if !!! (Paulo)
v3: another else if (Vinay)
v4:
   - Rebased
   - Renamed patch
   - Improved the ordering of GENs
   - Improved the printing of per-GEN info
v5: Avoid maybe-unitialized & add comment explaining the lack of PM ISR & IIR

Cc Tvrtko Ursulin <[email protected]>
Cc Daniele Ceraolo Spurio <[email protected]>
Cc Sagar Arun Kamble <[email protected]>
Cc Vinay Belgaumkar <[email protected]>

---
  drivers/gpu/drm/i915/i915_debugfs.c   | 34 ++++++++++++++++++++++++-
---------
  drivers/gpu/drm/i915/i915_gpu_error.c | 11 ++++++++++- drivers/gpu/drm/i915/i915_gpu_error.h |  2 +-

  3 files changed, 35 insertions(+), 12 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +5 -6
index d663a9e0..d992dd2 100644
@@ -1170,19 +1170,28 @@ static int i915_frequency_info(struct
 seq_file *m, void *unused)
             intel_uncore_forcewake_put(dev_priv, FORCEWAKE_ALL);
   -        if (IS_GEN6(dev_priv) || IS_GEN7(dev_priv)) {
-            pm_ier = I915_READ(GEN6_PMIER);
-            pm_imr = I915_READ(GEN6_PMIMR);
-            pm_isr = I915_READ(GEN6_PMISR);
-            pm_iir = I915_READ(GEN6_PMIIR);
-            pm_mask = I915_READ(GEN6_PMINTRMSK);
-        } else {
+        if (INTEL_GEN(dev_priv) >= 11) {
+            pm_ier =
 I915_READ(GEN11_GPM_WGBOXPERF_INTR_ENABLE);
+            pm_imr =
 I915_READ(GEN11_GPM_WGBOXPERF_INTR_MASK);
+            /*
+             * The equivalent to the PM ISR & IIR cannot

be read
+             * without affecting the current state of the system
+             */
+            pm_isr = 0;
+            pm_iir = 0;
+        } else if (INTEL_GEN(dev_priv) >= 8) { pm_ier = I915_READ(GEN8_GT_IER(2)); pm_imr = I915_READ(GEN8_GT_IMR(2)); pm_isr = I915_READ(GEN8_GT_ISR(2)); pm_iir = I915_READ(GEN8_GT_IIR(2)); -            pm_mask = I915_READ(GEN6_PMINTRMSK); +        } else {
+            pm_ier = I915_READ(GEN6_PMIER);
+            pm_imr = I915_READ(GEN6_PMIMR);
+            pm_isr = I915_READ(GEN6_PMISR);
+            pm_iir = I915_READ(GEN6_PMIIR);
          }
+        pm_mask = I915_READ(GEN6_PMINTRMSK);
+
          seq_printf(m, "Video Turbo Mode: %s\n", yesno(rpmodectl & GEN6_RP_MEDIA_TURBO)); seq_printf(m, "HW control enabled: %s\n",

drivers/gpu/drm/i915/i915_debugfs.c +0 -0
@@ -1190,8 +1199,13 @@ static int i915_frequency_info(struct seq_file
 *m, void *unused)
           seq_printf(m, "SW control enabled: %s\n",

                 yesno((rpmodectl & GEN6_RP_MEDIA_MODE_MASK) == GEN6_RP_MEDIA_SW_MODE));
-        seq_printf(m, "PM IER=0x%08x IMR=0x%08x ISR=0x%08x IIR=0x%08x, MASK=0x%08x\n",
-               pm_ier, pm_imr, pm_isr, pm_iir, pm_mask); +
+        seq_printf(m, "PM IER=0x%08x IMR=0x%08x, MASK=0x%08x\n",
+               pm_ier, pm_imr, pm_mask);
+        if (INTEL_GEN(dev_priv) < 11) {
+            seq_printf(m, "PM ISR=0x%08x IIR=0x%08x\n", +                   pm_isr, pm_iir);
+        }
          seq_printf(m, "pm_intrmsk_mbz: 0x%08x\n", rps->pm_intrmsk_mbz); seq_printf(m, "GT_PERF_STATUS: 0x%08x\n", gt_perf_status);

drivers/gpu/drm/i915/i915_gpu_error.c +6 -1
index b98cd44..d9f2f69 100644
@@ -1675,7 +1675,16 @@ static void capture_reg_state(struct
 i915_gpu_state *error)
       }
         /* 4: Everything else */
-    if (INTEL_GEN(dev_priv) >= 8) {
+    if (INTEL_GEN(dev_priv) >= 11) {
+        error->ier = I915_READ(GEN8_DE_MISC_IER);
+        error->gtier[0] =
 I915_READ(GEN11_RENDER_COPY_INTR_ENABLE);
+        error->gtier[1] =
 I915_READ(GEN11_VCS_VECS_INTR_ENABLE);
+        error->gtier[2] =
 I915_READ(GEN11_GUC_SG_INTR_ENABLE);
+        error->gtier[3] =

I915_READ(GEN11_GPM_WGBOXPERF_INTR_ENABLE);
+        error->gtier[4] = I915_READ(GEN11_CRYPTO_RSVD_INTR_ENABLE);
+        error->gtier[5] = I915_READ(GEN11_GUNIT_CSME_INTR_ENABLE);
+        error->ngtier = 6;
+    } else if (INTEL_GEN(dev_priv) >= 8) { error->ier = I915_READ(GEN8_DE_MISC_IER); for (i = 0; i < 4; i++)
              error->gtier[i] = I915_READ(GEN8_GT_IER(i));

drivers/gpu/drm/i915/i915_gpu_error.h +1 -1
index dac0f8c..58910f1 100644
@@ -58,7 +58,7 @@ struct i915_gpu_state {
       u32 eir;
       u32 pgtbl_er;
       u32 ier;
-    u32 gtier[4], ngtier;
+    u32 gtier[6], ngtier;
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/i915/i915_gpu_error.h struct i915_gpu_state { · line 64

Quoted 3 lines
drivers/gpu/drm/i915/i915_gpu_error.h +0 -0
       u32 ccid;
       u32 derrmr;
       u32 forcewake;

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#7 lore raw

Em Qui, 2018-05-17 às 10:04 -0700, Oscar Mateo Lozano escreveu:

Quoted 18 lines · Michel Thierry
Quoted 16 lines · Paulo Zanoni
Quoted 14 lines

Em Qui, 2018-05-10 às 14:59 -0700, Oscar Mateo escreveu:

Quoted 10 lines

Stop reading some now deprecated interrupt registers in both debugfs and error state. Instead, read the new equivalents in the
Gen11 interrupt repartitioning scheme.

Note that the equivalent to the PM ISR & IIR cannot be read without
affecting the current state of the system, so I've opted for leaving
them out. See gen11_service_one_iir() for more info.

I can't find this function. Did you mean something else?

Quoted 6 lines
Quoted 2 lines

s/gen11_service_one_iir/gen11_reset_one_iir/

Yup, that's right. Thanks Michel, I didn't realize this had been renamed
in upstream.

I fixed this in the commit message, did a small bikeshed on the single- if-with-braces and merged the patch.

I downloaded your patch through patchwork and it changed your name (patch author) from "Oscar Mateo" to "Oscar Mateo Lozano" (then dim push-queued complained the patch was missing author Signed-off-by due to the name difference, which made me notice it). You may want to either fix your name in patchwork so it appears as "Oscar Mateo" or change your git configuration to add the missing name.

Thanks for the patch and reviews.

Thanks,
Paulo

Quoted 146 lines
Quoted 137 lines
Quoted 137 lines
Quoted 137 lines

v2: else if !!! (Paulo)
v3: another else if (Vinay)
v4:
- Rebased
- Renamed patch
- Improved the ordering of GENs
- Improved the printing of per-GEN info
v5: Avoid maybe-unitialized & add comment explaining the lack
of PM ISR & IIR

Cc Tvrtko Ursulin <[email protected]>
Cc Daniele Ceraolo Spurio <[email protected]>
Cc Sagar Arun Kamble <[email protected]>
Cc Vinay Belgaumkar <[email protected]>
---
  drivers/gpu/drm/i915/i915_debugfs.c   | 34
++++++++++++++++++++++++-
---------
  drivers/gpu/drm/i915/i915_gpu_error.c | 11 ++++++++++-
  drivers/gpu/drm/i915/i915_gpu_error.h |  2 +-
  3 files changed, 35 insertions(+), 12 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +5 -6
index d663a9e0..d992dd2 100644
@@ -1170,19 +1170,28 @@ static int i915_frequency_info(struct
 seq_file *m, void *unused)
            intel_uncore_forcewake_put(dev_priv,
 FORCEWAKE_ALL);
  -        if (IS_GEN6(dev_priv) || IS_GEN7(dev_priv)) {
-            pm_ier = I915_READ(GEN6_PMIER);
-            pm_imr = I915_READ(GEN6_PMIMR);
-            pm_isr = I915_READ(GEN6_PMISR);
-            pm_iir = I915_READ(GEN6_PMIIR);
-            pm_mask = I915_READ(GEN6_PMINTRMSK);
-        } else {
+        if (INTEL_GEN(dev_priv) >= 11) {
+            pm_ier =
 I915_READ(GEN11_GPM_WGBOXPERF_INTR_ENABLE);
+            pm_imr =
 I915_READ(GEN11_GPM_WGBOXPERF_INTR_MASK);
+            /*
+             * The equivalent to the PM ISR & IIR cannot

be read
+ * without affecting the current state of
the system

drivers/gpu/drm/i915/i915_debugfs.c +11 -1
+             */
+            pm_isr = 0;
+            pm_iir = 0;
+        } else if (INTEL_GEN(dev_priv) >= 8) {
              pm_ier = I915_READ(GEN8_GT_IER(2));
              pm_imr = I915_READ(GEN8_GT_IMR(2));
              pm_isr = I915_READ(GEN8_GT_ISR(2));
              pm_iir = I915_READ(GEN8_GT_IIR(2));
-            pm_mask = I915_READ(GEN6_PMINTRMSK);
+        } else {
+            pm_ier = I915_READ(GEN6_PMIER);
+            pm_imr = I915_READ(GEN6_PMIMR);
+            pm_isr = I915_READ(GEN6_PMISR);
+            pm_iir = I915_READ(GEN6_PMIIR);
          }
+        pm_mask = I915_READ(GEN6_PMINTRMSK);
+
          seq_printf(m, "Video Turbo Mode: %s\n",
                 yesno(rpmodectl & GEN6_RP_MEDIA_TURBO));
          seq_printf(m, "HW control enabled: %s\n",
@@ -1190,8 +1199,13 @@ static int i915_frequency_info(struct

seq_file
*m, void *unused)
seq_printf(m, "SW control enabled: %s\n",
yesno((rpmodectl &
GEN6_RP_MEDIA_MODE_MASK) ==

                    GEN6_RP_MEDIA_SW_MODE));

- seq_printf(m, "PM IER=0x%08x IMR=0x%08x ISR=0x%08x
IIR=0x%08x, MASK=0x%08x\n",

drivers/gpu/drm/i915/i915_debugfs.c +2 -1
-               pm_ier, pm_imr, pm_isr, pm_iir, pm_mask);
+
+        seq_printf(m, "PM IER=0x%08x IMR=0x%08x,

MASK=0x%08x\n",

drivers/gpu/drm/i915/i915_debugfs.c +5 -0
+               pm_ier, pm_imr, pm_mask);
+        if (INTEL_GEN(dev_priv) < 11) {
+            seq_printf(m, "PM ISR=0x%08x IIR=0x%08x\n",
+                   pm_isr, pm_iir);
+        }
          seq_printf(m, "pm_intrmsk_mbz: 0x%08x\n",
                 rps->pm_intrmsk_mbz);
          seq_printf(m, "GT_PERF_STATUS: 0x%08x\n",

gt_perf_status);

drivers/gpu/drm/i915/i915_gpu_error.c +6 -1
index b98cd44..d9f2f69 100644
@@ -1675,7 +1675,16 @@ static void capture_reg_state(struct
 i915_gpu_state *error)
      }
        /* 4: Everything else */
-    if (INTEL_GEN(dev_priv) >= 8) {
+    if (INTEL_GEN(dev_priv) >= 11) {
+        error->ier = I915_READ(GEN8_DE_MISC_IER);
+        error->gtier[0] =
 I915_READ(GEN11_RENDER_COPY_INTR_ENABLE);
+        error->gtier[1] =
 I915_READ(GEN11_VCS_VECS_INTR_ENABLE);
+        error->gtier[2] =
 I915_READ(GEN11_GUC_SG_INTR_ENABLE);
+        error->gtier[3] =

I915_READ(GEN11_GPM_WGBOXPERF_INTR_ENABLE);
+ error->gtier[4] =
I915_READ(GEN11_CRYPTO_RSVD_INTR_ENABLE);
+ error->gtier[5] =
I915_READ(GEN11_GUNIT_CSME_INTR_ENABLE);

drivers/gpu/drm/i915/i915_gpu_error.c +2 -0
+        error->ngtier = 6;
+    } else if (INTEL_GEN(dev_priv) >= 8) {
          error->ier = I915_READ(GEN8_DE_MISC_IER);
          for (i = 0; i < 4; i++)
              error->gtier[i] = I915_READ(GEN8_GT_IER(i));
drivers/gpu/drm/i915/i915_gpu_error.h +1 -1
index dac0f8c..58910f1 100644
@@ -58,7 +58,7 @@ struct i915_gpu_state {
      u32 eir;
      u32 pgtbl_er;
      u32 ier;
-    u32 gtier[4], ngtier;
+    u32 gtier[6], ngtier;
      u32 ccid;
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/i915/i915_gpu_error.h struct i915_gpu_state { · line 64

Quoted 2 lines
drivers/gpu/drm/i915/i915_gpu_error.h +0 -0
      u32 derrmr;
      u32 forcewake;

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Quoted 4 lines

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#8 lore raw
Quoted 16 lines · Paulo Zanoni

Em Qui, 2018-05-17 às 10:04 -0700, Oscar Mateo Lozano escreveu:

Quoted 15 lines · Michel Thierry
Quoted 14 lines · Paulo Zanoni
Quoted 13 lines

Em Qui, 2018-05-10 às 14:59 -0700, Oscar Mateo escreveu:

Quoted 10 lines

Stop reading some now deprecated interrupt registers in both debugfs and error state. Instead, read the new equivalents in the
Gen11 interrupt repartitioning scheme.

Note that the equivalent to the PM ISR & IIR cannot be read without
affecting the current state of the system, so I've opted for leaving
them out. See gen11_service_one_iir() for more info.

I can't find this function. Did you mean something else?

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

s/gen11_service_one_iir/gen11_reset_one_iir/

Yup, that's right. Thanks Michel, I didn't realize this had been renamed
in upstream.

I fixed this in the commit message, did a small bikeshed on the single- if-with-braces and merged the patch.

Thanks Paulo.

Quoted 6 lines

I downloaded your patch through patchwork and it changed your name (patch author) from "Oscar Mateo" to "Oscar Mateo Lozano" (then dim push-queued complained the patch was missing author Signed-off-by due to the name difference, which made me notice it). You may want to either fix your name in patchwork so it appears as "Oscar Mateo" or change your git configuration to add the missing name.

Sorry about that, it seems I registered with my two surnames instead of the first one that I usually employ.

Is it possible to change the name in patchwork? I don't see a way. Do you know if anybody has direct access to the database?

Quoted 150 lines

Thanks for the patch and reviews.

Thanks,
Paulo

Quoted 145 lines
Quoted 133 lines
Quoted 133 lines
Quoted 133 lines

v2: else if !!! (Paulo)
v3: another else if (Vinay)
v4:
- Rebased
- Renamed patch
- Improved the ordering of GENs
- Improved the printing of per-GEN info
v5: Avoid maybe-unitialized & add comment explaining the lack
of PM ISR & IIR

Cc Tvrtko Ursulin <[email protected]>
Cc Daniele Ceraolo Spurio <[email protected]>
Cc Sagar Arun Kamble <[email protected]>
Cc Vinay Belgaumkar <[email protected]>
---
   drivers/gpu/drm/i915/i915_debugfs.c   | 34
++++++++++++++++++++++++-
---------
   drivers/gpu/drm/i915/i915_gpu_error.c | 11 ++++++++++-
   drivers/gpu/drm/i915/i915_gpu_error.h |  2 +-
   3 files changed, 35 insertions(+), 12 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +5 -6
index d663a9e0..d992dd2 100644
@@ -1170,19 +1170,28 @@ static int i915_frequency_info(struct
 seq_file *m, void *unused)
             intel_uncore_forcewake_put(dev_priv,
 FORCEWAKE_ALL);
   -        if (IS_GEN6(dev_priv) || IS_GEN7(dev_priv)) {
-            pm_ier = I915_READ(GEN6_PMIER);
-            pm_imr = I915_READ(GEN6_PMIMR);
-            pm_isr = I915_READ(GEN6_PMISR);
-            pm_iir = I915_READ(GEN6_PMIIR);
-            pm_mask = I915_READ(GEN6_PMINTRMSK);
-        } else {
+        if (INTEL_GEN(dev_priv) >= 11) {
+            pm_ier =
 I915_READ(GEN11_GPM_WGBOXPERF_INTR_ENABLE);
+            pm_imr =
 I915_READ(GEN11_GPM_WGBOXPERF_INTR_MASK);
+            /*
+             * The equivalent to the PM ISR & IIR cannot

be read
+ * without affecting the current state of
the system

drivers/gpu/drm/i915/i915_debugfs.c +11 -1
+             */
+            pm_isr = 0;
+            pm_iir = 0;
+        } else if (INTEL_GEN(dev_priv) >= 8) {
               pm_ier = I915_READ(GEN8_GT_IER(2));
               pm_imr = I915_READ(GEN8_GT_IMR(2));
               pm_isr = I915_READ(GEN8_GT_ISR(2));
               pm_iir = I915_READ(GEN8_GT_IIR(2));
-            pm_mask = I915_READ(GEN6_PMINTRMSK);
+        } else {
+            pm_ier = I915_READ(GEN6_PMIER);
+            pm_imr = I915_READ(GEN6_PMIMR);
+            pm_isr = I915_READ(GEN6_PMISR);
+            pm_iir = I915_READ(GEN6_PMIIR);
           }
+        pm_mask = I915_READ(GEN6_PMINTRMSK);
+
           seq_printf(m, "Video Turbo Mode: %s\n",
                  yesno(rpmodectl & GEN6_RP_MEDIA_TURBO));
           seq_printf(m, "HW control enabled: %s\n",
@@ -1190,8 +1199,13 @@ static int i915_frequency_info(struct

seq_file
*m, void *unused)
seq_printf(m, "SW control enabled: %s\n",
yesno((rpmodectl &
GEN6_RP_MEDIA_MODE_MASK) ==

                     GEN6_RP_MEDIA_SW_MODE));

- seq_printf(m, "PM IER=0x%08x IMR=0x%08x ISR=0x%08x
IIR=0x%08x, MASK=0x%08x\n",

drivers/gpu/drm/i915/i915_debugfs.c +2 -1
-               pm_ier, pm_imr, pm_isr, pm_iir, pm_mask);
+
+        seq_printf(m, "PM IER=0x%08x IMR=0x%08x,

MASK=0x%08x\n",

drivers/gpu/drm/i915/i915_debugfs.c +5 -0
+               pm_ier, pm_imr, pm_mask);
+        if (INTEL_GEN(dev_priv) < 11) {
+            seq_printf(m, "PM ISR=0x%08x IIR=0x%08x\n",
+                   pm_isr, pm_iir);
+        }
           seq_printf(m, "pm_intrmsk_mbz: 0x%08x\n",
                  rps->pm_intrmsk_mbz);
           seq_printf(m, "GT_PERF_STATUS: 0x%08x\n",

gt_perf_status);

drivers/gpu/drm/i915/i915_gpu_error.c +6 -1
index b98cd44..d9f2f69 100644
@@ -1675,7 +1675,16 @@ static void capture_reg_state(struct
 i915_gpu_state *error)
       }
         /* 4: Everything else */
-    if (INTEL_GEN(dev_priv) >= 8) {
+    if (INTEL_GEN(dev_priv) >= 11) {
+        error->ier = I915_READ(GEN8_DE_MISC_IER);
+        error->gtier[0] =
 I915_READ(GEN11_RENDER_COPY_INTR_ENABLE);
+        error->gtier[1] =
 I915_READ(GEN11_VCS_VECS_INTR_ENABLE);
+        error->gtier[2] =
 I915_READ(GEN11_GUC_SG_INTR_ENABLE);
+        error->gtier[3] =

I915_READ(GEN11_GPM_WGBOXPERF_INTR_ENABLE);
+ error->gtier[4] =
I915_READ(GEN11_CRYPTO_RSVD_INTR_ENABLE);
+ error->gtier[5] =
I915_READ(GEN11_GUNIT_CSME_INTR_ENABLE);

drivers/gpu/drm/i915/i915_gpu_error.c +2 -0
+        error->ngtier = 6;
+    } else if (INTEL_GEN(dev_priv) >= 8) {
           error->ier = I915_READ(GEN8_DE_MISC_IER);
           for (i = 0; i < 4; i++)
               error->gtier[i] = I915_READ(GEN8_GT_IER(i));
drivers/gpu/drm/i915/i915_gpu_error.h +1 -1
index dac0f8c..58910f1 100644
@@ -58,7 +58,7 @@ struct i915_gpu_state {
       u32 eir;
       u32 pgtbl_er;
       u32 ier;
-    u32 gtier[4], ngtier;
+    u32 gtier[6], ngtier;
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/i915/i915_gpu_error.h struct i915_gpu_state { · line 64

Quoted 3 lines
drivers/gpu/drm/i915/i915_gpu_error.h +0 -0
       u32 ccid;
       u32 derrmr;
       u32 forcewake;

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#9 lore raw

✓ Fi.CI.BAT: success for drm/i915/icl: Read the correct Gen11 interrupt registers (rev2)

In reply to Oscar Mateo
== Series Details ==

== Series Details ==

Series: drm/i915/icl: Read the correct Gen11 interrupt registers (rev2)
URL : https://patchwork.freedesktop.org/series/43027/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4164 -> Patchwork_8977 =

== Summary - WARNING ==

Minor unknown changes coming with Patchwork_8977 need to be verified manually.

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

External URL: https://patchwork.freedesktop.org/api/1.0/series/43027/revisions/2/mbox/

== Possible new issues ==

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

=== IGT changes ===

    ==== Warnings ====

    igt@gem_exec_gttfill@basic:
      fi-pnv-d510:        PASS -> SKIP

== Known issues ==

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

=== IGT changes ===

    ==== Issues hit ====

    igt@kms_chamelium@dp-edid-read:
      fi-kbl-7500u:       PASS -> FAIL (fdo#103841)

    
    ==== Possible fixes ====

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
      fi-bxt-dsi:         INCOMPLETE (fdo#103927) -> PASS
      fi-cnl-psr:         DMESG-WARN (fdo#104951) -> PASS

fdo#103841 https://bugs.freedesktop.org/show_bug.cgi?id=103841
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fdo#104951 https://bugs.freedesktop.org/show_bug.cgi?id=104951

== Participating hosts (40 -> 37) ==

Additional (1): fi-byt-j1900
Missing (4): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-skl-6700hq

== Build changes ==

* Linux: CI_DRM_4164 -> Patchwork_8977

CI_DRM_4164: a44969bdb6d69244a063eac7f76ea46353960409 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4475: 35f08c12aa216d5b62a5b9984b575cee6905098f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_8977: fe3ca93631ddf6a4be3cd9753bb083ace33dbf26 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4475: 3ba0657bff4216d1ec7179935590261855f1651e @ git://anongit.freedesktop.org/piglit

== Linux commits ==

fe3ca93631dd drm/i915/icl: Read the correct Gen11 interrupt registers

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8977/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#10 lore raw

✓ Fi.CI.IGT: success for drm/i915/icl: Read the correct Gen11 interrupt registers (rev2)

In reply to Oscar Mateo
== Series Details ==

== Series Details ==

Series: drm/i915/icl: Read the correct Gen11 interrupt registers (rev2)
URL : https://patchwork.freedesktop.org/series/43027/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4164_full -> Patchwork_8977_full =

== Summary - WARNING ==

Minor unknown changes coming with Patchwork_8977_full need to be verified manually.

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

External URL: https://patchwork.freedesktop.org/api/1.0/series/43027/revisions/2/mbox/

== Possible new issues ==

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

=== IGT changes ===

    ==== Warnings ====

    igt@gem_exec_schedule@deep-bsd1:
      shard-kbl:          PASS -> SKIP

    igt@gem_pwrite@big-cpu-random:
      shard-apl:          SKIP -> PASS

== Known issues ==

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

=== IGT changes ===

    ==== Issues hit ====

    igt@kms_flip@flip-vs-absolute-wf_vblank-interruptible:
      shard-glk:          PASS -> FAIL (fdo#100368)

    igt@kms_flip@flip-vs-expired-vblank:
      shard-glk:          PASS -> FAIL (fdo#105707)

    igt@kms_frontbuffer_tracking@fbc-rgb101010-draw-render:
      shard-apl:          PASS -> FAIL (fdo#104724, fdo#103167)

    igt@kms_plane@plane-panning-top-left-pipe-c-planes:
      shard-kbl:          PASS -> DMESG-WARN (fdo#105602, fdo#103558) +9

    
    ==== Possible fixes ====

    igt@kms_flip@flip-vs-expired-vblank-interruptible:
      shard-glk:          FAIL (fdo#105363) -> PASS

    igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-draw-mmap-gtt:
      shard-hsw:          DMESG-FAIL (fdo#104724, fdo#103167) -> PASS

fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103558 https://bugs.freedesktop.org/show_bug.cgi?id=103558
fdo#104724 https://bugs.freedesktop.org/show_bug.cgi?id=104724
fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602
fdo#105707 https://bugs.freedesktop.org/show_bug.cgi?id=105707

== Participating hosts (9 -> 9) ==

No changes in participating hosts

== Build changes ==

* Linux: CI_DRM_4164 -> Patchwork_8977

CI_DRM_4164: a44969bdb6d69244a063eac7f76ea46353960409 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4475: 35f08c12aa216d5b62a5b9984b575cee6905098f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_8977: fe3ca93631ddf6a4be3cd9753bb083ace33dbf26 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4475: 3ba0657bff4216d1ec7179935590261855f1651e @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8977/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx