[igt-dev] [PATCH i-g-t 2/2] lib/igt_fb: on xe driver switch from rendercopy to blitcopy

Kunal Joshi kunal1.joshi at intel.com
Mon Jul 31 08:18:41 UTC 2023


on xe driver use blitcopy for everything where otherwise would
use rendercopy.

Cc: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
Cc: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
Signed-off-by: Kunal Joshi <kunal1.joshi at intel.com>
Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
---
 lib/igt_fb.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 7d1337303..b33c639ab 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -2529,7 +2529,7 @@ static bool use_enginecopy(const struct igt_fb *fb)
 	if (!is_intel_device(fb->fd))
 		return false;
 
-	if (!is_xe_device(fb->fd) && blitter_ok(fb))
+	if (blitter_ok(fb))
 		return false;
 
 	return fb->modifier == I915_FORMAT_MOD_Yf_TILED ||
@@ -3038,9 +3038,7 @@ static void free_linear_mapping(struct fb_blit_upload *blit)
 		igt_nouveau_delete_bo(&linear->fb);
 	} else if (is_xe_device(fd)) {
 		gem_munmap(linear->map, linear->fb.size);
-		copy_with_engine(blit, fb, &linear->fb);
-
-		syncobj_wait(fd, &blit->ibb->engine_syncobj, 1, INT64_MAX, 0, NULL);
+		blitcopy(fb, &linear->fb);
 		gem_close(fd, linear->fb.gem_handle);
 	} else {
 		gem_munmap(linear->map, linear->fb.size);
@@ -3120,7 +3118,7 @@ static void setup_linear_mapping(struct fb_blit_upload *blit)
 
 		linear->map = igt_nouveau_mmap_bo(&linear->fb, PROT_READ | PROT_WRITE);
 	} else if (is_xe_device(fd)) {
-		copy_with_engine(blit, &linear->fb, fb);
+		blitcopy(&linear->fb, fb);
 
 		linear->map = xe_bo_mmap_ext(fd, linear->fb.gem_handle,
 					     linear->fb.size, PROT_READ | PROT_WRITE);
-- 
2.25.1



More information about the igt-dev mailing list