public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
To: igt-dev@lists.freedesktop.org
Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Subject: [PATCH i-g-t 8/8] lib/igt_fb: on Intel Xe force Vebox copy on yuv formats
Date: Fri, 13 Mar 2026 15:52:03 +0200	[thread overview]
Message-ID: <20260313135203.1782240-9-juhapekka.heikkila@gmail.com> (raw)
In-Reply-To: <20260313135203.1782240-1-juhapekka.heikkila@gmail.com>

This is to test Vebox engine along with other engines. Vebox is
forced to be used when use tile4 needing tile convert and pixel
format is yuv.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
 lib/igt_fb.c | 34 +++++++++++++++++++++++++---------
 1 file changed, 25 insertions(+), 9 deletions(-)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index cfd5d66fb..766d163e5 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -2596,6 +2596,19 @@ static bool block_copy_ok(const struct igt_fb *fb)
 					       fb_tile_to_blt_tile(fb->modifier));
 }
 
+static bool use_vebox_copy(const struct igt_fb *src_fb,
+			   const struct igt_fb *dst_fb)
+{
+	return (is_i915_device(src_fb->fd) &&
+		(igt_fb_is_gen12_mc_ccs_modifier(dst_fb->modifier) ||
+		 igt_format_is_yuv(src_fb->drm_format) ||
+		 igt_format_is_yuv(dst_fb->drm_format))) ||
+	       (is_xe_device(src_fb->fd) &&
+		(dst_fb->modifier == I915_FORMAT_MOD_4_TILED ||
+		 src_fb->modifier == I915_FORMAT_MOD_4_TILED) &&
+		 igt_format_is_yuv(dst_fb->drm_format));
+}
+
 static bool ccs_needs_enginecopy(const struct igt_fb *fb)
 {
 	if (igt_fb_is_gen12_rc_ccs_cc_modifier(fb->modifier))
@@ -2624,6 +2637,12 @@ static bool blitter_ok(const struct igt_fb *fb)
 	    is_xe_device(fb->fd))
 		return false;
 
+	/*
+	 * This is to utilize Vebox engine for testing on Xe driver.
+	 */
+	if (use_vebox_copy(fb, fb) && fb->modifier != DRM_FORMAT_MOD_NONE)
+		return false;
+
 	if (is_xe_device(fb->fd))
 		return true;
 
@@ -2664,6 +2683,12 @@ static bool use_enginecopy(const struct igt_fb *fb)
 	if (ccs_needs_enginecopy(fb))
 		return true;
 
+	/*
+	 * This is to utilize Vebox for testing
+	 */
+	if (use_vebox_copy(fb, fb))
+		return true;
+
 	return fb->modifier == I915_FORMAT_MOD_Yf_TILED ||
 		fb->modifier == I915_FORMAT_MOD_X_TILED;
 }
@@ -2874,15 +2899,6 @@ static void fini_buf(struct intel_buf *buf)
 	intel_buf_destroy(buf);
 }
 
-static bool use_vebox_copy(const struct igt_fb *src_fb,
-			   const struct igt_fb *dst_fb)
-{
-
-	return igt_fb_is_gen12_mc_ccs_modifier(dst_fb->modifier) ||
-	       igt_format_is_yuv(src_fb->drm_format) ||
-	       igt_format_is_yuv(dst_fb->drm_format);
-}
-
 /**
  * copy_with_engine:
  * @blit: context for the copy operation
-- 
2.43.0


  parent reply	other threads:[~2026-03-13 13:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-13 13:51 [PATCH i-g-t 0/8] Enable Vebox engine copy on Intel Xe driver Juha-Pekka Heikkila
2026-03-13 13:51 ` [PATCH i-g-t 1/8] lib: take out duplicate assert Juha-Pekka Heikkila
2026-03-13 13:51 ` [PATCH i-g-t 2/8] lib/intel_batchbuffer: make __intel_bb_create gt aware Juha-Pekka Heikkila
2026-03-13 13:51 ` [PATCH i-g-t 3/8] lib/xe: add xe_exec_queue_create_class_gt Juha-Pekka Heikkila
2026-03-13 13:51 ` [PATCH i-g-t 4/8] lib/intel_batchbuffer: add intel_bb_create_with_gt function Juha-Pekka Heikkila
2026-03-13 13:52 ` [PATCH i-g-t 5/8] lib/intel_batchbuffer: move engine class selection to helper Juha-Pekka Heikkila
2026-03-13 13:52 ` [PATCH i-g-t 6/8] lib/intel_batchbuffer/xe: add bb exec path to use specific engine and gt Juha-Pekka Heikkila
2026-03-13 13:52 ` [PATCH i-g-t 7/8] lib: Enable Vebox framebuffer copying on Intel Xe2 Juha-Pekka Heikkila
2026-03-13 13:52 ` Juha-Pekka Heikkila [this message]
2026-03-13 15:53 ` ✓ Xe.CI.BAT: success for Enable Vebox engine copy on Intel Xe driver (rev7) Patchwork
2026-03-13 16:17 ` ✓ i915.CI.BAT: " Patchwork
2026-03-14 18:50 ` ✗ i915.CI.Full: failure " Patchwork
2026-03-14 19:17 ` ✗ Xe.CI.FULL: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2026-03-18 15:05 [PATCH i-g-t 0/8] Enable Vebox engine copy on Intel Xe driver Juha-Pekka Heikkila
2026-03-18 15:05 ` [PATCH i-g-t 8/8] lib/igt_fb: on Intel Xe force Vebox copy on yuv formats Juha-Pekka Heikkila
2026-03-20 13:46 [PATCH i-g-t 0/8] Enable Vebox engine copy on Intel Xe driver Juha-Pekka Heikkila
2026-03-20 13:46 ` [PATCH i-g-t 8/8] lib/igt_fb: on Intel Xe force Vebox copy on yuv formats Juha-Pekka Heikkila
2026-03-23 16:29 [PATCH i-g-t 0/8] Enable Vebox engine copy on Intel Xe driver Juha-Pekka Heikkila
2026-03-23 16:29 ` [PATCH i-g-t 8/8] lib/igt_fb: on Intel Xe force Vebox copy on yuv formats Juha-Pekka Heikkila
2026-04-13 12:46   ` Maarten Lankhorst

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=20260313135203.1782240-9-juhapekka.heikkila@gmail.com \
    --to=juhapekka.heikkila@gmail.com \
    --cc=igt-dev@lists.freedesktop.org \
    /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