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 7/8] lib: Enable Vebox framebuffer copying on Intel Xe2
Date: Fri, 20 Feb 2026 18:17:17 +0200 [thread overview]
Message-ID: <20260220161718.652862-8-juhapekka.heikkila@gmail.com> (raw)
In-Reply-To: <20260220161718.652862-1-juhapekka.heikkila@gmail.com>
Choose correct gt for Vebox and use gen12 veboxcopy
functionality on Xe2
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
lib/igt_fb.c | 20 +++++++++++++++++++-
lib/intel_batchbuffer.c | 2 +-
2 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index d59fe133b..cfd5d66fb 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -2560,6 +2560,7 @@ struct fb_blit_upload {
struct fb_blit_linear linear;
struct buf_ops *bops;
struct intel_bb *ibb;
+ uint32_t vm;
};
static enum blt_tiling_type fb_tile_to_blt_tile(uint64_t tile)
@@ -3345,6 +3346,9 @@ static void free_linear_mapping(struct fb_blit_upload *blit)
if (blit->ibb) {
intel_bb_destroy(blit->ibb);
buf_ops_destroy(blit->bops);
+
+ if (is_xe_device(fd) && blit->vm)
+ xe_vm_destroy(fd, blit->vm);
}
}
@@ -3364,10 +3368,24 @@ static void setup_linear_mapping(struct fb_blit_upload *blit)
int fd = blit->fd;
struct igt_fb *fb = blit->fb;
struct fb_blit_linear *linear = &blit->linear;
+ struct drm_xe_engine *engine;
+ uint16_t class;
if (!igt_vc4_is_tiled(fb->modifier) && use_enginecopy(fb)) {
blit->bops = buf_ops_create(fd);
- blit->ibb = intel_bb_create(fd, 4096);
+
+ if (is_xe_device(fd)) {
+ class = use_vebox_copy(fb, fb) ? DRM_XE_ENGINE_CLASS_VIDEO_ENHANCE :
+ DRM_XE_ENGINE_CLASS_RENDER;
+
+ engine = xe_find_engine_by_class(fd, class);
+ blit->vm = xe_vm_create(fd, 0, 0);
+ blit->ibb = intel_bb_create_with_gt(fd, 4096,
+ blit->vm,
+ engine->instance.gt_id);
+ } else {
+ blit->ibb = intel_bb_create(fd, 4096);
+ }
}
/*
diff --git a/lib/intel_batchbuffer.c b/lib/intel_batchbuffer.c
index f3b8aeaba..ef89b93df 100644
--- a/lib/intel_batchbuffer.c
+++ b/lib/intel_batchbuffer.c
@@ -697,7 +697,7 @@ igt_vebox_copyfunc_t igt_get_vebox_copyfunc(int devid)
{
igt_vebox_copyfunc_t copy = NULL;
- if (IS_GEN12(devid))
+ if (intel_gen(devid) >= 12)
copy = gen12_vebox_copyfunc;
return copy;
--
2.43.0
next prev parent reply other threads:[~2026-02-20 16:18 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-20 16:17 [PATCH i-g-t 0/8] Enable Vebox engine copy on Intel Xe driver Juha-Pekka Heikkila
2026-02-20 16:17 ` [PATCH i-g-t 1/8] lib: take out duplicate assert Juha-Pekka Heikkila
2026-02-20 16:17 ` [PATCH i-g-t 2/8] lib/intel_batchbuffer: make __intel_bb_create gt aware Juha-Pekka Heikkila
2026-02-20 16:17 ` [PATCH i-g-t 3/8] lib/xe: add xe_exec_queue_create_class_gt Juha-Pekka Heikkila
2026-02-20 16:17 ` [PATCH i-g-t 4/8] lib/intel_batchbuffer: add intel_bb_create_with_gt function Juha-Pekka Heikkila
2026-02-20 16:17 ` [PATCH i-g-t 5/8] lib/intel_batchbuffer: move engine class selection to helper Juha-Pekka Heikkila
2026-02-20 16:17 ` [PATCH i-g-t 6/8] lib/intel_batchbuffer/xe: add bb exec path to use specific engine and gt Juha-Pekka Heikkila
2026-02-20 16:17 ` Juha-Pekka Heikkila [this message]
2026-02-20 16:17 ` [PATCH i-g-t 8/8] lib/igt_fb: on Intel force Vebox copy on yuv formats Juha-Pekka Heikkila
2026-02-20 22:34 ` ✗ Xe.CI.BAT: failure for Enable Vebox engine copy on Intel Xe driver (rev5) Patchwork
2026-02-20 22:40 ` ✓ i915.CI.BAT: success " Patchwork
2026-02-21 2:00 ` ✗ Xe.CI.BAT: failure for Enable Vebox engine copy on Intel Xe driver (rev6) Patchwork
2026-02-21 2:11 ` ✓ i915.CI.BAT: success " Patchwork
2026-02-21 13:06 ` ✗ i915.CI.Full: failure for Enable Vebox engine copy on Intel Xe driver (rev5) Patchwork
2026-02-21 14:44 ` ✗ i915.CI.Full: failure for Enable Vebox engine copy on Intel Xe driver (rev6) Patchwork
2026-02-23 11:16 ` ✗ Xe.CI.FULL: failure for Enable Vebox engine copy on Intel Xe driver (rev5) Patchwork
2026-02-23 12:38 ` ✗ Xe.CI.FULL: failure for Enable Vebox engine copy on Intel Xe driver (rev6) Patchwork
-- strict thread matches above, loose matches on Subject: below --
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:52 ` [PATCH i-g-t 7/8] lib: Enable Vebox framebuffer copying on Intel Xe2 Juha-Pekka Heikkila
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 7/8] lib: Enable Vebox framebuffer copying on Intel Xe2 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 7/8] lib: Enable Vebox framebuffer copying on Intel Xe2 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 7/8] lib: Enable Vebox framebuffer copying on Intel Xe2 Juha-Pekka Heikkila
2026-04-13 12:50 ` 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=20260220161718.652862-8-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