From: Jeevan B <jeevan.b@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: lucas.demarchi@intel.com
Subject: [igt-dev] [PATCH i-g-t 2/2] lib/igt_draw: Add MOCS values for MTL
Date: Fri, 13 Jan 2023 11:52:33 +0530 [thread overview]
Message-ID: <20230113062233.14750-3-jeevan.b@intel.com> (raw)
In-Reply-To: <20230113062233.14750-1-jeevan.b@intel.com>
On MTL, we want the table entry labelled "UC (GO:Mem)"
which has index 5. This means that the MOCS value is 10.
Signed-off-by: Jeevan B <jeevan.b@intel.com>
---
lib/i915/intel_mocs.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/lib/i915/intel_mocs.c b/lib/i915/intel_mocs.c
index df541ab0..95f0fbde 100644
--- a/lib/i915/intel_mocs.c
+++ b/lib/i915/intel_mocs.c
@@ -11,6 +11,8 @@
#define DG1_MOCS_WB_IDX 5
#define DG2_MOCS_UC_IDX 1
#define DG2_MOCS_WB_IDX 3
+#define MTL_MOCS_UC_IDX 5
+#define MTL_MOCS_WB_IDX 10
#define GEN12_MOCS_UC_IDX 3
#define GEN12_MOCS_WB_IDX 2
#define XY_BLOCK_COPY_BLT_MOCS_SHIFT 21
@@ -32,13 +34,15 @@ static void get_mocs_index(int fd, struct drm_i915_mocs_index *mocs)
* This helper function is providing current UC as well
* as WB MOCS index based on platform.
*/
- if (IS_DG1(devid)) {
- mocs->uc_index = DG1_MOCS_UC_IDX;
- mocs->wb_index = DG1_MOCS_WB_IDX;
+ if (IS_METEORLAKE(devid)) {
+ mocs->uc_index = MTL_MOCS_UC_IDX;
+ mocs->wb_index = MTL_MOCS_WB_IDX;
} else if (IS_DG2(devid)) {
mocs->uc_index = DG2_MOCS_UC_IDX;
mocs->wb_index = DG2_MOCS_WB_IDX;
-
+ } else if (IS_DG1(devid)) {
+ mocs->uc_index = DG1_MOCS_UC_IDX;
+ mocs->wb_index = DG1_MOCS_WB_IDX;
} else if (IS_GEN12(devid)) {
mocs->uc_index = GEN12_MOCS_UC_IDX;
mocs->wb_index = GEN12_MOCS_WB_IDX;
--
2.19.1
next prev parent reply other threads:[~2023-01-13 6:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-13 6:22 [igt-dev] [PATCH i-g-t 0/2] lib/igt_draw: Change MOCS settings for MTL Jeevan B
2023-01-13 6:22 ` [igt-dev] [PATCH i-g-t 1/2] lib/igt_draw: Use intel_get_uc_mocs to get MOCS value Jeevan B
2023-01-13 16:24 ` Lucas De Marchi
2023-01-13 6:22 ` Jeevan B [this message]
2023-01-13 16:25 ` [igt-dev] [PATCH i-g-t 2/2] lib/igt_draw: Add MOCS values for MTL Lucas De Marchi
2023-01-13 6:33 ` [igt-dev] ✗ Fi.CI.BUILD: failure for lib/igt_draw: Change MOCS settings for MTL (rev8) Patchwork
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=20230113062233.14750-3-jeevan.b@intel.com \
--to=jeevan.b@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=lucas.demarchi@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