From: Matt Roper <matthew.d.roper@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH 12/12] drm/i915/mtl: Add multicast steering for media GT
Date: Mon, 19 Sep 2022 15:32:59 -0700 [thread overview]
Message-ID: <20220919223259.263525-13-matthew.d.roper@intel.com> (raw)
In-Reply-To: <20220919223259.263525-1-matthew.d.roper@intel.com>
MTL's media GT only has a single type of steering ("OAADDRM") which
selects between media slice 0 and media slice 1. We'll always steer to
media slice 0 unless it is fused off (which is the case when VD0, VE0,
and SFC0 are all reported as unavailable).
Bspec: 67789
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
drivers/gpu/drm/i915/gt/intel_gt_mcr.c | 19 +++++++++++++++++--
drivers/gpu/drm/i915/gt/intel_gt_types.h | 1 +
drivers/gpu/drm/i915/gt/intel_workarounds.c | 18 +++++++++++++++++-
3 files changed, 35 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/intel_gt_mcr.c b/drivers/gpu/drm/i915/gt/intel_gt_mcr.c
index 05f41f1cc88d..04f75c1e0f4e 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_mcr.c
+++ b/drivers/gpu/drm/i915/gt/intel_gt_mcr.c
@@ -41,6 +41,7 @@ static const char * const intel_steering_types[] = {
"MSLICE",
"LNCF",
"DSS",
+ "OADDRM",
"INSTANCE 0",
};
@@ -119,6 +120,12 @@ static const struct intel_mmio_range mtl3d_dss_steering_table[] = {
{ 0x00DE80, 0x00E8FF }, /* DSS (0xE000-0xE0FF reserved) */
};
+static const struct intel_mmio_range xelpmp_oaddrm_steering_table[] = {
+ { 0x393200, 0x39323F },
+ { 0x393400, 0x3934FF },
+};
+
+
void intel_gt_mcr_init(struct intel_gt *gt)
{
struct drm_i915_private *i915 = gt->i915;
@@ -141,8 +148,9 @@ void intel_gt_mcr_init(struct intel_gt *gt)
drm_warn(&i915->drm, "mslice mask all zero!\n");
}
- if (GRAPHICS_VER_FULL(i915) >= IP_VER(12, 70) &&
- gt->type == GT_PRIMARY) {
+ if (MEDIA_VER(i915) >= 13 && gt->type == GT_MEDIA) {
+ gt->steering_table[OADDRM] = xelpmp_oaddrm_steering_table;
+ } else if (GRAPHICS_VER_FULL(i915) >= IP_VER(12, 70)) {
fuse = REG_FIELD_GET(GT_L3_EXC_MASK,
intel_uncore_read(gt->uncore, XEHP_FUSE4));
@@ -435,6 +443,13 @@ static void get_nonterminated_steering(struct intel_gt *gt,
*group = 0;
*instance = 0;
break;
+ case OADDRM:
+ if ((VDBOX_MASK(gt) | VEBOX_MASK(gt) | gt->info.sfc_mask) & BIT(0))
+ *group = 0;
+ else
+ *group = 1;
+ *instance = 0;
+ break;
default:
MISSING_CASE(type);
*group = 0;
diff --git a/drivers/gpu/drm/i915/gt/intel_gt_types.h b/drivers/gpu/drm/i915/gt/intel_gt_types.h
index 2a0441410ec7..5fa59a66dba2 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_types.h
+++ b/drivers/gpu/drm/i915/gt/intel_gt_types.h
@@ -60,6 +60,7 @@ enum intel_steering_type {
MSLICE,
LNCF,
DSS,
+ OADDRM,
/*
* On some platforms there are multiple types of MCR registers that
diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c
index 2562ad83966b..9227391fc144 100644
--- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
+++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
@@ -1585,12 +1585,28 @@ mtl_3d_gt_workarounds_init(struct intel_gt *gt, struct i915_wa_list *wal)
}
}
+static void
+mtl_media_gt_workarounds_init(struct intel_gt *gt, struct i915_wa_list *wal)
+{
+ /*
+ * Unlike older platforms, we no longer setup implicit steering here;
+ * all MCR accesses are explicitly steered.
+ */
+ if (drm_debug_enabled(DRM_UT_DRIVER)) {
+ struct drm_printer p = drm_debug_printer("MCR Steering:");
+
+ intel_gt_mcr_report_steering(&p, gt, false);
+ }
+}
+
static void
gt_init_workarounds(struct intel_gt *gt, struct i915_wa_list *wal)
{
struct drm_i915_private *i915 = gt->i915;
- if (IS_METEORLAKE(i915) && gt->type == GT_PRIMARY)
+ if (IS_METEORLAKE(i915) && gt->type == GT_MEDIA)
+ mtl_media_gt_workarounds_init(gt, wal);
+ else if (IS_METEORLAKE(i915) && gt->type == GT_PRIMARY)
mtl_3d_gt_workarounds_init(gt, wal);
else if (IS_PONTEVECCHIO(i915))
pvc_gt_workarounds_init(gt, wal);
--
2.37.3
next prev parent reply other threads:[~2022-09-19 22:34 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-19 22:32 [Intel-gfx] [PATCH 00/12] Explicit MCR handling and MTL steering Matt Roper
2022-09-19 22:32 ` [Intel-gfx] [PATCH 01/12] drm/i915/gen8: Create separate reg definitions for new MCR registers Matt Roper
2022-09-26 6:15 ` Balasubramani Vivekanandan
2022-09-28 8:25 ` Balasubramani Vivekanandan
2022-09-19 22:32 ` [Intel-gfx] [PATCH 02/12] drm/i915/xehp: " Matt Roper
2022-09-28 9:50 ` Balasubramani Vivekanandan
2022-09-30 21:54 ` Matt Roper
2022-09-19 22:32 ` [Intel-gfx] [PATCH 03/12] drm/i915/gt: Drop a few unused register definitions Matt Roper
2022-09-19 22:32 ` [Intel-gfx] [PATCH 04/12] drm/i915/gt: Correct prefix on a few registers Matt Roper
2022-09-19 22:32 ` [Intel-gfx] [PATCH 05/12] drm/i915/xehp: Check for faults on primary GAM Matt Roper
2022-09-26 12:28 ` Balasubramani Vivekanandan
2022-09-19 22:32 ` [Intel-gfx] [PATCH 06/12] drm/i915: Define MCR registers explicitly Matt Roper
2022-09-19 22:32 ` [Intel-gfx] [PATCH 07/12] drm/i915/gt: Always use MCR functions on multicast registers Matt Roper
2022-09-19 22:32 ` [Intel-gfx] [PATCH 08/12] drm/i915/guc: Handle save/restore of MCR registers explicitly Matt Roper
2022-09-19 22:32 ` [Intel-gfx] [PATCH 09/12] drm/i915/gt: Add MCR-specific workaround initializers Matt Roper
2022-09-19 22:32 ` [Intel-gfx] [PATCH 10/12] drm/i915: Define multicast registers as a new type Matt Roper
2022-09-19 22:32 ` [Intel-gfx] [PATCH 11/12] drm/i915/mtl: Add multicast steering for render GT Matt Roper
2022-09-19 22:32 ` Matt Roper [this message]
2022-09-20 0:46 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Explicit MCR handling and MTL steering Patchwork
2022-09-20 0:46 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-09-20 1:10 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-09-20 10:18 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2022-09-20 22:37 ` Matt Roper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220919223259.263525-13-matthew.d.roper@intel.com \
--to=matthew.d.roper@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox