From: Matt Roper <matthew.d.roper@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: chris@chris-wilson.co.uk
Subject: [Intel-gfx] [PATCH 4/4] drm/i915: Add MCR ranges for gen11 and gen12
Date: Thu, 30 Apr 2020 16:15:29 -0700 [thread overview]
Message-ID: <20200430231529.295556-5-matthew.d.roper@intel.com> (raw)
In-Reply-To: <20200430231529.295556-1-matthew.d.roper@intel.com>
The multicast register ranges are slightly different for gen11 and gen12
than the table we have for gen8. This information never got updated in
the bspec, so this patch is based on a spreadsheet provided by the
hardware team while they work on getting the official documentation
updated.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
drivers/gpu/drm/i915/gt/intel_workarounds.c | 45 ++++++++++++++++++---
1 file changed, 39 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c
index d1b7a445f2da..cd71ff347221 100644
--- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
+++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
@@ -1023,10 +1023,12 @@ wa_verify(struct drm_i915_private *i915, const struct i915_wa *wa, u32 cur,
return true;
}
-static const struct {
+struct mcr_range {
u32 start;
u32 end;
-} mcr_ranges_gen8[] = {
+};
+
+static const struct mcr_range mcr_ranges_gen8[] = {
{ .start = 0x5500, .end = 0x55ff },
{ .start = 0x7000, .end = 0x7fff },
{ .start = 0x9400, .end = 0x97ff },
@@ -1035,11 +1037,42 @@ static const struct {
{},
};
+static const struct mcr_range mcr_ranges_gen11[] = {
+ { .start = 0x5500, .end = 0x55ff },
+ { .start = 0x7000, .end = 0x7fff },
+ { .start = 0x8140, .end = 0x815f },
+ { .start = 0x8c00, .end = 0x8cff },
+ { .start = 0x94d0, .end = 0x955f },
+ { .start = 0xb000, .end = 0xb3ff },
+ { .start = 0xdf00, .end = 0xe8ff },
+ { .start = 0x24400, .end = 0x24fff },
+ {},
+};
+
+static const struct mcr_range mcr_ranges_gen12[] = {
+ { .start = 0xb00, .end = 0xbff },
+ { .start = 0x1000, .end = 0x1fff },
+ { .start = 0x8150, .end = 0x815f },
+ { .start = 0x8700, .end = 0x87ff },
+ { .start = 0x9520, .end = 0x955f },
+ { .start = 0xb100, .end = 0xb3ff },
+ { .start = 0xde80, .end = 0xe8ff },
+ { .start = 0x24a00, .end = 0x24a7f },
+ {},
+};
+
static bool mcr_range(struct drm_i915_private *i915, u32 offset)
{
+ const struct mcr_range *range_list;
int i;
- if (INTEL_GEN(i915) < 8)
+ if (INTEL_GEN(i915) >= 12)
+ range_list = mcr_ranges_gen12;
+ else if (INTEL_GEN(i915) >= 11)
+ range_list = mcr_ranges_gen11;
+ else if (INTEL_GEN(i915) >= 8)
+ range_list = mcr_ranges_gen8;
+ else
return false;
/*
@@ -1047,9 +1080,9 @@ static bool mcr_range(struct drm_i915_private *i915, u32 offset)
* which only controls CPU initiated MMIO. Routing does not
* work for CS access so we cannot verify them on this path.
*/
- for (i = 0; mcr_ranges_gen8[i].start; i++)
- if (offset >= mcr_ranges_gen8[i].start &&
- offset <= mcr_ranges_gen8[i].end)
+ for (i = 0; range_list[i].start; i++)
+ if (offset >= range_list[i].start &&
+ offset <= range_list[i].end)
return true;
return false;
--
2.24.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2020-04-30 23:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-30 23:15 [Intel-gfx] [PATCH 0/4] Steer multicast register workaround verification Matt Roper
2020-04-30 23:15 ` [Intel-gfx] [PATCH 1/4] drm/i915: Setup multicast register steering for all gen >= 10 Matt Roper
2020-04-30 23:15 ` [Intel-gfx] [PATCH 2/4] drm/i915: Steer multicast register readback in wa_verify Matt Roper
2020-04-30 23:15 ` [Intel-gfx] [PATCH 3/4] drm/i915: Don't skip verification of MCR engine workarounds Matt Roper
2020-04-30 23:15 ` Matt Roper [this message]
2020-05-01 0:03 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Steer multicast register workaround verification Patchwork
2020-05-01 0:21 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2020-05-01 8:01 ` [Intel-gfx] [PATCH 0/4] " Tvrtko Ursulin
2020-05-01 16:05 ` 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=20200430231529.295556-5-matthew.d.roper@intel.com \
--to=matthew.d.roper@intel.com \
--cc=chris@chris-wilson.co.uk \
--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