tests/intel/xe_multi_tile: Multi-Tile support in IGT
Subsystems (2)
PATCH 1/1 tests/intel/xe_multi_tile: Multi-Tile support in IGT
From: Nishit Sharma <[email protected]>
Added functionality to get Tile ID, GT ID, GT belongs to which tile ID
in multi-tile/single-tile platforms. Added functionality to check if any tile_ID information not provided by driver. E.g.tile available in platforms in order tile0, tile1...tileX in serial order, If tile1 tile2 tile4...tileX populated
than will get Warning tile3 not available.
--- lib/igt_sysfs.c | 3 +- tests/intel/xe_multi_tile.c | 191 ++++++++++++++++++++++++++++++++++++ tests/meson.build | 1 + 3 files changed, 194 insertions(+), 1 deletion(-) create mode 100644 tests/intel/xe_multi_tile.c
lib/igt_sysfs.c +2 -1
@@ -234,7 +234,8 @@ char *xe_sysfs_gt_path(int xe_device, int gt, char *path, int pathlen)if (IS_PONTEVECCHIO (intel_get_drm_devid (xe_device)))snprintf (path, pathlen,"/sys/dev/char/%d:%d/device/tile%d/gt%d" , -major (st.st_rdev),minor (st.st_rdev), gt, gt); +major (st.st_rdev),minor (st.st_rdev), +xe_gt_get_tile_id (xe_device, gt), gt);else snprintf (path, pathlen,"/sys/dev/char/%d:%d/device/tile0/gt%d" ,major (st.st_rdev),minor (st.st_rdev), gt);
tests/intel/xe_multi_tile.c new file +191 -0
191 lines not on this page · raw message
tests/meson.build +1 -0
@@ -292,6 +292,7 @@ intel_xe_progs = [ 'xe_exec_reset', 'xe_exec_sip', 'xe_exec_store', + 'xe_multi_tile', 'xe_exec_threads', 'xe_exercise_blt', 'xe_fault_injection',
Signature · 1 line
2.34.1
Patchwork
CI✗ GitLab.Pipeline: warning for tests/intel/xe_multi_tile: Multi-Tile support in IGT
== Series Details ==
== Series Details ==
Series: tests/intel/xe_multi_tile: Multi-Tile support in IGT
URL : https://patchwork.freedesktop.org/series/144187/
State : warning
== Summary ==
Pipeline status: FAILED.
see https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/pipelines/1355975 for the overview.
build:tests-debian-meson has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/70348891):
[1/859] Generating version.h with a custom command.
[2/8] Linking target runner/runner_test.
[3/8] Linking target assembler/intel-gen4asm.
[4/8] Generating i915_tests.html with a custom command.
[5/8] Generating kms_tests.html with a custom command.
[6/8] Generating xe_tests.rst with a custom command.
FAILED: docs/testplan/xe_tests.rst
/builds/gfx-ci/igt-ci-tags/scripts/igt_doc.py --config /builds/gfx-ci/igt-ci-tags/tests/intel/xe_test_config.json --rest docs/testplan/xe_tests.rst --check-testlist --igt-build-path /builds/gfx-ci/igt-ci-tags/build
Warning: igt@xe_multi_tile@show-tile-info Description documentation is missing
ERROR: Missing documentation for igt@xe_multi_tile@multi-tile-info
ERROR: Unneeded documentation for igt@xe_multi_tile@gt-configuration
ERROR: Unneeded documentation for igt@xe_multi_tile@show-tile-info
Please refer: docs/test_documentation.md for more details
ninja: build stopped: subcommand failed.
section_end:1738343362:step_script
section_start:1738343362:cleanup_file_variables
Cleaning up project directory and file based variables
section_end:1738343363:cleanup_file_variables
ERROR: Job failed: exit code 1
build:tests-debian-meson-arm64 has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/70348894):
section_start:1738343296:get_sources
Getting source from Git repository
$ /host/bin/curl -s -L --cacert /host/ca-certificates.crt --retry 4 -f --retry-delay 60 https://gitlab.freedesktop.org/freedesktop/helm-gitlab-infra/-/raw/main/runner-gating/runner-gating.sh | sh -s -- pre_get_sources_script Checking if the user of the pipeline is allowed... Checking if the job's project is part of a well-known group... Thank you for contributing to freedesktop.org Fetching changes... Reinitialized existing Git repository in /builds/gfx-ci/igt-ci-tags/.git/ Checking out 106274bd as detached HEAD (ref is intel/IGTPW_12528)...
Skipping Git submodules setup
section_end:1738343313:get_sources
section_start:1738343313:step_script
Executing "step_script" stage of the job script
Using docker image sha256:7360075a71dacfc66f0b49b3271b9a459904dbe51c5760efac48fe52da27946c for registry.freedesktop.org/gfx-ci/igt-ci-tags/build-debian-arm64:commit-106274bd62425413b5147a712379f0d8fbd646d9 with digest registry.freedesktop.org/gfx-ci/igt-ci-tags/build-debian-arm64@sha256:df8438cd0e218646c3bdc2eb6abccb43c4e884bfd40a1a4dd0365f1f8031d21f ... section_end:1738343316:step_script
section_start:1738343316:cleanup_file_variables
Cleaning up project directory and file based variables
section_end:1738343317:cleanup_file_variables
ERROR: Job failed (system failure): Error response from daemon: no such image: docker.io/library/sha256:7360075a71dacfc66f0b49b3271b9a459904dbe51c5760efac48fe52da27946c: image not known (docker.go:650:0s)
build:tests-fedora has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/70348886):
[1/861] Generating version.h with a custom command.
[2/7] Linking target runner/runner_test.
[3/7] Generating intel-ci-tests with a custom command.
[4/7] Generating i915_tests.html with a custom command.
[5/7] Generating kms_tests.html with a custom command.
[6/7] Generating xe_tests.rst with a custom command.
FAILED: docs/testplan/xe_tests.rst
/builds/gfx-ci/igt-ci-tags/scripts/igt_doc.py --config /builds/gfx-ci/igt-ci-tags/tests/intel/xe_test_config.json --rest docs/testplan/xe_tests.rst --check-testlist --igt-build-path /builds/gfx-ci/igt-ci-tags/build
Warning: igt@xe_multi_tile@show-tile-info Description documentation is missing
ERROR: Missing documentation for igt@xe_multi_tile@multi-tile-info
ERROR: Unneeded documentation for igt@xe_multi_tile@gt-configuration
ERROR: Unneeded documentation for igt@xe_multi_tile@show-tile-info
Please refer: docs/test_documentation.md for more details
ninja: build stopped: subcommand failed.
section_end:1738343401:step_script
section_start:1738343401:cleanup_file_variables
Cleaning up project directory and file based variables
section_end:1738343402:cleanup_file_variables
ERROR: Job failed: exit code 1
build:tests-fedora-clang has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/70348890):
ninja: Entering directory `build'
[1/861] Generating version.h with a custom command.
[2/6] Generating i915_tests.html with a custom command.
[3/6] Generating intel-ci-tests with a custom command.
[4/6] Generating kms_tests.html with a custom command.
[5/6] Generating xe_tests.rst with a custom command.
FAILED: docs/testplan/xe_tests.rst
/builds/gfx-ci/igt-ci-tags/scripts/igt_doc.py --config /builds/gfx-ci/igt-ci-tags/tests/intel/xe_test_config.json --rest docs/testplan/xe_tests.rst --check-testlist --igt-build-path /builds/gfx-ci/igt-ci-tags/build
Warning: igt@xe_multi_tile@show-tile-info Description documentation is missing
ERROR: Missing documentation for igt@xe_multi_tile@multi-tile-info
ERROR: Unneeded documentation for igt@xe_multi_tile@gt-configuration
ERROR: Unneeded documentation for igt@xe_multi_tile@show-tile-info
Please refer: docs/test_documentation.md for more details
ninja: build stopped: subcommand failed.
section_end:1738343425:step_script
section_start:1738343425:cleanup_file_variables
Cleaning up project directory and file based variables
section_end:1738343425:cleanup_file_variables
ERROR: Job failed: exit code 1
build:tests-fedora-no-libdrm-nouveau has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/70348889):
[1/809] Generating version.h with a custom command.
[2/7] Linking target runner/runner_test.
[3/7] Generating intel-ci-tests with a custom command.
[4/7] Generating i915_tests.html with a custom command.
[5/7] Generating kms_tests.html with a custom command.
[6/7] Generating xe_tests.rst with a custom command.
FAILED: docs/testplan/xe_tests.rst
/builds/gfx-ci/igt-ci-tags/scripts/igt_doc.py --config /builds/gfx-ci/igt-ci-tags/tests/intel/xe_test_config.json --rest docs/testplan/xe_tests.rst --check-testlist --igt-build-path /builds/gfx-ci/igt-ci-tags/build
Warning: igt@xe_multi_tile@show-tile-info Description documentation is missing
ERROR: Missing documentation for igt@xe_multi_tile@multi-tile-info
ERROR: Unneeded documentation for igt@xe_multi_tile@gt-configuration
ERROR: Unneeded documentation for igt@xe_multi_tile@show-tile-info
Please refer: docs/test_documentation.md for more details
ninja: build stopped: subcommand failed.
section_end:1738343366:step_script
section_start:1738343366:cleanup_file_variables
Cleaning up project directory and file based variables
section_end:1738343368:cleanup_file_variables
ERROR: Job failed: exit code 1
build:tests-fedora-no-libunwind has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/70348887):
[1/861] Generating version.h with a custom command.
[2/7] Linking target runner/runner_test.
[3/7] Generating intel-ci-tests with a custom command.
[4/7] Generating kms_tests.html with a custom command.
[5/7] Generating i915_tests.html with a custom command.
[6/7] Generating xe_tests.rst with a custom command.
FAILED: docs/testplan/xe_tests.rst
/builds/gfx-ci/igt-ci-tags/scripts/igt_doc.py --config /builds/gfx-ci/igt-ci-tags/tests/intel/xe_test_config.json --rest docs/testplan/xe_tests.rst --check-testlist --igt-build-path /builds/gfx-ci/igt-ci-tags/build
Warning: igt@xe_multi_tile@show-tile-info Description documentation is missing
ERROR: Missing documentation for igt@xe_multi_tile@multi-tile-info
ERROR: Unneeded documentation for igt@xe_multi_tile@gt-configuration
ERROR: Unneeded documentation for igt@xe_multi_tile@show-tile-info
Please refer: docs/test_documentation.md for more details
ninja: build stopped: subcommand failed.
section_end:1738343410:step_script
section_start:1738343410:cleanup_file_variables
Cleaning up project directory and file based variables
section_end:1738343411:cleanup_file_variables
ERROR: Job failed: exit code 1
build:tests-fedora-oldest-meson has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/70348888):
[1/861] Generating version.h with a custom command.
[2/7] Linking target runner/runner_test.
[3/7] Generating intel-ci-tests with a custom command.
[4/7] Generating i915_tests.html with a custom command.
[5/7] Generating kms_tests.html with a custom command.
[6/7] Generating xe_tests.rst with a custom command.
FAILED: docs/testplan/xe_tests.rst
/builds/gfx-ci/igt-ci-tags/scripts/igt_doc.py --config /builds/gfx-ci/igt-ci-tags/tests/intel/xe_test_config.json --rest docs/testplan/xe_tests.rst --check-testlist --igt-build-path /builds/gfx-ci/igt-ci-tags/build
Warning: igt@xe_multi_tile@show-tile-info Description documentation is missing
ERROR: Missing documentation for igt@xe_multi_tile@multi-tile-info
ERROR: Unneeded documentation for igt@xe_multi_tile@gt-configuration
ERROR: Unneeded documentation for igt@xe_multi_tile@show-tile-info
Please refer: docs/test_documentation.md for more details
ninja: build stopped: subcommand failed.
section_end:1738343407:step_script
section_start:1738343407:cleanup_file_variables
Cleaning up project directory and file based variables
section_end:1738343408:cleanup_file_variables
ERROR: Job failed: exit code 1
== Logs ==
For more details see: https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/pipelines/1355975
Quoted 21 lines · On Fri, Jan 31, 2025 at 02:27:12PM +0000, [email protected] wrote:
From: Nishit Sharma <[email protected]>
Added functionality to get Tile ID, GT ID, GT belongs to which tile ID
in multi-tile/single-tile platforms. Added functionality to check if anytile_IDinformation not provided by driver. E.g.tile available in platforms in order tile0, tile1...tileX in serial order, If tile1 tile2 tile4...tileX populated
than will get Warning tile3 not available.Signed-off-by Nishit Sharma <[email protected]>--- lib/igt_sysfs.c | 3 +- tests/intel/xe_multi_tile.c | 191 ++++++++++++++++++++++++++++++++++++ tests/meson.build | 1 + 3 files changed, 194 insertions(+), 1 deletion(-) create mode 100644 tests/intel/xe_multi_tile.clib/igt_sysfs.c +0
-0
lib/igt_sysfs.c char *xe_sysfs_gt_path(int xe_device, int gt, char *path, int pathlen) · line 241
Quoted 9 lines
lib/igt_sysfs.c +2
-1@@ -234,7 +234,8 @@ char *xe_sysfs_gt_path(int xe_device, int gt, char *path, int pathlen)if (IS_PONTEVECCHIO (intel_get_drm_devid (xe_device)))snprintf (path, pathlen,"/sys/dev/char/%d:%d/device/tile%d/gt%d" , -major (st.st_rdev),minor (st.st_rdev), gt, gt); +major (st.st_rdev),minor (st.st_rdev), +xe_gt_get_tile_id (xe_device, gt), gt);else snprintf (path, pathlen,"/sys/dev/char/%d:%d/device/tile0/gt%d" ,major (st.st_rdev),minor (st.st_rdev), gt);
The fix for the library code should probably be a separate commit from the new test being added since this will presumably change/fix existing code.
Quoted 51 lines
tests/intel/xe_multi_tile.c new file +45
-0@@ -0,0 +1,191 @@ +// SPDX-License-Identifier: MIT +/* +* Copyright © 2025 Intel Corporation +* +* Authors: +* Nishit Sharma <[email protected]> +*/ + +#include <dirent.h> +#include <fcntl.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <unistd.h> + +#include "igt.h" +#include "igt_sysfs.h" + +#include "xe_drm.h" +#include "xe/xe_ioctl.h" +#include "xe/xe_query.h" + +#define MAX_TILES 8 +#define MAX_SLICES 2 + +struct xe_gt_info { +/** @type: GT type: Main or Media */ +uint16_t type; + +/** @tile_id: Tile ID where this GT lives (Information only) */ +uint16_t tile_id; + +/** @gt_id: Unique ID of this GT within the PCI Device */ +uint16_t gt_id; +}; + +/** @info: tile-gt info */ +struct xe_tile_info { +uint8_t tile_count; +uint8_t gt_count; +uint8_t mis_tile:1 ; +uint8_t mis_tile_id; +struct xe_gt_info gt_info[]; +}; + +/**
tests/intel/xe_multi_tile.c line 55
Quoted 10 lines
tests/intel/xe_multi_tile.c new file +10
-0+* TEST: Test to get tile_id by iterating gt on xe +* Category: Core +* Mega feature: General Core features +* Sub-category: mapping tile/s with slices available +* Functionality: gt operation +*/ + +/** +* SUBTEST: show-tile-info +* SUBTEST: gt-configuration
These don't seem to match the name of the subtest in the code ("multi-tile-info").
tests/intel/xe_multi_tile.c line 56
Quoted 1 line
tests/intel/xe_multi_tile.c new file +1
-0+* Description: Test iniitialize xe_tile_info structure with tile_id
This doesn't really seem like a meaningful description since 'xe_tile_info' is just an internal structure used inside this test.
What is the actual goal/motivation here. Are you trying to verify that the Xe query interface returns data correctly? Are you trying to confirm that some kind of hardware behavior is sane? Are you trying to confirm that different interfaces give consistent information (e.g., query ioctl vs sysfs)? It's hard to give feedback on the test when it isn't clear what the primary goal is.
Quoted 14 lines
tests/intel/xe_multi_tile.c new file +14
-0+* Test category: functionality test +* +*/ +struct drm_xe_query_gt_list *xe_gt_list (int fd) +{ +struct drm_xe_query_gt_list *gt_list; +struct drm_xe_device_query query = { + .extensions =0 , + .query =DRM_XE_DEVICE_QUERY_GT_LIST , + .size =0 , + .data =0 , + }; + +igt_assert_eq (igt_ioctl (fd,DRM_IOCTL_XE_DEVICE_QUERY , &query),0 );
tests/intel/xe_multi_tile.c line 80
Quoted 10 lines
tests/intel/xe_multi_tile.c new file +10
-0+igt_assert_neq (query.size,0 ); + + gt_list =malloc (query.size); +igt_assert (gt_list); + + query.data =to_user_pointer (gt_list); +igt_assert_eq (igt_ioctl (fd,DRM_IOCTL_XE_DEVICE_QUERY , &query),0 ); + +return gt_list; +}
Isn't this function basically the same as xe_query_gt_list_new()? Can't we just call that instead?
Quoted 15 lines
tests/intel/xe_multi_tile.c new file +15
-0+ +static void igt_get_gt_info (int fd,struct xe_tile_info *tile_info) +{ +uint8_t iteration =0 ; +uint8_t gt_id =0 ; + +igt_info ("GT iteration\n" ); + +for (int tile_id =0 ; tile_id < tile_info->tile_count; tile_id++) { +for (gt_id += iteration; gt_id < tile_info->gt_count; gt_id++) { +if (tile_id == tile_info->gt_info[gt_id].tile_id) { +igt_info ("GT :gt%d belongs to :tile%d\n" , + tile_info->gt_info[gt_id].gt_id, + tile_info->gt_info[gt_id].tile_id); + iteration++;
tests/intel/xe_multi_tile.c line 105
Quoted 10 lines
tests/intel/xe_multi_tile.c new file +10
-0+ } +else { +igt_info ("GT :gt%d belongs to :tile%d\n" , + tile_info->gt_info[gt_id].gt_id, + tile_info->gt_info[gt_id].tile_id); +continue ; + } + } + } +}
Was this function supposed to do/return something? With a name like this I expected it to return information to the caller, but it seems like this just loops and prints some debug logging. If we removed this function completely it wouldn't actually affect the test in any way.
Quoted 16 lines
tests/intel/xe_multi_tile.c new file +16
-0+ +static void igt_check_if_missingtile (int fd,struct xe_tile_info *tile_info) +{ +if (tile_info->mis_tile == true) +igt_warn ("Missing :tile%d\n" , tile_info->mis_tile_id); +} + +static void igt_check_if_multitile (int fd,struct xe_tile_info *tile_info) +{ +igt_info ("Check for Multi-tile support in Platform\n" ); + +igt_skip_on_f (tile_info->tile_count ==0 , +"No Tile :%d found in platform\n" , + tile_info->tile_count); + +if (tile_info->tile_count ==1 )
tests/intel/xe_multi_tile.c line 131
Quoted 10 lines
tests/intel/xe_multi_tile.c new file +10
-0+igt_info ("Single tile :tile%d found in platform\n" , + tile_info->tile_count); + else { +igt_info ("Tile count :%d in Multi-Tile platform\n" , + tile_info->tile_count); + +for (int tile_id =0 ; tile_id < tile_info->tile_count; tile_id++) +igt_info ("Tile :tile%d available in platform\n" , tile_id); + } +}
It seems like this is a lot of unnecessary debug logging; all we really need is a skip at the callsite rather than a whole dedicated function to do the same thing.
Quoted 38 lines
tests/intel/xe_multi_tile.c new file +38
-0+ +static void igt_get_tile_info (int fd,struct drm_xe_query_gt_list *gt_list, +struct xe_tile_info *tile_info) +{ +uint8_t tile_mis_count =-1 ; +int prev_tile =-1 , tile_id; + + tile_info->tile_count =0 ; + tile_info->mis_tile = false; +for (int index =0 ; index < gt_list->num_gt; index++) { + tile_id = gt_list->gt_list[index].tile_id; +if (prev_tile != tile_id) { +if (++tile_mis_count != tile_id) { + tile_info->mis_tile = true; + tile_info->mis_tile_id = tile_mis_count; + tile_mis_count = tile_id; + } + prev_tile = tile_id; + tile_info->tile_count++; + tile_info->gt_info[index].tile_id = prev_tile; + tile_info->gt_info[index].gt_id = index; + } +else { + tile_info->gt_info[index].tile_id = tile_id; + tile_info->gt_info[index].gt_id = index; + } + tile_info->gt_info[index].type =xe_is_media_gt (fd, index); + } + tile_info->gt_count = gt_list->num_gt; +} + +igt_main +{ +int fd; +struct xe_engine_list_entry *en; +struct drm_xe_engine_class_instance *hwe; +struct drm_xe_query_gt_list *gt_list; +struct xe_tile_info *tile_info;
tests/intel/xe_multi_tile.c line 179
Quoted 10 lines
tests/intel/xe_multi_tile.c new file +10
-0+ + tile_info =malloc (sizeof (*tile_info)); +igt_assert (tile_info); + + igt_fixture { + fd =drm_open_driver (DRIVER_XE ); +xe_device_get (fd); + } + + igt_subtest("multi-tile-info") {
As noted above, this doesn't really seem to match what the test is doing. It appears the goal of this test is to make sure that all tiles have consecutive IDs, at least as far as we can see from the query interface.
tests/intel/xe_multi_tile.c line 185
Quoted 6 lines
tests/intel/xe_multi_tile.c new file +6
-0+ gt_list =xe_gt_list (fd); + +igt_get_tile_info (fd, gt_list, tile_info); +igt_check_if_multitile (fd, tile_info); +igt_check_if_missingtile (fd, tile_info); +igt_get_gt_info (fd, tile_info);
As noted above, this function doesn't do anything; we could just drop it.
tests/intel/xe_multi_tile.c line 187
Quoted 2 lines
tests/intel/xe_multi_tile.c new file +2
-0+ } +
Depending on what your goal is, should there be other tests here as well? E.g., should we confirm that the query interface is consistent with sysfs (no tile IDs reported in one that don't appear in the other)? Is there anything else we should be checking?
Matt
Quoted 19 lines
tests/intel/xe_multi_tile.c new file +4
-0+ igt_fixture { +drm_close_driver (fd); + } +}tests/meson.build +1
-0@@ -292,6 +292,7 @@ intel_xe_progs = [ 'xe_exec_reset', 'xe_exec_sip', 'xe_exec_store', + 'xe_multi_tile', 'xe_exec_threads', 'xe_exercise_blt', 'xe_fault_injection',Signature · 1 line
2.34.1
Signature · 4 lines
Matt Roper Graphics Software Engineer Linux GPU Platform Enablement Intel Corporation