[igt-dev] [PATCH i-g-t 11/14] lib/igt_fb: Add Xe2 mocs to XY_FAST_COLOR_BLT

Lucas De Marchi lucas.demarchi at intel.com
Fri Sep 15 13:23:43 UTC 2023


Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
---
 lib/igt_fb.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 722996779..d353b439f 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -2754,6 +2754,7 @@ static struct blt_copy_object *blt_fb_init(const struct igt_fb *fb,
 	struct blt_copy_object *blt;
 	enum blt_tiling_type blt_tile;
 	uint64_t stride;
+	uint32_t devid = intel_get_drm_devid(fb->fd);
 
 	blt = malloc(sizeof(*blt));
 	igt_assert(blt);
@@ -2763,7 +2764,11 @@ static struct blt_copy_object *blt_fb_init(const struct igt_fb *fb,
 
 	blt_tile = fb_tile_to_blt_tile(fb->modifier);
 	stride = blt_tile == T_LINEAR ? fb->strides[plane] : fb->strides[plane] / 4;
-	mocs = intel_get_uc_mocs_index(fb->fd) << XY_FAST_COLOR_BLT_MOCS_INDEX_SHIFT;
+
+	if (intel_graphics_ver(devid) >= IP_VER(20, 0))
+		mocs = intel_get_uc_mocs_index(fb->fd) << XE2_XY_FAST_COLOR_BLT_MOCS_INDEX_SHIFT;
+	else
+		mocs = intel_get_uc_mocs_index(fb->fd) << XY_FAST_COLOR_BLT_MOCS_INDEX_SHIFT;
 
 	blt_set_object(blt, handle, fb->size, memregion,
 		       mocs,
-- 
2.40.1



More information about the igt-dev mailing list