Skip to contentSkip to conversation

SSEU detection for CHV

PATCH Superseded [email protected] 4 participants 12 messages Feb 27, 2015 – Mar 9, 2015

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

cover SSEU detection for CHV

From: Jeff McGee <[email protected]>

These two patches add detection of available and enabled slice/subslice/EU on CHV following the implementation recently merged for SKL. They have been requested to help CHV users determine their configuration through the debugfs interface.

Jeff McGee (2):
drm/i915/chv: Determine CHV slice/subslice/EU info drm/i915/chv: Add CHV HW status to SSEU status

 drivers/gpu/drm/i915/i915_debugfs.c | 31 ++++++++++++++++++++++++++--
 drivers/gpu/drm/i915/i915_dma.c     | 40 +++++++++++++++++++++++++++++++------
 drivers/gpu/drm/i915/i915_reg.h     | 13 ++++++++++++
 3 files changed, 76 insertions(+), 8 deletions(-)
Signature · 6 lines
2.3.0

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

PATCH 1/2 drm/i915/chv: Determine CHV slice/subslice/EU info

From: Jeff McGee <[email protected]>

Total EU was already being detected on CHV, so we just add the additional info parameters. The detection method is changed to be more robust in the case of subslice fusing - we don't want to trust the EU fuse bits corresponding to subslices which are fused-off.

---
 drivers/gpu/drm/i915/i915_dma.c | 40 ++++++++++++++++++++++++++++++++++------
 drivers/gpu/drm/i915/i915_reg.h |  2 ++
 2 files changed, 36 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/i915_dma.c +34 -6
index 053e178..04e5b55e 100644
@@ -608,14 +608,42 @@ static void intel_device_info_runtime_init(struct drm_device *dev)
 
 	/* Initialize slice/subslice/EU info */
 	if (IS_CHERRYVIEW(dev)) {
-		u32 fuse, mask_eu;
+		u32 fuse, eu_dis;
 
 		fuse = I915_READ(CHV_FUSE_GT);
-		mask_eu = fuse & (CHV_FGT_EU_DIS_SS0_R0_MASK |
-				  CHV_FGT_EU_DIS_SS0_R1_MASK |
-				  CHV_FGT_EU_DIS_SS1_R0_MASK |
-				  CHV_FGT_EU_DIS_SS1_R1_MASK);
-		info->eu_total = 16 - hweight32(mask_eu);
+
+		info->slice_total = 1;
+
+		if (!(fuse & CHV_FGT_DISABLE_SS0)) {
+			info->subslice_per_slice++;
+			eu_dis = fuse & (CHV_FGT_EU_DIS_SS0_R0_MASK |
+					 CHV_FGT_EU_DIS_SS0_R1_MASK);
+			info->eu_total += 8 - hweight32(eu_dis);
+		}
+
+		if (!(fuse & CHV_FGT_DISABLE_SS1)) {
+			info->subslice_per_slice++;
+			eu_dis = fuse & (CHV_FGT_EU_DIS_SS1_R0_MASK |
+					CHV_FGT_EU_DIS_SS1_R1_MASK);
+			info->eu_total += 8 - hweight32(eu_dis);
+		}
+
+		info->subslice_total = info->subslice_per_slice;
+		/*
+		 * CHV expected to always have a uniform distribution of EU
+		 * across subslices.
+		*/
+		info->eu_per_subslice = info->subslice_total ?
+					info->eu_total / info->subslice_total :
+					0;
+		/*
+		 * CHV supports subslice power gating on devices with more than
+		 * one subslice, and supports EU power gating on devices with
+		 * more than one EU pair per subslice.
+		*/
+		info->has_slice_pg = 0;
+		info->has_subslice_pg = (info->subslice_total > 1) ? 1 : 0;
+		info->has_eu_pg = (info->eu_per_subslice > 2) ? 1 : 0;
 	} else if (IS_SKYLAKE(dev)) {
 		const int s_max = 3, ss_max = 4, eu_max = 8;
 		int s, ss;
drivers/gpu/drm/i915/i915_reg.h +2 -0
index 55143cb..a8b205d 100644
@@ -1522,6 +1522,8 @@ enum skl_disp_power_wells {
 
 /* Fuse readout registers for GT */
 #define CHV_FUSE_GT			(VLV_DISPLAY_BASE + 0x2168)
+#define   CHV_FGT_DISABLE_SS0		10
+#define   CHV_FGT_DISABLE_SS1		11
 #define   CHV_FGT_EU_DIS_SS0_R0_SHIFT	16
 #define   CHV_FGT_EU_DIS_SS0_R0_MASK	(0xf << CHV_FGT_EU_DIS_SS0_R0_SHIFT)
 #define   CHV_FGT_EU_DIS_SS0_R1_SHIFT	20
Signature · 6 lines
2.3.0

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

Re: [PATCH 1/2] drm/i915/chv: Determine CHV slice/subslice/EU info

Quoted 25 lines · On Fri, Feb 27, 2015 at 10:22:31AM -0800, [email protected] wrote:

From: Jeff McGee <[email protected]>

Total EU was already being detected on CHV, so we just add the additional info parameters. The detection method is changed to be more robust in the case of subslice fusing - we don't want to trust the EU fuse bits corresponding to subslices which are fused-off.

---
 drivers/gpu/drm/i915/i915_dma.c | 40 ++++++++++++++++++++++++++++++++++------
 drivers/gpu/drm/i915/i915_reg.h |  2 ++
 2 files changed, 36 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/i915_dma.c +1 -1
index 053e178..04e5b55e 100644
@@ -608,14 +608,42 @@ static void intel_device_info_runtime_init(struct drm_device *dev)
 
 	/* Initialize slice/subslice/EU info */
 	if (IS_CHERRYVIEW(dev)) {
-		u32 fuse, mask_eu;
+		u32 fuse, eu_dis;
 

drivers/gpu/drm/i915/i915_dma.c static void intel_device_info_runtime_init(struct drm_device *dev) · line 617

Quoted 10 lines
drivers/gpu/drm/i915/i915_dma.c +4 -5
 		fuse = I915_READ(CHV_FUSE_GT);
-		mask_eu = fuse & (CHV_FGT_EU_DIS_SS0_R0_MASK |
-				  CHV_FGT_EU_DIS_SS0_R1_MASK |
-				  CHV_FGT_EU_DIS_SS1_R0_MASK |
-				  CHV_FGT_EU_DIS_SS1_R1_MASK);
-		info->eu_total = 16 - hweight32(mask_eu);
+
+		info->slice_total = 1;
+
+		if (!(fuse & CHV_FGT_DISABLE_SS0)) {
                             ^^^^^^^^^^^^^^^^^^^

That's your shift value. Masking with it probably won't work :P

drivers/gpu/drm/i915/i915_dma.c static void intel_device_info_runtime_init(struct drm_device *dev) · line 624

Quoted 7 lines
drivers/gpu/drm/i915/i915_dma.c +7 -0
+			info->subslice_per_slice++;
+			eu_dis = fuse & (CHV_FGT_EU_DIS_SS0_R0_MASK |
+					 CHV_FGT_EU_DIS_SS0_R1_MASK);
+			info->eu_total += 8 - hweight32(eu_dis);
+		}
+
+		if (!(fuse & CHV_FGT_DISABLE_SS1)) {

ditto

Quoted 12 lines
drivers/gpu/drm/i915/i915_dma.c +12 -0
+			info->subslice_per_slice++;
+			eu_dis = fuse & (CHV_FGT_EU_DIS_SS1_R0_MASK |
+					CHV_FGT_EU_DIS_SS1_R1_MASK);
+			info->eu_total += 8 - hweight32(eu_dis);
+		}
+
+		info->subslice_total = info->subslice_per_slice;
+		/*
+		 * CHV expected to always have a uniform distribution of EU
+		 * across subslices.
+		*/
+		info->eu_per_subslice = info->subslice_total ?

drivers/gpu/drm/i915/i915_dma.c static void intel_device_info_runtime_init(struct drm_device *dev) · line 646

Quoted 10 lines
drivers/gpu/drm/i915/i915_dma.c +10 -0
+					info->eu_total / info->subslice_total :
+					0;
+		/*
+		 * CHV supports subslice power gating on devices with more than
+		 * one subslice, and supports EU power gating on devices with
+		 * more than one EU pair per subslice.
+		*/
+		info->has_slice_pg = 0;
+		info->has_subslice_pg = (info->subslice_total > 1) ? 1 : 0;
+		info->has_eu_pg = (info->eu_per_subslice > 2) ? 1 : 0;

Nit: use of ?: seems pointless in these.

Quoted 18 lines
drivers/gpu/drm/i915/i915_dma.c +0 -0
 	} else if (IS_SKYLAKE(dev)) {
 		const int s_max = 3, ss_max = 4, eu_max = 8;
 		int s, ss;
drivers/gpu/drm/i915/i915_reg.h +2 -0
index 55143cb..a8b205d 100644
@@ -1522,6 +1522,8 @@ enum skl_disp_power_wells {
 
 /* Fuse readout registers for GT */
 #define CHV_FUSE_GT			(VLV_DISPLAY_BASE + 0x2168)
+#define   CHV_FGT_DISABLE_SS0		10
+#define   CHV_FGT_DISABLE_SS1		11
 #define   CHV_FGT_EU_DIS_SS0_R0_SHIFT	16
 #define   CHV_FGT_EU_DIS_SS0_R0_MASK	(0xf << CHV_FGT_EU_DIS_SS0_R0_SHIFT)
 #define   CHV_FGT_EU_DIS_SS0_R1_SHIFT	20
Signature · 1 line
2.3.0
Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw

PATCH 2/2 drm/i915/chv: Add CHV HW status to SSEU status

In reply to [email protected]

From: Jeff McGee <[email protected]>

Collect the currently enabled counts of slice, subslice, and execution units using the power gate control ack message registers specific to Cherryview.

Slice/subslice/EU info and hardware status can now be determined for CHV, so allow the debugfs SSEU status dump to proceed for CHV devices.

---
 drivers/gpu/drm/i915/i915_debugfs.c | 31 +++++++++++++++++++++++++++++--
 drivers/gpu/drm/i915/i915_reg.h     | 11 +++++++++++
 2 files changed, 40 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +29 -2
index 94b3984..e42e79a 100644
@@ -4362,7 +4362,7 @@ static int i915_sseu_status(struct seq_file *m, void *unused)
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	unsigned int s_tot = 0, ss_tot = 0, ss_per = 0, eu_tot = 0, eu_per = 0;
 
-	if (INTEL_INFO(dev)->gen < 9)
+	if ((INTEL_INFO(dev)->gen < 8) || IS_BROADWELL(dev))
 		return -ENODEV;
 
 	seq_puts(m, "SSEU Device Info\n");
@@ -4384,7 +4384,34 @@ static int i915_sseu_status(struct seq_file *m, void *unused)
 		   yesno(INTEL_INFO(dev)->has_eu_pg));
 
 	seq_puts(m, "SSEU Device Status\n");
-	if (IS_SKYLAKE(dev)) {
+	if (IS_CHERRYVIEW(dev)) {
+		const int ss_max = 2;
+		int ss;
+		u32 sig1[ss_max], sig2[ss_max];
+
+		sig1[0] = I915_READ(CHV_POWER_SS0_SIG1);
+		sig1[1] = I915_READ(CHV_POWER_SS1_SIG1);
+		sig2[0] = I915_READ(CHV_POWER_SS0_SIG2);
+		sig2[1] = I915_READ(CHV_POWER_SS1_SIG2);
+
+		for (ss = 0; ss < ss_max; ss++) {
+			unsigned int eu_cnt;
+
+			if (sig1[ss] & CHV_SS_PG_ENABLE)
+				/* skip disabled subslice */
+				continue;
+
+			s_tot = 1;
+			ss_per++;
+			eu_cnt = ((sig1[ss] & CHV_EU08_PG_ENABLE) ? 0 : 2) +
+				 ((sig1[ss] & CHV_EU19_PG_ENABLE) ? 0 : 2) +
+				 ((sig1[ss] & CHV_EU210_PG_ENABLE) ? 0 : 2) +
+				 ((sig2[ss] & CHV_EU311_PG_ENABLE) ? 0 : 2);
+			eu_tot += eu_cnt;
+			eu_per = max(eu_per, eu_cnt);
+		}
+		ss_tot = ss_per;
+	} else if (IS_SKYLAKE(dev)) {
 		const int s_max = 3, ss_max = 4;
 		int s, ss;
 		u32 s_reg[s_max], eu_reg[2*s_max], eu_mask[2];
drivers/gpu/drm/i915/i915_reg.h +11 -0
index a8b205d..659aefc 100644
@@ -6227,6 +6227,17 @@ enum skl_disp_power_wells {
 #define   GEN6_RC6			3
 #define   GEN6_RC7			4
 
+#define CHV_POWER_SS0_SIG1		0xa720
+#define CHV_POWER_SS1_SIG1		0xa728
+#define   CHV_SS_PG_ENABLE		(1<<1)
+#define   CHV_EU08_PG_ENABLE		(1<<9)
+#define   CHV_EU19_PG_ENABLE		(1<<17)
+#define   CHV_EU210_PG_ENABLE		(1<<25)
+
+#define CHV_POWER_SS0_SIG2		0xa724
+#define CHV_POWER_SS1_SIG2		0xa72c
+#define   CHV_EU311_PG_ENABLE		(1<<1)
+
 #define GEN9_SLICE0_PGCTL_ACK		0x804c
 #define GEN9_SLICE1_PGCTL_ACK		0x8050
 #define GEN9_SLICE2_PGCTL_ACK		0x8054
Signature · 6 lines
2.3.0

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 2/2
#4 lore raw

Re: [PATCH 2/2] drm/i915/chv: Add CHV HW status to SSEU status

Quoted 11 lines · On Fri, Feb 27, 2015 at 10:22:32AM -0800, [email protected] wrote:

From: Jeff McGee <[email protected]>

Collect the currently enabled counts of slice, subslice, and execution units using the power gate control ack message registers specific to Cherryview.

Slice/subslice/EU info and hardware status can now be determined for CHV, so allow the debugfs SSEU status dump to proceed for CHV devices.

Quoted 78 lines
---
 drivers/gpu/drm/i915/i915_debugfs.c | 31 +++++++++++++++++++++++++++++--
 drivers/gpu/drm/i915/i915_reg.h     | 11 +++++++++++
 2 files changed, 40 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +29 -2
index 94b3984..e42e79a 100644
@@ -4362,7 +4362,7 @@ static int i915_sseu_status(struct seq_file *m, void *unused)
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	unsigned int s_tot = 0, ss_tot = 0, ss_per = 0, eu_tot = 0, eu_per = 0;
 
-	if (INTEL_INFO(dev)->gen < 9)
+	if ((INTEL_INFO(dev)->gen < 8) || IS_BROADWELL(dev))
 		return -ENODEV;
 
 	seq_puts(m, "SSEU Device Info\n");
@@ -4384,7 +4384,34 @@ static int i915_sseu_status(struct seq_file *m, void *unused)
 		   yesno(INTEL_INFO(dev)->has_eu_pg));
 
 	seq_puts(m, "SSEU Device Status\n");
-	if (IS_SKYLAKE(dev)) {
+	if (IS_CHERRYVIEW(dev)) {
+		const int ss_max = 2;
+		int ss;
+		u32 sig1[ss_max], sig2[ss_max];
+
+		sig1[0] = I915_READ(CHV_POWER_SS0_SIG1);
+		sig1[1] = I915_READ(CHV_POWER_SS1_SIG1);
+		sig2[0] = I915_READ(CHV_POWER_SS0_SIG2);
+		sig2[1] = I915_READ(CHV_POWER_SS1_SIG2);
+
+		for (ss = 0; ss < ss_max; ss++) {
+			unsigned int eu_cnt;
+
+			if (sig1[ss] & CHV_SS_PG_ENABLE)
+				/* skip disabled subslice */
+				continue;
+
+			s_tot = 1;
+			ss_per++;
+			eu_cnt = ((sig1[ss] & CHV_EU08_PG_ENABLE) ? 0 : 2) +
+				 ((sig1[ss] & CHV_EU19_PG_ENABLE) ? 0 : 2) +
+				 ((sig1[ss] & CHV_EU210_PG_ENABLE) ? 0 : 2) +
+				 ((sig2[ss] & CHV_EU311_PG_ENABLE) ? 0 : 2);
+			eu_tot += eu_cnt;
+			eu_per = max(eu_per, eu_cnt);
+		}
+		ss_tot = ss_per;
+	} else if (IS_SKYLAKE(dev)) {
 		const int s_max = 3, ss_max = 4;
 		int s, ss;
 		u32 s_reg[s_max], eu_reg[2*s_max], eu_mask[2];
drivers/gpu/drm/i915/i915_reg.h +11 -0
index a8b205d..659aefc 100644
@@ -6227,6 +6227,17 @@ enum skl_disp_power_wells {
 #define   GEN6_RC6			3
 #define   GEN6_RC7			4
 
+#define CHV_POWER_SS0_SIG1		0xa720
+#define CHV_POWER_SS1_SIG1		0xa728
+#define   CHV_SS_PG_ENABLE		(1<<1)
+#define   CHV_EU08_PG_ENABLE		(1<<9)
+#define   CHV_EU19_PG_ENABLE		(1<<17)
+#define   CHV_EU210_PG_ENABLE		(1<<25)
+
+#define CHV_POWER_SS0_SIG2		0xa724
+#define CHV_POWER_SS1_SIG2		0xa72c
+#define   CHV_EU311_PG_ENABLE		(1<<1)
+
 #define GEN9_SLICE0_PGCTL_ACK		0x804c
 #define GEN9_SLICE1_PGCTL_ACK		0x8050
 #define GEN9_SLICE2_PGCTL_ACK		0x8054
Signature · 1 line
2.3.0
Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Tested-by on v1 2/2
#5 lore raw

Re: [PATCH 2/2] drm/i915/chv: Add CHV HW status to SSEU status

In reply to [email protected]

Task id: 5863 -------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied
PNV -7 278/278 271/278
ILK 308/308 308/308
SNB -1 284/284 283/284

IVB                                  380/380              380/380
BYT                                  294/294              294/294
HSW                 -2              387/387              385/387
BDW                 -1              316/316              315/316
-------------------------------------Detailed-------------------------------------
Platform  Test                                drm-intel-nightly          Series Applied
 PNV  igt_gem_userptr_blits_coherency-sync      CRASH(2)PASS(6)      CRASH(2)
 PNV  igt_gem_userptr_blits_coherency-unsync      CRASH(2)PASS(5)      CRASH(1)PASS(1)
*PNV  igt_gem_userptr_blits_create-destroy-sync      PASS(2)      NRUN(1)PASS(1)
*PNV  igt_gem_userptr_blits_minor-sync-interruptible      PASS(2)      DMESG_WARN(1)PASS(1)
 PNV  igt_gen3_render_linear_blits      FAIL(3)PASS(5)      FAIL(2)
 PNV  igt_gen3_render_mixed_blits      FAIL(2)PASS(7)      FAIL(2)
 PNV  igt_gem_fence_thrash_bo-write-verify-threaded-none      FAIL(1)CRASH(1)PASS(3)      CRASH(1)PASS(1)
*SNB  igt_gem_fence_thrash_bo-write-verify-y      PASS(3)      DMESG_WARN(1)PASS(1)
*HSW  igt_gem_bad_length      PASS(2)      DMESG_WARN(1)PASS(1)
*HSW  igt_gem_storedw_loop_blt      PASS(3)      DMESG_WARN(1)PASS(1)
*BDW  igt_gem_gtt_hog      PASS(10)      DMESG_WARN(1)PASS(1)

Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#6 lore raw

PATCH v2 1/2 drm/i915/chv: Determine CHV slice/subslice/EU info

In reply to [email protected]

From: Jeff McGee <[email protected]>

Total EU was already being detected on CHV, so we just add the additional info parameters. The detection method is changed to be more robust in the case of subslice fusing - we don't want to trust the EU fuse bits corresponding to subslices which are fused-off.

v2: Fixed subslice disable bitmasks and removed unnecessary ?
operation (Ville)

---
 drivers/gpu/drm/i915/i915_dma.c | 40 ++++++++++++++++++++++++++++++++++------
 drivers/gpu/drm/i915/i915_reg.h |  2 ++
 2 files changed, 36 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/i915_dma.c +34 -6
index 9cbe3f5..4c33068 100644
@@ -619,14 +619,42 @@ static void intel_device_info_runtime_init(struct drm_device *dev)
 
 	/* Initialize slice/subslice/EU info */
 	if (IS_CHERRYVIEW(dev)) {
-		u32 fuse, mask_eu;
+		u32 fuse, eu_dis;
 
 		fuse = I915_READ(CHV_FUSE_GT);
-		mask_eu = fuse & (CHV_FGT_EU_DIS_SS0_R0_MASK |
-				  CHV_FGT_EU_DIS_SS0_R1_MASK |
-				  CHV_FGT_EU_DIS_SS1_R0_MASK |
-				  CHV_FGT_EU_DIS_SS1_R1_MASK);
-		info->eu_total = 16 - hweight32(mask_eu);
+
+		info->slice_total = 1;
+
+		if (!(fuse & CHV_FGT_DISABLE_SS0)) {
+			info->subslice_per_slice++;
+			eu_dis = fuse & (CHV_FGT_EU_DIS_SS0_R0_MASK |
+					 CHV_FGT_EU_DIS_SS0_R1_MASK);
+			info->eu_total += 8 - hweight32(eu_dis);
+		}
+
+		if (!(fuse & CHV_FGT_DISABLE_SS1)) {
+			info->subslice_per_slice++;
+			eu_dis = fuse & (CHV_FGT_EU_DIS_SS1_R0_MASK |
+					CHV_FGT_EU_DIS_SS1_R1_MASK);
+			info->eu_total += 8 - hweight32(eu_dis);
+		}
+
+		info->subslice_total = info->subslice_per_slice;
+		/*
+		 * CHV expected to always have a uniform distribution of EU
+		 * across subslices.
+		*/
+		info->eu_per_subslice = info->subslice_total ?
+					info->eu_total / info->subslice_total :
+					0;
+		/*
+		 * CHV supports subslice power gating on devices with more than
+		 * one subslice, and supports EU power gating on devices with
+		 * more than one EU pair per subslice.
+		*/
+		info->has_slice_pg = 0;
+		info->has_subslice_pg = (info->subslice_total > 1);
+		info->has_eu_pg = (info->eu_per_subslice > 2);
 	} else if (IS_SKYLAKE(dev)) {
 		const int s_max = 3, ss_max = 4, eu_max = 8;
 		int s, ss;
drivers/gpu/drm/i915/i915_reg.h +2 -0
index e0a525c..ed84603 100644
@@ -1510,6 +1510,8 @@ enum skl_disp_power_wells {
 
 /* Fuse readout registers for GT */
 #define CHV_FUSE_GT			(VLV_DISPLAY_BASE + 0x2168)
+#define   CHV_FGT_DISABLE_SS0		(1 << 10)
+#define   CHV_FGT_DISABLE_SS1		(1 << 11)
 #define   CHV_FGT_EU_DIS_SS0_R0_SHIFT	16
 #define   CHV_FGT_EU_DIS_SS0_R0_MASK	(0xf << CHV_FGT_EU_DIS_SS0_R0_SHIFT)
 #define   CHV_FGT_EU_DIS_SS0_R1_SHIFT	20
Signature · 6 lines
2.3.0

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v2 1/2
#7 lore raw

Re: [PATCH v2 1/2] drm/i915/chv: Determine CHV slice/subslice/EU info

Quoted 8 lines · On Fri, Feb 27, 2015 at 12:12:28PM -0800, [email protected] wrote:

From: Jeff McGee <[email protected]>

Total EU was already being detected on CHV, so we just add the additional info parameters. The detection method is changed to be more robust in the case of subslice fusing - we don't want to trust the EU fuse bits corresponding to subslices which are fused-off.

Quoted 4 lines

v2: Fixed subslice disable bitmasks and removed unnecessary ?
operation (Ville)

Quoted 73 lines
---
 drivers/gpu/drm/i915/i915_dma.c | 40 ++++++++++++++++++++++++++++++++++------
 drivers/gpu/drm/i915/i915_reg.h |  2 ++
 2 files changed, 36 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/i915_dma.c +34 -6
index 9cbe3f5..4c33068 100644
@@ -619,14 +619,42 @@ static void intel_device_info_runtime_init(struct drm_device *dev)
 
 	/* Initialize slice/subslice/EU info */
 	if (IS_CHERRYVIEW(dev)) {
-		u32 fuse, mask_eu;
+		u32 fuse, eu_dis;
 
 		fuse = I915_READ(CHV_FUSE_GT);
-		mask_eu = fuse & (CHV_FGT_EU_DIS_SS0_R0_MASK |
-				  CHV_FGT_EU_DIS_SS0_R1_MASK |
-				  CHV_FGT_EU_DIS_SS1_R0_MASK |
-				  CHV_FGT_EU_DIS_SS1_R1_MASK);
-		info->eu_total = 16 - hweight32(mask_eu);
+
+		info->slice_total = 1;
+
+		if (!(fuse & CHV_FGT_DISABLE_SS0)) {
+			info->subslice_per_slice++;
+			eu_dis = fuse & (CHV_FGT_EU_DIS_SS0_R0_MASK |
+					 CHV_FGT_EU_DIS_SS0_R1_MASK);
+			info->eu_total += 8 - hweight32(eu_dis);
+		}
+
+		if (!(fuse & CHV_FGT_DISABLE_SS1)) {
+			info->subslice_per_slice++;
+			eu_dis = fuse & (CHV_FGT_EU_DIS_SS1_R0_MASK |
+					CHV_FGT_EU_DIS_SS1_R1_MASK);
+			info->eu_total += 8 - hweight32(eu_dis);
+		}
+
+		info->subslice_total = info->subslice_per_slice;
+		/*
+		 * CHV expected to always have a uniform distribution of EU
+		 * across subslices.
+		*/
+		info->eu_per_subslice = info->subslice_total ?
+					info->eu_total / info->subslice_total :
+					0;
+		/*
+		 * CHV supports subslice power gating on devices with more than
+		 * one subslice, and supports EU power gating on devices with
+		 * more than one EU pair per subslice.
+		*/
+		info->has_slice_pg = 0;
+		info->has_subslice_pg = (info->subslice_total > 1);
+		info->has_eu_pg = (info->eu_per_subslice > 2);
 	} else if (IS_SKYLAKE(dev)) {
 		const int s_max = 3, ss_max = 4, eu_max = 8;
 		int s, ss;
drivers/gpu/drm/i915/i915_reg.h +2 -0
index e0a525c..ed84603 100644
@@ -1510,6 +1510,8 @@ enum skl_disp_power_wells {
 
 /* Fuse readout registers for GT */
 #define CHV_FUSE_GT			(VLV_DISPLAY_BASE + 0x2168)
+#define   CHV_FGT_DISABLE_SS0		(1 << 10)
+#define   CHV_FGT_DISABLE_SS1		(1 << 11)
 #define   CHV_FGT_EU_DIS_SS0_R0_SHIFT	16
 #define   CHV_FGT_EU_DIS_SS0_R0_MASK	(0xf << CHV_FGT_EU_DIS_SS0_R0_SHIFT)
 #define   CHV_FGT_EU_DIS_SS0_R1_SHIFT	20
Signature · 1 line
2.3.0
Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
author
#8 lore raw

Re: [PATCH v2 1/2] drm/i915/chv: Determine CHV slice/subslice/EU info

Quoted 9 lines · Ville Syrjälä
Quoted 8 lines · On Fri, Feb 27, 2015 at 12:12:28PM -0800, [email protected] wrote:

From: Jeff McGee <[email protected]>

Total EU was already being detected on CHV, so we just add the additional info parameters. The detection method is changed to be more robust in the case of subslice fusing - we don't want to trust the EU fuse bits corresponding to subslices which are fused-off.

Quoted 7 lines
Quoted 4 lines

v2: Fixed subslice disable bitmasks and removed unnecessary ?
operation (Ville)

This patch now also needed to support the export of CHV subslice count to userspace (beignet).

http://lists.freedesktop.org/archives/intel-gfx/2015-March/061100.html

Quoted 64 lines
Quoted 64 lines
---
 drivers/gpu/drm/i915/i915_dma.c | 40 ++++++++++++++++++++++++++++++++++------
 drivers/gpu/drm/i915/i915_reg.h |  2 ++
 2 files changed, 36 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/i915_dma.c +34 -6
index 9cbe3f5..4c33068 100644
@@ -619,14 +619,42 @@ static void intel_device_info_runtime_init(struct drm_device *dev)
 
 	/* Initialize slice/subslice/EU info */
 	if (IS_CHERRYVIEW(dev)) {
-		u32 fuse, mask_eu;
+		u32 fuse, eu_dis;
 
 		fuse = I915_READ(CHV_FUSE_GT);
-		mask_eu = fuse & (CHV_FGT_EU_DIS_SS0_R0_MASK |
-				  CHV_FGT_EU_DIS_SS0_R1_MASK |
-				  CHV_FGT_EU_DIS_SS1_R0_MASK |
-				  CHV_FGT_EU_DIS_SS1_R1_MASK);
-		info->eu_total = 16 - hweight32(mask_eu);
+
+		info->slice_total = 1;
+
+		if (!(fuse & CHV_FGT_DISABLE_SS0)) {
+			info->subslice_per_slice++;
+			eu_dis = fuse & (CHV_FGT_EU_DIS_SS0_R0_MASK |
+					 CHV_FGT_EU_DIS_SS0_R1_MASK);
+			info->eu_total += 8 - hweight32(eu_dis);
+		}
+
+		if (!(fuse & CHV_FGT_DISABLE_SS1)) {
+			info->subslice_per_slice++;
+			eu_dis = fuse & (CHV_FGT_EU_DIS_SS1_R0_MASK |
+					CHV_FGT_EU_DIS_SS1_R1_MASK);
+			info->eu_total += 8 - hweight32(eu_dis);
+		}
+
+		info->subslice_total = info->subslice_per_slice;
+		/*
+		 * CHV expected to always have a uniform distribution of EU
+		 * across subslices.
+		*/
+		info->eu_per_subslice = info->subslice_total ?
+					info->eu_total / info->subslice_total :
+					0;
+		/*
+		 * CHV supports subslice power gating on devices with more than
+		 * one subslice, and supports EU power gating on devices with
+		 * more than one EU pair per subslice.
+		*/
+		info->has_slice_pg = 0;
+		info->has_subslice_pg = (info->subslice_total > 1);
+		info->has_eu_pg = (info->eu_per_subslice > 2);
 	} else if (IS_SKYLAKE(dev)) {
 		const int s_max = 3, ss_max = 4, eu_max = 8;
 		int s, ss;
drivers/gpu/drm/i915/i915_reg.h +0 -0
index e0a525c..ed84603 100644
@@ -1510,6 +1510,8 @@ enum skl_disp_power_wells {
 
Quoted 13 lines
Quoted 9 lines
drivers/gpu/drm/i915/i915_reg.h +2 -0
 /* Fuse readout registers for GT */
 #define CHV_FUSE_GT			(VLV_DISPLAY_BASE + 0x2168)
+#define   CHV_FGT_DISABLE_SS0		(1 << 10)
+#define   CHV_FGT_DISABLE_SS1		(1 << 11)
 #define   CHV_FGT_EU_DIS_SS0_R0_SHIFT	16
 #define   CHV_FGT_EU_DIS_SS0_R0_MASK	(0xf << CHV_FGT_EU_DIS_SS0_R0_SHIFT)
 #define   CHV_FGT_EU_DIS_SS0_R1_SHIFT	20
Signature · 1 line
2.3.0
Signature · 2 lines
Ville Syrjälä
Intel OTC

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

author
#9 lore raw
In reply to [email protected]
Quoted 7 lines · On Fri, Feb 27, 2015 at 10:22:30AM -0800, [email protected] wrote:

From: Jeff McGee <[email protected]>

These two patches add detection of available and enabled slice/subslice/EU on CHV following the implementation recently merged for SKL. They have been requested to help CHV users determine their configuration through the debugfs interface.

Quoted 9 lines

Jeff McGee (2):
drm/i915/chv: Determine CHV slice/subslice/EU info drm/i915/chv: Add CHV HW status to SSEU status

 drivers/gpu/drm/i915/i915_debugfs.c | 31 ++++++++++++++++++++++++++--
 drivers/gpu/drm/i915/i915_dma.c     | 40 +++++++++++++++++++++++++++++++------
 drivers/gpu/drm/i915/i915_reg.h     | 13 ++++++++++++
 3 files changed, 76 insertions(+), 8 deletions(-)

This appears reviewed and ready for merge. Can we merge? -Jeff

Quoted 3 lines
Signature · 1 line
2.3.0

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

#10 lore raw
Quoted 12 lines · Jeff McGee
Quoted 11 lines · On Fri, Feb 27, 2015 at 10:22:30AM -0800, [email protected] wrote:

From: Jeff McGee <[email protected]>

These two patches add detection of available and enabled slice/subslice/EU on CHV following the implementation recently merged for SKL. They have been requested to help CHV users determine their configuration through the debugfs interface.

Jeff McGee (2):
drm/i915/chv: Determine CHV slice/subslice/EU info drm/i915/chv: Add CHV HW status to SSEU status

Quoted 7 lines
Quoted 5 lines
 drivers/gpu/drm/i915/i915_debugfs.c | 31 ++++++++++++++++++++++++++--
 drivers/gpu/drm/i915/i915_dma.c     | 40 +++++++++++++++++++++++++++++++------
 drivers/gpu/drm/i915/i915_reg.h     | 13 ++++++++++++
 3 files changed, 76 insertions(+), 8 deletions(-)

This appears reviewed and ready for merge. Can we merge?

I didn't realize that you've resent patch 1 since it wasn't in-reply-to v1 of patch 1/2 but as a reply to the cover letter. Reply-to cover letter is usually used for additional follow-up patches. Hence I didn't realize that your patches are ready for merging.

Applied now, thanks.
-Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
author
#11 lore raw
Quoted 21 lines · Daniel Vetter
Quoted 12 lines · Jeff McGee
Quoted 11 lines · On Fri, Feb 27, 2015 at 10:22:30AM -0800, [email protected] wrote:

From: Jeff McGee <[email protected]>

These two patches add detection of available and enabled slice/subslice/EU on CHV following the implementation recently merged for SKL. They have been requested to help CHV users determine their configuration through the debugfs interface.

Jeff McGee (2):
drm/i915/chv: Determine CHV slice/subslice/EU info drm/i915/chv: Add CHV HW status to SSEU status

Quoted 7 lines
Quoted 5 lines
 drivers/gpu/drm/i915/i915_debugfs.c | 31 ++++++++++++++++++++++++++--
 drivers/gpu/drm/i915/i915_dma.c     | 40 +++++++++++++++++++++++++++++++------
 drivers/gpu/drm/i915/i915_reg.h     | 13 ++++++++++++
 3 files changed, 76 insertions(+), 8 deletions(-)

This appears reviewed and ready for merge. Can we merge?

Quoted 8 lines

I didn't realize that you've resent patch 1 since it wasn't in-reply-to v1 of patch 1/2 but as a reply to the cover letter. Reply-to cover letter is usually used for additional follow-up patches. Hence I didn't realize that your patches are ready for merging.

Applied now, thanks.
-Daniel

Yeah, I meant to send that v2 in reply to the v1 but confused the message ids. Will get that right next time. Thanks for the merge.
-Jeff
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx