All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/pvc: Add register steering
@ 2022-06-03  0:53 ` Matt Roper
  0 siblings, 0 replies; 6+ messages in thread
From: Matt Roper @ 2022-06-03  0:53 UTC (permalink / raw)
  To: intel-gfx; +Cc: dri-devel

Ponte Vecchio no longer has MSLICE or LNCF steering, but the bspec does
document several new types of multicast register ranges.  Fortunately,
most of the different MCR types all provide valid values at instance
(0,0) so there's no need to read fuse registers and calculate a valid
instance.  We'll lump all of those range types (BSLICE, HALFBSLICE,
TILEPSMI, CC, and L3BANK) into a single category called "INSTANCE0" to
keep things simple.  We'll also perform explicit steering for each of
these multicast register types, even if the implicit steering setup for
COMPUTE/DSS ranges would have worked too; this is based on guidance from
our hardware architects who suggested that we move away from implicit
steering and start explicitly steer all MCR register accesses on modern
platforms (we'll work on transitioning COMPUTE/DSS to explicit steering
in the future).

Note that there's one additional MCR range type defined in the bspec
(SQIDI) that we don't handle here.  Those ranges use a different
steering control register that we never touch; since instance 0 is also
always a valid setting there, we can just ignore those ranges.

Finally, we'll rename the HAS_MSLICES() macro to HAS_MSLICE_STEERING().
PVC hardware still has units referred to as mslices, but there's no
register steering based on mslice for this platform.

Bspec: 67609
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
 drivers/gpu/drm/i915/gt/intel_gt.c          | 50 ++++++++++++++++++---
 drivers/gpu/drm/i915/gt/intel_gt_types.h    |  7 +++
 drivers/gpu/drm/i915/gt/intel_workarounds.c | 22 ++++++++-
 drivers/gpu/drm/i915/i915_drv.h             |  3 +-
 drivers/gpu/drm/i915/i915_pci.c             |  3 +-
 drivers/gpu/drm/i915/intel_device_info.h    |  2 +-
 6 files changed, 76 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_gt.c b/drivers/gpu/drm/i915/gt/intel_gt.c
index ddfb98f70489..b335eacd7a6c 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt.c
+++ b/drivers/gpu/drm/i915/gt/intel_gt.c
@@ -106,6 +106,7 @@ static const char * const intel_steering_types[] = {
 	"L3BANK",
 	"MSLICE",
 	"LNCF",
+	"INSTANCE 0",
 };
 
 static const struct intel_mmio_range icl_l3bank_steering_table[] = {
@@ -133,6 +134,27 @@ static const struct intel_mmio_range dg2_lncf_steering_table[] = {
 	{},
 };
 
+/*
+ * We have several types of MCR registers on PVC where steering to (0,0)
+ * will always provide us with a non-terminated value.  We'll stick them
+ * all in the same table for simplicity.
+ */
+static const struct intel_mmio_range pvc_instance0_steering_table[] = {
+	{ 0x004000, 0x004AFF },		/* HALF-BSLICE */
+	{ 0x008A80, 0x008AFF },		/* TILEPSMI */
+	{ 0x008800, 0x00887F },		/* CC */
+	{ 0x00B000, 0x00B0FF },		/* HALF-BSLICE */
+	{ 0x00B100, 0x00B3FF },		/* L3BANK */
+	{ 0x00C800, 0x00CFFF },		/* HALF-BSLICE */
+	{ 0x00D800, 0x00D8FF },		/* HALF-BSLICE */
+	{ 0x00DD00, 0x00DDFF },		/* BSLICE */
+	{ 0x00E900, 0x00E9FF },		/* HALF-BSLICE */
+	{ 0x00EC00, 0x00EEFF },		/* HALF-BSLICE */
+	{ 0x00F000, 0x00FFFF },		/* HALF-BSLICE */
+	{ 0x024180, 0x0241FF },		/* HALF-BSLICE */
+	{},
+};
+
 int intel_gt_init_mmio(struct intel_gt *gt)
 {
 	struct drm_i915_private *i915 = gt->i915;
@@ -146,7 +168,7 @@ int intel_gt_init_mmio(struct intel_gt *gt)
 	 * An mslice is unavailable only if both the meml3 for the slice is
 	 * disabled *and* all of the DSS in the slice (quadrant) are disabled.
 	 */
-	if (HAS_MSLICES(i915)) {
+	if (HAS_MSLICE_STEERING(i915)) {
 		gt->info.mslice_mask =
 			intel_slicemask_from_xehp_dssmask(gt->info.sseu.subslice_mask,
 							  GEN_DSS_PER_MSLICE);
@@ -158,7 +180,9 @@ int intel_gt_init_mmio(struct intel_gt *gt)
 			drm_warn(&i915->drm, "mslice mask all zero!\n");
 	}
 
-	if (IS_DG2(i915)) {
+	if (IS_PONTEVECCHIO(i915)) {
+		gt->steering_table[INSTANCE0] = pvc_instance0_steering_table;
+	} else if (IS_DG2(i915)) {
 		gt->steering_table[MSLICE] = xehpsdv_mslice_steering_table;
 		gt->steering_table[LNCF] = dg2_lncf_steering_table;
 	} else if (IS_XEHPSDV(i915)) {
@@ -172,7 +196,11 @@ int intel_gt_init_mmio(struct intel_gt *gt)
 			GEN10_L3BANK_MASK;
 		if (!gt->info.l3bank_mask) /* should be impossible! */
 			drm_warn(&i915->drm, "L3 bank mask is all zero!\n");
-	} else if (HAS_MSLICES(i915)) {
+	} else if (GRAPHICS_VER(i915) >= 11) {
+		/*
+		 * We expect all modern platforms to have at least some
+		 * type of steering that needs to be initialized.
+		 */
 		MISSING_CASE(INTEL_INFO(i915)->platform);
 	}
 
@@ -888,7 +916,7 @@ static void intel_gt_get_valid_steering(struct intel_gt *gt,
 		*subsliceid = __ffs(gt->info.l3bank_mask);
 		break;
 	case MSLICE:
-		GEM_WARN_ON(!HAS_MSLICES(gt->i915));
+		GEM_WARN_ON(!HAS_MSLICE_STEERING(gt->i915));
 		*sliceid = __ffs(gt->info.mslice_mask);
 		*subsliceid = 0;	/* unused */
 		break;
@@ -897,10 +925,18 @@ static void intel_gt_get_valid_steering(struct intel_gt *gt,
 		 * An LNCF is always present if its mslice is present, so we
 		 * can safely just steer to LNCF 0 in all cases.
 		 */
-		GEM_WARN_ON(!HAS_MSLICES(gt->i915));
+		GEM_WARN_ON(!HAS_MSLICE_STEERING(gt->i915));
 		*sliceid = __ffs(gt->info.mslice_mask) << 1;
 		*subsliceid = 0;	/* unused */
 		break;
+	case INSTANCE0:
+		/*
+		 * There are a lot of MCR types for which instance (0, 0)
+		 * will always provide a non-terminated value.
+		 */
+		*sliceid = 0;
+		*subsliceid = 0;
+		break;
 	default:
 		MISSING_CASE(type);
 		*sliceid = 0;
@@ -1020,7 +1056,9 @@ void intel_gt_report_steering(struct drm_printer *p, struct intel_gt *gt,
 		   gt->default_steering.groupid,
 		   gt->default_steering.instanceid);
 
-	if (HAS_MSLICES(gt->i915)) {
+	if (IS_PONTEVECCHIO(gt->i915)) {
+		report_steering_type(p, gt, INSTANCE0, dump_table);
+	} else if (HAS_MSLICE_STEERING(gt->i915)) {
 		report_steering_type(p, gt, MSLICE, dump_table);
 		report_steering_type(p, gt, LNCF, dump_table);
 	}
diff --git a/drivers/gpu/drm/i915/gt/intel_gt_types.h b/drivers/gpu/drm/i915/gt/intel_gt_types.h
index 993f003dad1d..df708802889d 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_types.h
+++ b/drivers/gpu/drm/i915/gt/intel_gt_types.h
@@ -59,6 +59,13 @@ enum intel_steering_type {
 	MSLICE,
 	LNCF,
 
+	/*
+	 * On some platforms there are multiple types of MCR registers that
+	 * will always return a non-terminated value at instance (0, 0).  We'll
+	 * lump those all into a single category to keep things simple.
+	 */
+	INSTANCE0,
+
 	NUM_STEERING_TYPES
 };
 
diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c
index eb0598593724..1b191b234160 100644
--- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
+++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
@@ -1195,6 +1195,20 @@ xehp_init_mcr(struct intel_gt *gt, struct i915_wa_list *wal)
 	__set_mcr_steering(wal, SF_MCR_SELECTOR, 0, 2);
 }
 
+static void
+pvc_init_mcr(struct intel_gt *gt, struct i915_wa_list *wal)
+{
+	unsigned int dss;
+
+	/*
+	 * Setup implicit steering for COMPUTE and DSS ranges to the first
+	 * non-fused-off DSS.  All other types of MCR registers will be
+	 * explicitly steered.
+	 */
+	dss = intel_sseu_find_first_xehp_dss(&gt->info.sseu, 0, 0);
+	__add_mcr_wa(gt, wal, dss / GEN_DSS_PER_CSLICE, dss % GEN_DSS_PER_CSLICE);
+}
+
 static void
 icl_gt_workarounds_init(struct intel_gt *gt, struct i915_wa_list *wal)
 {
@@ -1488,13 +1502,19 @@ dg2_gt_workarounds_init(struct intel_gt *gt, struct i915_wa_list *wal)
 	wa_write_or(wal, GEN12_SQCM, EN_32B_ACCESS);
 }
 
+static void
+pvc_gt_workarounds_init(struct intel_gt *gt, struct i915_wa_list *wal)
+{
+	pvc_init_mcr(gt, wal);
+}
+
 static void
 gt_init_workarounds(struct intel_gt *gt, struct i915_wa_list *wal)
 {
 	struct drm_i915_private *i915 = gt->i915;
 
 	if (IS_PONTEVECCHIO(i915))
-		; /* none yet */
+		pvc_gt_workarounds_init(gt, wal);
 	else if (IS_DG2(i915))
 		dg2_gt_workarounds_init(gt, wal);
 	else if (IS_XEHPSDV(i915))
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index c3854b8a014f..5870cf9eb0b4 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1283,8 +1283,7 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,
 #define HAS_RUNTIME_PM(dev_priv) (INTEL_INFO(dev_priv)->has_runtime_pm)
 #define HAS_64BIT_RELOC(dev_priv) (INTEL_INFO(dev_priv)->has_64bit_reloc)
 
-#define HAS_MSLICES(dev_priv) \
-	(INTEL_INFO(dev_priv)->has_mslices)
+#define HAS_MSLICE_STEERING(dev_priv)	(INTEL_INFO(dev_priv)->has_mslice_steering)
 
 /*
  * Set this flag, when platform requires 64K GTT page sizes or larger for
diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
index a5a1a7647320..5e51fc29bb8b 100644
--- a/drivers/gpu/drm/i915/i915_pci.c
+++ b/drivers/gpu/drm/i915/i915_pci.c
@@ -1021,7 +1021,7 @@ static const struct intel_device_info adl_p_info = {
 	.has_llc = 1, \
 	.has_logical_ring_contexts = 1, \
 	.has_logical_ring_elsq = 1, \
-	.has_mslices = 1, \
+	.has_mslice_steering = 1, \
 	.has_rc6 = 1, \
 	.has_reset_engine = 1, \
 	.has_rps = 1, \
@@ -1091,6 +1091,7 @@ static const struct intel_device_info ats_m_info = {
 	.has_3d_pipeline = 0, \
 	.has_guc_deprivilege = 1, \
 	.has_l3_ccs_read = 1, \
+	.has_mslice_steering = 0, \
 	.has_one_eu_per_fuse_bit = 1
 
 __maybe_unused
diff --git a/drivers/gpu/drm/i915/intel_device_info.h b/drivers/gpu/drm/i915/intel_device_info.h
index 346f17f2dce8..08341174ee0a 100644
--- a/drivers/gpu/drm/i915/intel_device_info.h
+++ b/drivers/gpu/drm/i915/intel_device_info.h
@@ -157,7 +157,7 @@ enum intel_ppgtt_type {
 	func(has_logical_ring_contexts); \
 	func(has_logical_ring_elsq); \
 	func(has_media_ratio_mode); \
-	func(has_mslices); \
+	func(has_mslice_steering); \
 	func(has_one_eu_per_fuse_bit); \
 	func(has_pooled_eu); \
 	func(has_pxp); \
-- 
2.35.3


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Intel-gfx] [PATCH] drm/i915/pvc: Add register steering
@ 2022-06-03  0:53 ` Matt Roper
  0 siblings, 0 replies; 6+ messages in thread
From: Matt Roper @ 2022-06-03  0:53 UTC (permalink / raw)
  To: intel-gfx; +Cc: dri-devel

Ponte Vecchio no longer has MSLICE or LNCF steering, but the bspec does
document several new types of multicast register ranges.  Fortunately,
most of the different MCR types all provide valid values at instance
(0,0) so there's no need to read fuse registers and calculate a valid
instance.  We'll lump all of those range types (BSLICE, HALFBSLICE,
TILEPSMI, CC, and L3BANK) into a single category called "INSTANCE0" to
keep things simple.  We'll also perform explicit steering for each of
these multicast register types, even if the implicit steering setup for
COMPUTE/DSS ranges would have worked too; this is based on guidance from
our hardware architects who suggested that we move away from implicit
steering and start explicitly steer all MCR register accesses on modern
platforms (we'll work on transitioning COMPUTE/DSS to explicit steering
in the future).

Note that there's one additional MCR range type defined in the bspec
(SQIDI) that we don't handle here.  Those ranges use a different
steering control register that we never touch; since instance 0 is also
always a valid setting there, we can just ignore those ranges.

Finally, we'll rename the HAS_MSLICES() macro to HAS_MSLICE_STEERING().
PVC hardware still has units referred to as mslices, but there's no
register steering based on mslice for this platform.

Bspec: 67609
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
 drivers/gpu/drm/i915/gt/intel_gt.c          | 50 ++++++++++++++++++---
 drivers/gpu/drm/i915/gt/intel_gt_types.h    |  7 +++
 drivers/gpu/drm/i915/gt/intel_workarounds.c | 22 ++++++++-
 drivers/gpu/drm/i915/i915_drv.h             |  3 +-
 drivers/gpu/drm/i915/i915_pci.c             |  3 +-
 drivers/gpu/drm/i915/intel_device_info.h    |  2 +-
 6 files changed, 76 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_gt.c b/drivers/gpu/drm/i915/gt/intel_gt.c
index ddfb98f70489..b335eacd7a6c 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt.c
+++ b/drivers/gpu/drm/i915/gt/intel_gt.c
@@ -106,6 +106,7 @@ static const char * const intel_steering_types[] = {
 	"L3BANK",
 	"MSLICE",
 	"LNCF",
+	"INSTANCE 0",
 };
 
 static const struct intel_mmio_range icl_l3bank_steering_table[] = {
@@ -133,6 +134,27 @@ static const struct intel_mmio_range dg2_lncf_steering_table[] = {
 	{},
 };
 
+/*
+ * We have several types of MCR registers on PVC where steering to (0,0)
+ * will always provide us with a non-terminated value.  We'll stick them
+ * all in the same table for simplicity.
+ */
+static const struct intel_mmio_range pvc_instance0_steering_table[] = {
+	{ 0x004000, 0x004AFF },		/* HALF-BSLICE */
+	{ 0x008A80, 0x008AFF },		/* TILEPSMI */
+	{ 0x008800, 0x00887F },		/* CC */
+	{ 0x00B000, 0x00B0FF },		/* HALF-BSLICE */
+	{ 0x00B100, 0x00B3FF },		/* L3BANK */
+	{ 0x00C800, 0x00CFFF },		/* HALF-BSLICE */
+	{ 0x00D800, 0x00D8FF },		/* HALF-BSLICE */
+	{ 0x00DD00, 0x00DDFF },		/* BSLICE */
+	{ 0x00E900, 0x00E9FF },		/* HALF-BSLICE */
+	{ 0x00EC00, 0x00EEFF },		/* HALF-BSLICE */
+	{ 0x00F000, 0x00FFFF },		/* HALF-BSLICE */
+	{ 0x024180, 0x0241FF },		/* HALF-BSLICE */
+	{},
+};
+
 int intel_gt_init_mmio(struct intel_gt *gt)
 {
 	struct drm_i915_private *i915 = gt->i915;
@@ -146,7 +168,7 @@ int intel_gt_init_mmio(struct intel_gt *gt)
 	 * An mslice is unavailable only if both the meml3 for the slice is
 	 * disabled *and* all of the DSS in the slice (quadrant) are disabled.
 	 */
-	if (HAS_MSLICES(i915)) {
+	if (HAS_MSLICE_STEERING(i915)) {
 		gt->info.mslice_mask =
 			intel_slicemask_from_xehp_dssmask(gt->info.sseu.subslice_mask,
 							  GEN_DSS_PER_MSLICE);
@@ -158,7 +180,9 @@ int intel_gt_init_mmio(struct intel_gt *gt)
 			drm_warn(&i915->drm, "mslice mask all zero!\n");
 	}
 
-	if (IS_DG2(i915)) {
+	if (IS_PONTEVECCHIO(i915)) {
+		gt->steering_table[INSTANCE0] = pvc_instance0_steering_table;
+	} else if (IS_DG2(i915)) {
 		gt->steering_table[MSLICE] = xehpsdv_mslice_steering_table;
 		gt->steering_table[LNCF] = dg2_lncf_steering_table;
 	} else if (IS_XEHPSDV(i915)) {
@@ -172,7 +196,11 @@ int intel_gt_init_mmio(struct intel_gt *gt)
 			GEN10_L3BANK_MASK;
 		if (!gt->info.l3bank_mask) /* should be impossible! */
 			drm_warn(&i915->drm, "L3 bank mask is all zero!\n");
-	} else if (HAS_MSLICES(i915)) {
+	} else if (GRAPHICS_VER(i915) >= 11) {
+		/*
+		 * We expect all modern platforms to have at least some
+		 * type of steering that needs to be initialized.
+		 */
 		MISSING_CASE(INTEL_INFO(i915)->platform);
 	}
 
@@ -888,7 +916,7 @@ static void intel_gt_get_valid_steering(struct intel_gt *gt,
 		*subsliceid = __ffs(gt->info.l3bank_mask);
 		break;
 	case MSLICE:
-		GEM_WARN_ON(!HAS_MSLICES(gt->i915));
+		GEM_WARN_ON(!HAS_MSLICE_STEERING(gt->i915));
 		*sliceid = __ffs(gt->info.mslice_mask);
 		*subsliceid = 0;	/* unused */
 		break;
@@ -897,10 +925,18 @@ static void intel_gt_get_valid_steering(struct intel_gt *gt,
 		 * An LNCF is always present if its mslice is present, so we
 		 * can safely just steer to LNCF 0 in all cases.
 		 */
-		GEM_WARN_ON(!HAS_MSLICES(gt->i915));
+		GEM_WARN_ON(!HAS_MSLICE_STEERING(gt->i915));
 		*sliceid = __ffs(gt->info.mslice_mask) << 1;
 		*subsliceid = 0;	/* unused */
 		break;
+	case INSTANCE0:
+		/*
+		 * There are a lot of MCR types for which instance (0, 0)
+		 * will always provide a non-terminated value.
+		 */
+		*sliceid = 0;
+		*subsliceid = 0;
+		break;
 	default:
 		MISSING_CASE(type);
 		*sliceid = 0;
@@ -1020,7 +1056,9 @@ void intel_gt_report_steering(struct drm_printer *p, struct intel_gt *gt,
 		   gt->default_steering.groupid,
 		   gt->default_steering.instanceid);
 
-	if (HAS_MSLICES(gt->i915)) {
+	if (IS_PONTEVECCHIO(gt->i915)) {
+		report_steering_type(p, gt, INSTANCE0, dump_table);
+	} else if (HAS_MSLICE_STEERING(gt->i915)) {
 		report_steering_type(p, gt, MSLICE, dump_table);
 		report_steering_type(p, gt, LNCF, dump_table);
 	}
diff --git a/drivers/gpu/drm/i915/gt/intel_gt_types.h b/drivers/gpu/drm/i915/gt/intel_gt_types.h
index 993f003dad1d..df708802889d 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_types.h
+++ b/drivers/gpu/drm/i915/gt/intel_gt_types.h
@@ -59,6 +59,13 @@ enum intel_steering_type {
 	MSLICE,
 	LNCF,
 
+	/*
+	 * On some platforms there are multiple types of MCR registers that
+	 * will always return a non-terminated value at instance (0, 0).  We'll
+	 * lump those all into a single category to keep things simple.
+	 */
+	INSTANCE0,
+
 	NUM_STEERING_TYPES
 };
 
diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c
index eb0598593724..1b191b234160 100644
--- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
+++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
@@ -1195,6 +1195,20 @@ xehp_init_mcr(struct intel_gt *gt, struct i915_wa_list *wal)
 	__set_mcr_steering(wal, SF_MCR_SELECTOR, 0, 2);
 }
 
+static void
+pvc_init_mcr(struct intel_gt *gt, struct i915_wa_list *wal)
+{
+	unsigned int dss;
+
+	/*
+	 * Setup implicit steering for COMPUTE and DSS ranges to the first
+	 * non-fused-off DSS.  All other types of MCR registers will be
+	 * explicitly steered.
+	 */
+	dss = intel_sseu_find_first_xehp_dss(&gt->info.sseu, 0, 0);
+	__add_mcr_wa(gt, wal, dss / GEN_DSS_PER_CSLICE, dss % GEN_DSS_PER_CSLICE);
+}
+
 static void
 icl_gt_workarounds_init(struct intel_gt *gt, struct i915_wa_list *wal)
 {
@@ -1488,13 +1502,19 @@ dg2_gt_workarounds_init(struct intel_gt *gt, struct i915_wa_list *wal)
 	wa_write_or(wal, GEN12_SQCM, EN_32B_ACCESS);
 }
 
+static void
+pvc_gt_workarounds_init(struct intel_gt *gt, struct i915_wa_list *wal)
+{
+	pvc_init_mcr(gt, wal);
+}
+
 static void
 gt_init_workarounds(struct intel_gt *gt, struct i915_wa_list *wal)
 {
 	struct drm_i915_private *i915 = gt->i915;
 
 	if (IS_PONTEVECCHIO(i915))
-		; /* none yet */
+		pvc_gt_workarounds_init(gt, wal);
 	else if (IS_DG2(i915))
 		dg2_gt_workarounds_init(gt, wal);
 	else if (IS_XEHPSDV(i915))
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index c3854b8a014f..5870cf9eb0b4 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1283,8 +1283,7 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,
 #define HAS_RUNTIME_PM(dev_priv) (INTEL_INFO(dev_priv)->has_runtime_pm)
 #define HAS_64BIT_RELOC(dev_priv) (INTEL_INFO(dev_priv)->has_64bit_reloc)
 
-#define HAS_MSLICES(dev_priv) \
-	(INTEL_INFO(dev_priv)->has_mslices)
+#define HAS_MSLICE_STEERING(dev_priv)	(INTEL_INFO(dev_priv)->has_mslice_steering)
 
 /*
  * Set this flag, when platform requires 64K GTT page sizes or larger for
diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
index a5a1a7647320..5e51fc29bb8b 100644
--- a/drivers/gpu/drm/i915/i915_pci.c
+++ b/drivers/gpu/drm/i915/i915_pci.c
@@ -1021,7 +1021,7 @@ static const struct intel_device_info adl_p_info = {
 	.has_llc = 1, \
 	.has_logical_ring_contexts = 1, \
 	.has_logical_ring_elsq = 1, \
-	.has_mslices = 1, \
+	.has_mslice_steering = 1, \
 	.has_rc6 = 1, \
 	.has_reset_engine = 1, \
 	.has_rps = 1, \
@@ -1091,6 +1091,7 @@ static const struct intel_device_info ats_m_info = {
 	.has_3d_pipeline = 0, \
 	.has_guc_deprivilege = 1, \
 	.has_l3_ccs_read = 1, \
+	.has_mslice_steering = 0, \
 	.has_one_eu_per_fuse_bit = 1
 
 __maybe_unused
diff --git a/drivers/gpu/drm/i915/intel_device_info.h b/drivers/gpu/drm/i915/intel_device_info.h
index 346f17f2dce8..08341174ee0a 100644
--- a/drivers/gpu/drm/i915/intel_device_info.h
+++ b/drivers/gpu/drm/i915/intel_device_info.h
@@ -157,7 +157,7 @@ enum intel_ppgtt_type {
 	func(has_logical_ring_contexts); \
 	func(has_logical_ring_elsq); \
 	func(has_media_ratio_mode); \
-	func(has_mslices); \
+	func(has_mslice_steering); \
 	func(has_one_eu_per_fuse_bit); \
 	func(has_pooled_eu); \
 	func(has_pxp); \
-- 
2.35.3


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915/pvc: Add register steering
  2022-06-03  0:53 ` [Intel-gfx] " Matt Roper
  (?)
@ 2022-06-03  3:07 ` Patchwork
  -1 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2022-06-03  3:07 UTC (permalink / raw)
  To: Matt Roper; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/pvc: Add register steering
URL   : https://patchwork.freedesktop.org/series/104691/
State : warning

== Summary ==

Error: dim sparse failed
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/pvc: Add register steering
  2022-06-03  0:53 ` [Intel-gfx] " Matt Roper
  (?)
  (?)
@ 2022-06-03  3:50 ` Patchwork
  2022-06-03 14:40   ` Matt Roper
  -1 siblings, 1 reply; 6+ messages in thread
From: Patchwork @ 2022-06-03  3:50 UTC (permalink / raw)
  To: Matt Roper; +Cc: intel-gfx

[-- Attachment #1: Type: text/plain, Size: 5874 bytes --]

== Series Details ==

Series: drm/i915/pvc: Add register steering
URL   : https://patchwork.freedesktop.org/series/104691/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_11724 -> Patchwork_104691v1
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with Patchwork_104691v1 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_104691v1, 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_104691v1/index.html

Participating hosts (42 -> 39)
------------------------------

  Additional (1): bat-adlm-1 
  Missing    (4): bat-dg2-8 fi-bdw-5557u bat-atsm-1 bat-dg2-9 

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

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

### IGT changes ###

#### Possible regressions ####

  * igt@gem_softpin@safe-alignment:
    - fi-bsw-n3050:       [PASS][1] -> [DMESG-WARN][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11724/fi-bsw-n3050/igt@gem_softpin@safe-alignment.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_104691v1/fi-bsw-n3050/igt@gem_softpin@safe-alignment.html

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

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

### IGT changes ###

#### Issues hit ####

  * igt@i915_selftest@live@gem:
    - fi-pnv-d510:        NOTRUN -> [DMESG-FAIL][3] ([i915#4528])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_104691v1/fi-pnv-d510/igt@i915_selftest@live@gem.html

  * igt@i915_selftest@live@hangcheck:
    - bat-dg1-6:          NOTRUN -> [DMESG-FAIL][4] ([i915#4494] / [i915#4957])
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_104691v1/bat-dg1-6/igt@i915_selftest@live@hangcheck.html

  * igt@i915_suspend@basic-s2idle-without-i915:
    - bat-dg1-6:          NOTRUN -> [INCOMPLETE][5] ([i915#6011])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_104691v1/bat-dg1-6/igt@i915_suspend@basic-s2idle-without-i915.html

  * igt@kms_chamelium@common-hpd-after-suspend:
    - fi-hsw-4770:        NOTRUN -> [SKIP][6] ([fdo#109271] / [fdo#111827])
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_104691v1/fi-hsw-4770/igt@kms_chamelium@common-hpd-after-suspend.html
    - fi-blb-e6850:       NOTRUN -> [SKIP][7] ([fdo#109271])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_104691v1/fi-blb-e6850/igt@kms_chamelium@common-hpd-after-suspend.html

  * igt@runner@aborted:
    - fi-bsw-n3050:       NOTRUN -> [FAIL][8] ([i915#3690] / [i915#4312])
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_104691v1/fi-bsw-n3050/igt@runner@aborted.html

  
#### Possible fixes ####

  * igt@i915_selftest@live@gem:
    - fi-blb-e6850:       [DMESG-FAIL][9] ([i915#4528]) -> [PASS][10]
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11724/fi-blb-e6850/igt@i915_selftest@live@gem.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_104691v1/fi-blb-e6850/igt@i915_selftest@live@gem.html

  * igt@i915_selftest@live@gt_engines:
    - bat-dg1-6:          [INCOMPLETE][11] ([i915#4418]) -> [PASS][12]
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11724/bat-dg1-6/igt@i915_selftest@live@gt_engines.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_104691v1/bat-dg1-6/igt@i915_selftest@live@gt_engines.html

  * igt@i915_selftest@live@hangcheck:
    - fi-hsw-4770:        [INCOMPLETE][13] ([i915#4785]) -> [PASS][14]
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11724/fi-hsw-4770/igt@i915_selftest@live@hangcheck.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_104691v1/fi-hsw-4770/igt@i915_selftest@live@hangcheck.html

  * igt@i915_selftest@live@requests:
    - fi-pnv-d510:        [DMESG-FAIL][15] ([i915#4528]) -> [PASS][16]
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11724/fi-pnv-d510/igt@i915_selftest@live@requests.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_104691v1/fi-pnv-d510/igt@i915_selftest@live@requests.html

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

  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
  [i915#3690]: https://gitlab.freedesktop.org/drm/intel/issues/3690
  [i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
  [i915#4391]: https://gitlab.freedesktop.org/drm/intel/issues/4391
  [i915#4418]: https://gitlab.freedesktop.org/drm/intel/issues/4418
  [i915#4494]: https://gitlab.freedesktop.org/drm/intel/issues/4494
  [i915#4528]: https://gitlab.freedesktop.org/drm/intel/issues/4528
  [i915#4785]: https://gitlab.freedesktop.org/drm/intel/issues/4785
  [i915#4957]: https://gitlab.freedesktop.org/drm/intel/issues/4957
  [i915#5122]: https://gitlab.freedesktop.org/drm/intel/issues/5122
  [i915#6011]: https://gitlab.freedesktop.org/drm/intel/issues/6011


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

  * Linux: CI_DRM_11724 -> Patchwork_104691v1

  CI-20190529: 20190529
  CI_DRM_11724: d85a4921e88b2c0c5c61ab452aa302a969e108e3 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_6505: edb1a467fb622b23b927e28ff603fa43851fea97 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_104691v1: d85a4921e88b2c0c5c61ab452aa302a969e108e3 @ git://anongit.freedesktop.org/gfx-ci/linux


### Linux commits

fcf82c531943 drm/i915/pvc: Add register steering

== Logs ==

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

[-- Attachment #2: Type: text/html, Size: 6764 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Intel-gfx]  ✗ Fi.CI.BAT: failure for drm/i915/pvc: Add register steering
  2022-06-03  3:50 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
@ 2022-06-03 14:40   ` Matt Roper
  0 siblings, 0 replies; 6+ messages in thread
From: Matt Roper @ 2022-06-03 14:40 UTC (permalink / raw)
  To: intel-gfx; +Cc: Vudum, Lakshminarayana

On Fri, Jun 03, 2022 at 03:50:38AM +0000, Patchwork wrote:
> == Series Details ==
> 
> Series: drm/i915/pvc: Add register steering
> URL   : https://patchwork.freedesktop.org/series/104691/
> State : failure
> 
> == Summary ==
> 
> CI Bug Log - changes from CI_DRM_11724 -> Patchwork_104691v1
> ====================================================
> 
> Summary
> -------
> 
>   **FAILURE**
> 
>   Serious unknown changes coming with Patchwork_104691v1 absolutely need to be
>   verified manually.
>   
>   If you think the reported changes have nothing to do with the changes
>   introduced in Patchwork_104691v1, 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_104691v1/index.html
> 
> Participating hosts (42 -> 39)
> ------------------------------
> 
>   Additional (1): bat-adlm-1 
>   Missing    (4): bat-dg2-8 fi-bdw-5557u bat-atsm-1 bat-dg2-9 
> 
> Possible new issues
> -------------------
> 
>   Here are the unknown changes that may have been introduced in Patchwork_104691v1:
> 
> ### IGT changes ###
> 
> #### Possible regressions ####
> 
>   * igt@gem_softpin@safe-alignment:
>     - fi-bsw-n3050:       [PASS][1] -> [DMESG-WARN][2]
>    [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11724/fi-bsw-n3050/igt@gem_softpin@safe-alignment.html
>    [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_104691v1/fi-bsw-n3050/igt@gem_softpin@safe-alignment.html

Seems to be a GPF while releasing an object.  Would not be caused by this patch.

<4> [118.052900] general protection fault, probably for non-canonical address 0x6b6b6b6b6b6b7c63: 0000 [#1] PREEMPT SMP PTI
<4> [118.052935] CPU: 1 PID: 5108 Comm: gem_softpin Not tainted 5.18.0-Patchwork_104691v1-gd85a4921e88b+ #1
<4> [118.052957] Hardware name:  /NUC5CPYB, BIOS PYBSWCEL.86A.0079.2020.0420.1316 04/20/2020
<4> [118.052973] RIP: 0010:__lock_acquire+0x612/0x2940
<4> [118.052993] Code: 88 09 00 00 83 f8 2f 0f 87 9c 00 00 00 3b 05 dd 55 0a 02 41 bf 01 00 00 00 0f 86 cd 00 00 00 89 05 cb 55 0a 02 e9 c2 00 00 00 <48> 81 3f 80 45 dc 82 41 bc 00 00 00 00 45 0f 45 e0 83 fe 01 0f 87
<4> [118.053026] RSP: 0018:ffffc9000054bc88 EFLAGS: 00010002
<4> [118.053041] RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000000
<4> [118.053055] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 6b6b6b6b6b6b7c63
<4> [118.053070] RBP: ffff88811ba48040 R08: 0000000000000001 R09: 0000000000000001
<4> [118.053084] R10: 0000000000000001 R11: 00000000ffa4eeb2 R12: 0000000000000001
<4> [118.053098] R13: 0000000000000000 R14: 0000000000000000 R15: 6b6b6b6b6b6b7c63
<4> [118.053113] FS:  00007ff69c8d94c0(0000) GS:ffff88817b900000(0000) knlGS:0000000000000000
<4> [118.053130] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
<4> [118.053143] CR2: 00007fffb2dc6fe8 CR3: 00000001074a4000 CR4: 00000000001006e0
<4> [118.053157] Call Trace:
<4> [118.053165]  <TASK>
<4> [118.053178]  lock_acquire+0xd3/0x310
<4> [118.053192]  ? release_references+0xb4/0x170 [i915]
<4> [118.053571]  ? _raw_spin_lock_irq+0x41/0x50
<4> [118.053588]  _raw_spin_lock_irq+0x32/0x50
<4> [118.053601]  ? release_references+0xb4/0x170 [i915]
<4> [118.053928]  release_references+0xb4/0x170 [i915]
<4> [118.054257]  __i915_gem_object_pages_fini+0x5c/0x200 [i915]
<4> [118.054575]  __i915_gem_free_objects+0x9a/0x150 [i915]
<4> [118.054894]  drm_file_free.part.14+0x1f5/0x240
<4> [118.054912]  drm_release_noglobal+0x16/0x60
<4> [118.054926]  __fput+0x96/0x250
<4> [118.054940]  task_work_run+0x6e/0xb0
<4> [118.054955]  exit_to_user_mode_prepare+0x19c/0x1b0
<4> [118.054970]  syscall_exit_to_user_mode+0x19/0x50
<4> [118.054986]  do_syscall_64+0x46/0x80
<4> [118.054998]  entry_SYSCALL_64_after_hwframe+0x44/0xae
<4> [118.055013] RIP: 0033:0x7ff69f0883d7


Matt

> 
>   
> Known issues
> ------------
> 
>   Here are the changes found in Patchwork_104691v1 that come from known issues:
> 
> ### IGT changes ###
> 
> #### Issues hit ####
> 
>   * igt@i915_selftest@live@gem:
>     - fi-pnv-d510:        NOTRUN -> [DMESG-FAIL][3] ([i915#4528])
>    [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_104691v1/fi-pnv-d510/igt@i915_selftest@live@gem.html
> 
>   * igt@i915_selftest@live@hangcheck:
>     - bat-dg1-6:          NOTRUN -> [DMESG-FAIL][4] ([i915#4494] / [i915#4957])
>    [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_104691v1/bat-dg1-6/igt@i915_selftest@live@hangcheck.html
> 
>   * igt@i915_suspend@basic-s2idle-without-i915:
>     - bat-dg1-6:          NOTRUN -> [INCOMPLETE][5] ([i915#6011])
>    [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_104691v1/bat-dg1-6/igt@i915_suspend@basic-s2idle-without-i915.html
> 
>   * igt@kms_chamelium@common-hpd-after-suspend:
>     - fi-hsw-4770:        NOTRUN -> [SKIP][6] ([fdo#109271] / [fdo#111827])
>    [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_104691v1/fi-hsw-4770/igt@kms_chamelium@common-hpd-after-suspend.html
>     - fi-blb-e6850:       NOTRUN -> [SKIP][7] ([fdo#109271])
>    [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_104691v1/fi-blb-e6850/igt@kms_chamelium@common-hpd-after-suspend.html
> 
>   * igt@runner@aborted:
>     - fi-bsw-n3050:       NOTRUN -> [FAIL][8] ([i915#3690] / [i915#4312])
>    [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_104691v1/fi-bsw-n3050/igt@runner@aborted.html
> 
>   
> #### Possible fixes ####
> 
>   * igt@i915_selftest@live@gem:
>     - fi-blb-e6850:       [DMESG-FAIL][9] ([i915#4528]) -> [PASS][10]
>    [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11724/fi-blb-e6850/igt@i915_selftest@live@gem.html
>    [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_104691v1/fi-blb-e6850/igt@i915_selftest@live@gem.html
> 
>   * igt@i915_selftest@live@gt_engines:
>     - bat-dg1-6:          [INCOMPLETE][11] ([i915#4418]) -> [PASS][12]
>    [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11724/bat-dg1-6/igt@i915_selftest@live@gt_engines.html
>    [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_104691v1/bat-dg1-6/igt@i915_selftest@live@gt_engines.html
> 
>   * igt@i915_selftest@live@hangcheck:
>     - fi-hsw-4770:        [INCOMPLETE][13] ([i915#4785]) -> [PASS][14]
>    [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11724/fi-hsw-4770/igt@i915_selftest@live@hangcheck.html
>    [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_104691v1/fi-hsw-4770/igt@i915_selftest@live@hangcheck.html
> 
>   * igt@i915_selftest@live@requests:
>     - fi-pnv-d510:        [DMESG-FAIL][15] ([i915#4528]) -> [PASS][16]
>    [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11724/fi-pnv-d510/igt@i915_selftest@live@requests.html
>    [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_104691v1/fi-pnv-d510/igt@i915_selftest@live@requests.html
> 
>   
>   {name}: This element is suppressed. This means it is ignored when computing
>           the status of the difference (SUCCESS, WARNING, or FAILURE).
> 
>   [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
>   [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
>   [i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
>   [i915#3690]: https://gitlab.freedesktop.org/drm/intel/issues/3690
>   [i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
>   [i915#4391]: https://gitlab.freedesktop.org/drm/intel/issues/4391
>   [i915#4418]: https://gitlab.freedesktop.org/drm/intel/issues/4418
>   [i915#4494]: https://gitlab.freedesktop.org/drm/intel/issues/4494
>   [i915#4528]: https://gitlab.freedesktop.org/drm/intel/issues/4528
>   [i915#4785]: https://gitlab.freedesktop.org/drm/intel/issues/4785
>   [i915#4957]: https://gitlab.freedesktop.org/drm/intel/issues/4957
>   [i915#5122]: https://gitlab.freedesktop.org/drm/intel/issues/5122
>   [i915#6011]: https://gitlab.freedesktop.org/drm/intel/issues/6011
> 
> 
> Build changes
> -------------
> 
>   * Linux: CI_DRM_11724 -> Patchwork_104691v1
> 
>   CI-20190529: 20190529
>   CI_DRM_11724: d85a4921e88b2c0c5c61ab452aa302a969e108e3 @ git://anongit.freedesktop.org/gfx-ci/linux
>   IGT_6505: edb1a467fb622b23b927e28ff603fa43851fea97 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
>   Patchwork_104691v1: d85a4921e88b2c0c5c61ab452aa302a969e108e3 @ git://anongit.freedesktop.org/gfx-ci/linux
> 
> 
> ### Linux commits
> 
> fcf82c531943 drm/i915/pvc: Add register steering
> 
> == Logs ==
> 
> For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_104691v1/index.html

-- 
Matt Roper
Graphics Software Engineer
VTT-OSGC Platform Enablement
Intel Corporation

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915/pvc: Add register steering
  2022-06-03  0:53 ` [Intel-gfx] " Matt Roper
                   ` (2 preceding siblings ...)
  (?)
@ 2022-06-08  6:35 ` Harish Chegondi
  -1 siblings, 0 replies; 6+ messages in thread
From: Harish Chegondi @ 2022-06-08  6:35 UTC (permalink / raw)
  To: Matt Roper; +Cc: intel-gfx, dri-devel

On Thu, Jun 02, 2022 at 05:53:35PM -0700, Matt Roper wrote:
> Ponte Vecchio no longer has MSLICE or LNCF steering, but the bspec does
> document several new types of multicast register ranges.  Fortunately,
> most of the different MCR types all provide valid values at instance
> (0,0) so there's no need to read fuse registers and calculate a valid
> instance.  We'll lump all of those range types (BSLICE, HALFBSLICE,
> TILEPSMI, CC, and L3BANK) into a single category called "INSTANCE0" to
> keep things simple.  We'll also perform explicit steering for each of
> these multicast register types, even if the implicit steering setup for
> COMPUTE/DSS ranges would have worked too; this is based on guidance from
> our hardware architects who suggested that we move away from implicit
> steering and start explicitly steer all MCR register accesses on modern
> platforms (we'll work on transitioning COMPUTE/DSS to explicit steering
> in the future).
> 
> Note that there's one additional MCR range type defined in the bspec
> (SQIDI) that we don't handle here.  Those ranges use a different
> steering control register that we never touch; since instance 0 is also
> always a valid setting there, we can just ignore those ranges.
> 
> Finally, we'll rename the HAS_MSLICES() macro to HAS_MSLICE_STEERING().
> PVC hardware still has units referred to as mslices, but there's no
> register steering based on mslice for this platform.
> 
> Bspec: 67609
> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
> ---
>  drivers/gpu/drm/i915/gt/intel_gt.c          | 50 ++++++++++++++++++---
>  drivers/gpu/drm/i915/gt/intel_gt_types.h    |  7 +++
>  drivers/gpu/drm/i915/gt/intel_workarounds.c | 22 ++++++++-
>  drivers/gpu/drm/i915/i915_drv.h             |  3 +-
>  drivers/gpu/drm/i915/i915_pci.c             |  3 +-
>  drivers/gpu/drm/i915/intel_device_info.h    |  2 +-
>  6 files changed, 76 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/intel_gt.c b/drivers/gpu/drm/i915/gt/intel_gt.c
> index ddfb98f70489..b335eacd7a6c 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gt.c
> +++ b/drivers/gpu/drm/i915/gt/intel_gt.c
> @@ -106,6 +106,7 @@ static const char * const intel_steering_types[] = {
>  	"L3BANK",
>  	"MSLICE",
>  	"LNCF",
> +	"INSTANCE 0",
>  };
>  
>  static const struct intel_mmio_range icl_l3bank_steering_table[] = {
> @@ -133,6 +134,27 @@ static const struct intel_mmio_range dg2_lncf_steering_table[] = {
>  	{},
>  };
>  
> +/*
> + * We have several types of MCR registers on PVC where steering to (0,0)
> + * will always provide us with a non-terminated value.  We'll stick them
> + * all in the same table for simplicity.
> + */
> +static const struct intel_mmio_range pvc_instance0_steering_table[] = {
> +	{ 0x004000, 0x004AFF },		/* HALF-BSLICE */
> +	{ 0x008A80, 0x008AFF },		/* TILEPSMI */
> +	{ 0x008800, 0x00887F },		/* CC */
minor nit: The above two lines need to be swapped to keep this table
sorted in the increasing order of addresses.
> +	{ 0x00B000, 0x00B0FF },		/* HALF-BSLICE */
> +	{ 0x00B100, 0x00B3FF },		/* L3BANK */
> +	{ 0x00C800, 0x00CFFF },		/* HALF-BSLICE */
> +	{ 0x00D800, 0x00D8FF },		/* HALF-BSLICE */
> +	{ 0x00DD00, 0x00DDFF },		/* BSLICE */
> +	{ 0x00E900, 0x00E9FF },		/* HALF-BSLICE */
> +	{ 0x00EC00, 0x00EEFF },		/* HALF-BSLICE */
> +	{ 0x00F000, 0x00FFFF },		/* HALF-BSLICE */
> +	{ 0x024180, 0x0241FF },		/* HALF-BSLICE */
> +	{},
> +};
> +
>  int intel_gt_init_mmio(struct intel_gt *gt)
>  {
>  	struct drm_i915_private *i915 = gt->i915;
> @@ -146,7 +168,7 @@ int intel_gt_init_mmio(struct intel_gt *gt)
>  	 * An mslice is unavailable only if both the meml3 for the slice is
>  	 * disabled *and* all of the DSS in the slice (quadrant) are disabled.
>  	 */
> -	if (HAS_MSLICES(i915)) {
> +	if (HAS_MSLICE_STEERING(i915)) {
>  		gt->info.mslice_mask =
>  			intel_slicemask_from_xehp_dssmask(gt->info.sseu.subslice_mask,
>  							  GEN_DSS_PER_MSLICE);
> @@ -158,7 +180,9 @@ int intel_gt_init_mmio(struct intel_gt *gt)
>  			drm_warn(&i915->drm, "mslice mask all zero!\n");
>  	}
>  
> -	if (IS_DG2(i915)) {
> +	if (IS_PONTEVECCHIO(i915)) {
> +		gt->steering_table[INSTANCE0] = pvc_instance0_steering_table;
> +	} else if (IS_DG2(i915)) {
>  		gt->steering_table[MSLICE] = xehpsdv_mslice_steering_table;
>  		gt->steering_table[LNCF] = dg2_lncf_steering_table;
>  	} else if (IS_XEHPSDV(i915)) {
> @@ -172,7 +196,11 @@ int intel_gt_init_mmio(struct intel_gt *gt)
>  			GEN10_L3BANK_MASK;
>  		if (!gt->info.l3bank_mask) /* should be impossible! */
>  			drm_warn(&i915->drm, "L3 bank mask is all zero!\n");
> -	} else if (HAS_MSLICES(i915)) {
> +	} else if (GRAPHICS_VER(i915) >= 11) {
> +		/*
> +		 * We expect all modern platforms to have at least some
> +		 * type of steering that needs to be initialized.
> +		 */
>  		MISSING_CASE(INTEL_INFO(i915)->platform);
>  	}
>  
> @@ -888,7 +916,7 @@ static void intel_gt_get_valid_steering(struct intel_gt *gt,
>  		*subsliceid = __ffs(gt->info.l3bank_mask);
>  		break;
>  	case MSLICE:
> -		GEM_WARN_ON(!HAS_MSLICES(gt->i915));
> +		GEM_WARN_ON(!HAS_MSLICE_STEERING(gt->i915));
>  		*sliceid = __ffs(gt->info.mslice_mask);
>  		*subsliceid = 0;	/* unused */
>  		break;
> @@ -897,10 +925,18 @@ static void intel_gt_get_valid_steering(struct intel_gt *gt,
>  		 * An LNCF is always present if its mslice is present, so we
>  		 * can safely just steer to LNCF 0 in all cases.
>  		 */
> -		GEM_WARN_ON(!HAS_MSLICES(gt->i915));
> +		GEM_WARN_ON(!HAS_MSLICE_STEERING(gt->i915));
>  		*sliceid = __ffs(gt->info.mslice_mask) << 1;
>  		*subsliceid = 0;	/* unused */
>  		break;
> +	case INSTANCE0:
> +		/*
> +		 * There are a lot of MCR types for which instance (0, 0)
> +		 * will always provide a non-terminated value.
> +		 */
> +		*sliceid = 0;
> +		*subsliceid = 0;
> +		break;
>  	default:
>  		MISSING_CASE(type);
>  		*sliceid = 0;
> @@ -1020,7 +1056,9 @@ void intel_gt_report_steering(struct drm_printer *p, struct intel_gt *gt,
>  		   gt->default_steering.groupid,
>  		   gt->default_steering.instanceid);
>  
> -	if (HAS_MSLICES(gt->i915)) {
> +	if (IS_PONTEVECCHIO(gt->i915)) {
> +		report_steering_type(p, gt, INSTANCE0, dump_table);
> +	} else if (HAS_MSLICE_STEERING(gt->i915)) {
>  		report_steering_type(p, gt, MSLICE, dump_table);
>  		report_steering_type(p, gt, LNCF, dump_table);
>  	}
> diff --git a/drivers/gpu/drm/i915/gt/intel_gt_types.h b/drivers/gpu/drm/i915/gt/intel_gt_types.h
> index 993f003dad1d..df708802889d 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gt_types.h
> +++ b/drivers/gpu/drm/i915/gt/intel_gt_types.h
> @@ -59,6 +59,13 @@ enum intel_steering_type {
>  	MSLICE,
>  	LNCF,
>  
> +	/*
> +	 * On some platforms there are multiple types of MCR registers that
> +	 * will always return a non-terminated value at instance (0, 0).  We'll
> +	 * lump those all into a single category to keep things simple.
> +	 */
> +	INSTANCE0,
> +
>  	NUM_STEERING_TYPES
>  };
>  
> diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c
> index eb0598593724..1b191b234160 100644
> --- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
> +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
> @@ -1195,6 +1195,20 @@ xehp_init_mcr(struct intel_gt *gt, struct i915_wa_list *wal)
>  	__set_mcr_steering(wal, SF_MCR_SELECTOR, 0, 2);
>  }
>  
> +static void
> +pvc_init_mcr(struct intel_gt *gt, struct i915_wa_list *wal)
> +{
> +	unsigned int dss;
> +
> +	/*
> +	 * Setup implicit steering for COMPUTE and DSS ranges to the first
> +	 * non-fused-off DSS.  All other types of MCR registers will be
> +	 * explicitly steered.
> +	 */
> +	dss = intel_sseu_find_first_xehp_dss(&gt->info.sseu, 0, 0);
> +	__add_mcr_wa(gt, wal, dss / GEN_DSS_PER_CSLICE, dss % GEN_DSS_PER_CSLICE);
> +}
> +
>  static void
>  icl_gt_workarounds_init(struct intel_gt *gt, struct i915_wa_list *wal)
>  {
> @@ -1488,13 +1502,19 @@ dg2_gt_workarounds_init(struct intel_gt *gt, struct i915_wa_list *wal)
>  	wa_write_or(wal, GEN12_SQCM, EN_32B_ACCESS);
>  }
>  
> +static void
> +pvc_gt_workarounds_init(struct intel_gt *gt, struct i915_wa_list *wal)
> +{
> +	pvc_init_mcr(gt, wal);
> +}
> +
>  static void
>  gt_init_workarounds(struct intel_gt *gt, struct i915_wa_list *wal)
>  {
>  	struct drm_i915_private *i915 = gt->i915;
>  
>  	if (IS_PONTEVECCHIO(i915))
> -		; /* none yet */
> +		pvc_gt_workarounds_init(gt, wal);
>  	else if (IS_DG2(i915))
>  		dg2_gt_workarounds_init(gt, wal);
>  	else if (IS_XEHPSDV(i915))
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index c3854b8a014f..5870cf9eb0b4 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -1283,8 +1283,7 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,
>  #define HAS_RUNTIME_PM(dev_priv) (INTEL_INFO(dev_priv)->has_runtime_pm)
>  #define HAS_64BIT_RELOC(dev_priv) (INTEL_INFO(dev_priv)->has_64bit_reloc)
>  
> -#define HAS_MSLICES(dev_priv) \
> -	(INTEL_INFO(dev_priv)->has_mslices)
> +#define HAS_MSLICE_STEERING(dev_priv)	(INTEL_INFO(dev_priv)->has_mslice_steering)
>  
>  /*
>   * Set this flag, when platform requires 64K GTT page sizes or larger for
> diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
> index a5a1a7647320..5e51fc29bb8b 100644
> --- a/drivers/gpu/drm/i915/i915_pci.c
> +++ b/drivers/gpu/drm/i915/i915_pci.c
> @@ -1021,7 +1021,7 @@ static const struct intel_device_info adl_p_info = {
>  	.has_llc = 1, \
>  	.has_logical_ring_contexts = 1, \
>  	.has_logical_ring_elsq = 1, \
> -	.has_mslices = 1, \
> +	.has_mslice_steering = 1, \
>  	.has_rc6 = 1, \
>  	.has_reset_engine = 1, \
>  	.has_rps = 1, \
> @@ -1091,6 +1091,7 @@ static const struct intel_device_info ats_m_info = {
>  	.has_3d_pipeline = 0, \
>  	.has_guc_deprivilege = 1, \
>  	.has_l3_ccs_read = 1, \
> +	.has_mslice_steering = 0, \
>  	.has_one_eu_per_fuse_bit = 1
>  
>  __maybe_unused
> diff --git a/drivers/gpu/drm/i915/intel_device_info.h b/drivers/gpu/drm/i915/intel_device_info.h
> index 346f17f2dce8..08341174ee0a 100644
> --- a/drivers/gpu/drm/i915/intel_device_info.h
> +++ b/drivers/gpu/drm/i915/intel_device_info.h
> @@ -157,7 +157,7 @@ enum intel_ppgtt_type {
>  	func(has_logical_ring_contexts); \
>  	func(has_logical_ring_elsq); \
>  	func(has_media_ratio_mode); \
> -	func(has_mslices); \
> +	func(has_mslice_steering); \
>  	func(has_one_eu_per_fuse_bit); \
>  	func(has_pooled_eu); \
>  	func(has_pxp); \
Looks good to me.
Reviewed-by: Harish Chegondi <harish.chegondi@intel.com>
> -- 
> 2.35.3
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-06-08  6:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-03  0:53 [PATCH] drm/i915/pvc: Add register steering Matt Roper
2022-06-03  0:53 ` [Intel-gfx] " Matt Roper
2022-06-03  3:07 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for " Patchwork
2022-06-03  3:50 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2022-06-03 14:40   ` Matt Roper
2022-06-08  6:35 ` [Intel-gfx] [PATCH] " Harish Chegondi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.