Skip to content

Future-proof GT ID handling for Xe

Matt Roper igt-dev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest7 patches 3 repliesIn review
  2. v17 patches 10 repliesSuperseded

Changes in v2 from the cover letter

- Various tweaks to ensure 'unsigned long long' masks are handled properly on 32-bit architectures. (Zbigniew)
- Correct logic for xe_compute test; we need to ensure that the body of the per-GT loop doesn't have any open DRM fd's.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7lib/xe: Track valid GT IDslib/xe/xe_query.c lib/xe/xe_query.h+8 -01 reply
2/7lib/xe: Don't assume GT ID matches location in GT query listlib/xe/xe_query.c lib/xe/xe_query.h lib/xe/xe_util.c+31 -150 replies
3/7lib/xe: Populate vram_size[] and visible_vram_size[] by GT IDlib/xe/xe_query.c+17 -80 replies
4/7lib/xe: Ensure GT loops iterate over all GTs properlylib/xe/xe_query.h+3 -20 replies
5/7tests/intel/xe_query: Look up GT reference clock correctlytests/intel/xe_query.c+4 -90 replies
6/7lib/xe: Add xe_dev_max_gt()lib/xe/xe_query.c lib/xe/xe_query.h+15 -00 replies
7/7tests/xe: Don't assume max GT ID is num_gt - 1tests/intel/xe_compute.c tests/intel/xe_gt_freq.c+36 -121 reply

Reviews trailers per patch

All 7 patches have a Reviewed-by or Acked-by.

PatchZbigniew Kempczyński
1/7R-b
2/7R-b
3/7R-b
4/7R-b
5/7R-b
6/7R-b
7/7R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH i-g-t v2 0/7] Future-proof GT ID handling for Xe

Current Intel platforms fall into one of three cases:
* Single tile, single GT (primary)
* Multiple tiles, one GT each (primary)
* Single tile, two GTs (primary+media)

In all three cases, the GTs are always consecutive (0 and 1) and the GT's uapi ID matches its index in the xe_query GT list. Future platforms could potentially have multiple tiles with multiple GTs each, and/or could introduce new types of GTs. In either case, it's possible that there might be "holes" in the set of GT IDs returned by the GT query (e.g., 0, 2, 3 if a multi-tile platform only media on the second tile; or 0, 2 if a single-tile platform introduced a new type of GT, but lacked media).

We need to break IGT's assumption that the uapi ID used to represent a GT always matches its index in the GT query. This series shouldn't have any functional impact on today's Intel platforms; the goal is to just future-proof the code for new types of platforms that could show up in the future. Similar refactoring and cleanup is happening on the xe.ko side at https://patchwork.freedesktop.org/series/150192/ although this series does not depend on the kernel work.

v2:
- Various tweaks to ensure 'unsigned long long' masks are handled properly on 32-bit architectures. (Zbigniew)
- Correct logic for xe_compute test; we need to ensure that the body of the per-GT loop doesn't have any open DRM fd's.

Cc Zbigniew Kempczyński <[email protected]>

Matt Roper (7):
lib/xe: Track valid GT IDs
lib/xe: Don't assume GT ID matches location in GT query list lib/xe: Populate vram_size[] and visible_vram_size[] by GT ID lib/xe: Ensure GT loops iterate over all GTs properly tests/intel/xe_query: Look up GT reference clock correctly lib/xe: Add xe_dev_max_gt()
tests/xe: Don't assume max GT ID is num_gt - 1

 lib/xe/xe_query.c        | 78 ++++++++++++++++++++++++++++++----------
 lib/xe/xe_query.h        | 10 ++++--
 lib/xe/xe_util.c         |  7 ++--
 tests/intel/xe_compute.c | 40 ++++++++++++++++-----
 tests/intel/xe_gt_freq.c |  8 ++---
 tests/intel/xe_query.c   | 13 +++----
 6 files changed, 112 insertions(+), 44 deletions(-)
Signature · 1 line
2.49.0