From: Jeevan B <jeevan.b@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: lucas.demarchi@intel.com
Subject: [igt-dev] [PATCH 2/2] lib/igt_draw: Add MOCS values for MTL
Date: Thu, 19 Jan 2023 22:27:02 +0530 [thread overview]
Message-ID: <20230119165702.9558-3-jeevan.b@intel.com> (raw)
In-Reply-To: <20230119165702.9558-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>
Reviewed-by: Lucas De Marchi <lucas.demarchi@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-19 16:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-19 16:57 [igt-dev] [PATCH 0/2] lib/igt_draw: Change MOCS settings for MTL Jeevan B
2023-01-19 16:57 ` [igt-dev] [PATCH 1/2] lib/igt_draw: Use intel_get_uc_mocs to get MOCS value Jeevan B
2023-01-19 16:57 ` Jeevan B [this message]
2023-01-19 17:47 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/igt_draw: Change MOCS settings for MTL Patchwork
2023-01-20 21:44 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2023-01-23 13:52 ` Kamil Konieczny
2023-01-24 3:32 ` Yedireswarapu, SaiX Nandan
2023-01-24 1:59 ` [igt-dev] ✓ Fi.CI.IGT: success " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2023-01-13 9:10 [igt-dev] [PATCH 0/2] " Jeevan B
2023-01-13 9:10 ` [igt-dev] [PATCH 2/2] lib/igt_draw: Add MOCS values " Jeevan B
2023-01-13 11:30 ` Zbigniew Kempczyński
2023-01-18 10:15 ` B, Jeevan
2023-01-18 20:36 ` Lucas De Marchi
2023-01-13 11:32 ` Zbigniew Kempczyński
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=20230119165702.9558-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 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.