[igt-dev] [PATCH i-g-t v3 08/13] lib/intel_mocs: Add Xe2 mocs indexes
Lucas De Marchi
lucas.demarchi at intel.com
Wed Oct 4 15:49:17 UTC 2023
Add WB and UC mocs indexes for Xe2 architecture and later.
v2: Use index 4 as WB index
Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
---
lib/intel_mocs.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/intel_mocs.c b/lib/intel_mocs.c
index 6a4ec25e4..9e16b32f1 100644
--- a/lib/intel_mocs.c
+++ b/lib/intel_mocs.c
@@ -14,6 +14,8 @@
#define MTL_MOCS_WB_IDX 10
#define GEN12_MOCS_UC_IDX 3
#define GEN12_MOCS_WB_IDX 2
+#define XE2_MOCS_UC_IDX 3
+#define XE2_MOCS_WB_IDX 4
#define XY_BLOCK_COPY_BLT_MOCS_SHIFT 21
#define XY_CTRL_SURF_COPY_BLT_MOCS_SHIFT 25
@@ -33,7 +35,10 @@ static void get_mocs_index(int fd, struct drm_intel_mocs_index *mocs)
* This helper function is providing current UC as well
* as WB MOCS index based on platform.
*/
- if (IS_METEORLAKE(devid)) {
+ if (intel_graphics_ver(devid) >= IP_VER(20, 0)) {
+ mocs->uc_index = XE2_MOCS_UC_IDX;
+ mocs->wb_index = XE2_MOCS_WB_IDX;
+ } else if (IS_METEORLAKE(devid)) {
mocs->uc_index = MTL_MOCS_UC_IDX;
mocs->wb_index = MTL_MOCS_WB_IDX;
} else if (IS_DG2(devid)) {
--
2.40.1
More information about the igt-dev
mailing list