lib/xe: query engine class capabilities from debugfs info
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest4 patches 5 repliesIn review
- v15 patches 2 repliesSuperseded
Changes in v2 from the cover letter
- Merged previous xe_exec_multi_queue expected-error fix into patch 4 two patches share the same logical motivation.
- xe_exec_multi_queue: use if (n > 1 && xe_engine_class_supports_multi_lrc()) instead of a ternary to select the error code (Niranjana)
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | lib/xe: cache engine class masks from debugfs infolib/ lib/ | +98 | 1 reply | |
| 2/4 | lib/xe: add xe_engine_class_supports_multi_lrc()lib/ lib/ | +31 | 1 reply | |
| 3/4 | lib/xe: use debugfs info to implement xe_engine_class_supports_multi_queue()lib/ lib/ tests/ +1 more | +38 | 1 reply | |
| 4/4 | tests/intel: skip or adjust tests for non-multi-LRC engine classestests/ tests/ tests/ +2 more | +7 | 1 reply |
Reviews trailers per patch
All 4 patches have a Reviewed-by or Acked-by.
| Patch | Daniel Charles |
|---|---|
| 1/4 | R-b |
| 2/4 | R-b |
| 3/4 | R-b |
| 4/4 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/4] lib/xe: query engine class capabilities from debugfs info
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 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. It also ensures the parallel-queue rejection check in xe_exec_multi_queue __test_sanity() is only exercised for engine classes that support multi-LRC.
v2:
- Merged previous xe_exec_multi_queue expected-error fix into patch 4 two patches share the same logical motivation.
- xe_exec_multi_queue: use if (n > 1 && xe_engine_class_supports_multi_lrc()) instead of a ternary to select the error code (Niranjana)
Xin Wang (4):
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: skip or adjust tests for non-multi-LRC engine classes
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 | 6 +- tests/intel/xe_exec_reset.c | 2 +- tests/intel/xe_exec_threads.c | 5 +- 7 files changed, 168 insertions(+), 30 deletions(-)
Signature · 1 line
2.43.0