From: Andi Shyti <andi.shyti@linux.intel.com>
To: Intel GFX <intel-gfx@lists.freedesktop.org>,
DRI Devel <dri-devel@lists.freedesktop.org>,
Fei Yang <fei.yang@intel.com>
Cc: Andrzej Hajda <andrzej.hajda@intel.com>,
Lucas Martins De Marchi <lucas.demarchi@intel.com>,
Andi Shyti <andi.shyti@kernel.org>,
Matt Roper <matthew.d.roper@intel.com>,
Nirmoy Das <nirmoy.das@intel.com>
Subject: [Intel-gfx] [PATCH v2 2/2] drm/i915/mtl: fix mocs selftest
Date: Fri, 21 Apr 2023 20:25:35 +0200 [thread overview]
Message-ID: <20230421182535.292670-3-andi.shyti@linux.intel.com> (raw)
In-Reply-To: <20230421182535.292670-1-andi.shyti@linux.intel.com>
From: Fei Yang <fei.yang@intel.com>
Media GT has a different base for MOCS register, need to apply
gsi_offset to the mmio address if not using the intel_uncore_r/w
functions for register access.
Cc: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Fei Yang <fei.yang@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
---
drivers/gpu/drm/i915/gt/selftest_mocs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gt/selftest_mocs.c b/drivers/gpu/drm/i915/gt/selftest_mocs.c
index ca009a6a13bdb..a8446ab825012 100644
--- a/drivers/gpu/drm/i915/gt/selftest_mocs.c
+++ b/drivers/gpu/drm/i915/gt/selftest_mocs.c
@@ -131,13 +131,14 @@ static int read_mocs_table(struct i915_request *rq,
const struct drm_i915_mocs_table *table,
u32 *offset)
{
+ struct intel_gt *gt = rq->engine->gt;
u32 addr;
if (!table)
return 0;
if (HAS_GLOBAL_MOCS_REGISTERS(rq->engine->i915))
- addr = global_mocs_offset();
+ addr = global_mocs_offset() + gt->uncore->gsi_offset;
else
addr = mocs_offset(rq->engine);
--
2.40.0
next prev parent reply other threads:[~2023-04-21 18:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-21 18:25 [Intel-gfx] [PATCH v2 0/2] Define MOCS and PAT tables for MTL Andi Shyti
2023-04-21 18:25 ` [Intel-gfx] [PATCH v2 1/2] drm/i915/mtl: " Andi Shyti
2023-04-21 18:25 ` Andi Shyti [this message]
2023-04-21 21:57 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for " Patchwork
2023-04-21 22:11 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-04-22 8:45 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2023-04-22 10:47 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for Define MOCS and PAT tables for MTL (rev2) Patchwork
2023-04-22 10:57 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-04-22 13:08 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2023-04-23 0:27 ` [Intel-gfx] [PATCH v2 0/2] Define MOCS and PAT tables for MTL Andi Shyti
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=20230421182535.292670-3-andi.shyti@linux.intel.com \
--to=andi.shyti@linux.intel.com \
--cc=andi.shyti@kernel.org \
--cc=andrzej.hajda@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=fei.yang@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
--cc=matthew.d.roper@intel.com \
--cc=nirmoy.das@intel.com \
/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