public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Xin Wang <x.wang@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Xin Wang <x.wang@intel.com>
Subject: [PATCH 0/5] lib/xe: query engine class capabilities from debugfs info
Date: Thu,  2 Apr 2026 18:40:35 -0700	[thread overview]
Message-ID: <20260403014040.310758-1-x.wang@intel.com> (raw)

The xe kernel driver recently started exposing engine class capability
bitmasks in the debugfs "info" node:

  multi_lrc_engine_classes vcs vecs
  gt0 multi_queue_engine_classes bcs ccs

These entries were introduced by the following KMD series:
  https://patchwork.freedesktop.org/series/163802/
  - drm/xe: improve readability of debugfs engine info output
  - drm/xe: expose multi-lrc engine classes in debugfs info

This series wires up IGT to consume these debugfs entries:

Patch 1 adds two bitmask fields to struct xe_device (multi_lrc_mask and
multi_queue_engine_class_mask) and populates them in xe_device_get() by
reading the debugfs "info" file line-by-line.  UINT16_MAX is used as a
sentinel meaning "not available" so that older kernels that do not expose
these entries continue to work via the existing hardcoded fallbacks.

Patch 2 implements xe_engine_class_supports_multi_lrc(fd, engine_class).
When the kernel-reported bitmask is available it is used directly; otherwise
the function falls back to returning true only for VIDEO_DECODE and
VIDEO_ENHANCE, matching the previous hardcoded behaviour.

Patch 3 refactors xe_engine_class_supports_multi_queue() in the same way,
adding an fd parameter so it can consult the kernel-reported bitmask.  All
callers (direct calls in xe_exec_threads.c and macro users in
xe_exec_multi_queue.c) are updated accordingly.  Note that
xe_for_each_multi_queue_engine_class() gains a mandatory fd parameter as
part of this change.

Patch 4 fixes xe_exec_multi_queue __test_sanity() to expect -EINVAL (instead
of -EOPNOTSUPP) when attempting to create a parallel exec queue for an engine
class that supports multi-LRC, which is what the kernel now returns in that
case.

Patch 5 guards the balancer and multi-LRC codepaths in xe_exec_balancer,
xe_exec_reset, xe_exec_threads and xe_drm_fdinfo with
xe_engine_class_supports_multi_lrc() so that tests are skipped rather than
failing on engine classes whose hardware does not support multi-LRC
submission.

Xin Wang (5):
  lib/xe: cache engine class masks from debugfs info
  lib/xe: add xe_engine_class_supports_multi_lrc()
  lib/xe: use debugfs info to implement
    xe_engine_class_supports_multi_queue()
  tests/intel/xe_exec_multi_queue: fix expected error for parallel queue
    creation
  tests/intel: skip multi-LRC tests for engine classes that do not
    support it

 lib/xe/xe_query.c                 | 156 +++++++++++++++++++++++++++---
 lib/xe/xe_query.h                 |  21 +++-
 tests/intel/xe_drm_fdinfo.c       |   2 +-
 tests/intel/xe_exec_balancer.c    |   6 +-
 tests/intel/xe_exec_multi_queue.c |   7 +-
 tests/intel/xe_exec_reset.c       |   2 +-
 tests/intel/xe_exec_threads.c     |   5 +-
 7 files changed, 169 insertions(+), 30 deletions(-)

-- 
2.43.0


             reply	other threads:[~2026-04-03  1:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-03  1:40 Xin Wang [this message]
2026-04-03  1:40 ` [PATCH 1/5] lib/xe: cache engine class masks from debugfs info Xin Wang
2026-04-03  1:40 ` [PATCH 2/5] lib/xe: add xe_engine_class_supports_multi_lrc() Xin Wang
2026-04-03  1:40 ` [PATCH 3/5] lib/xe: use debugfs info to implement xe_engine_class_supports_multi_queue() Xin Wang
2026-04-03  1:40 ` [PATCH 4/5] tests/intel/xe_exec_multi_queue: fix expected error for parallel queue creation Xin Wang
2026-04-03  3:22   ` Niranjana Vishwanathapura
2026-04-03  7:00     ` Wang, X
2026-04-03  1:40 ` [PATCH 5/5] tests/intel: skip multi-LRC tests for engine classes that do not support it Xin Wang
2026-04-03  2:42 ` ✓ Xe.CI.BAT: success for lib/xe: query engine class capabilities from debugfs info Patchwork
2026-04-03  3:03 ` ✓ i915.CI.BAT: " Patchwork
2026-04-03 12:57 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-04-03 22:34 ` ✗ i915.CI.Full: " Patchwork

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=20260403014040.310758-1-x.wang@intel.com \
    --to=x.wang@intel.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