tests/xe_compute: Don't require ccs_mode on every GT
PATCH v2 1/1 tests/xe_compute: Don't require ccs_mode on every GT
On platforms with standalone media, we expect some GTs to have CCS engines (meaning ccs_mode can be tested if there's more than one CCS), but the media GT will never have any CCS engines and will never expose ccs_mode. Move the igt_require() out of the loop so that we don't declare the whole test a skip upon encountering the media GT when the test already executed successfully on the primary GT.
v2:
- Make the same fix for the compute_kernel subtest, not just the basic subtest. (Gustavo)
- Treat get_num_cslices()'s return value as a bool rather than an integer for clarity.
--- tests/intel/xe_compute.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-)
tests/intel/xe_compute.c +12 -4
@@ -51,11 +51,13 @@ test_ccs_mode(int num_gt) {struct drm_xe_engine_class_instance *hwe;u32 gt, m, ccs_mode, vm, q, num_slices; -int fd, gt_fd; +int fd, gt_fd, num_gt_with_ccs_mode =0 ;for (gt =0 ; gt < num_gt; gt++) { -igt_require (get_num_cslices (gt, &num_slices)); +if (!get_num_cslices (gt, &num_slices)) +continue ; + num_gt_with_ccs_mode++; gt_fd =gt_sysfs_open (gt);igt_assert (igt_sysfs_printf (gt_fd,"ccs_mode" ,"%u" ,0 ) <0 );for (m =1 ; m <= num_slices; m++) {
@@ -105,6 +107,8 @@ test_ccs_mode(int num_gt)close (gt_fd); } + +igt_require (num_gt_with_ccs_mode >0 ); }/**
@@ -118,11 +122,13 @@ test_compute_kernel_with_ccs_mode(int num_gt) {struct drm_xe_engine_class_instance *hwe;u32 gt, m, num_slices; -int fd, gt_fd; +int fd, gt_fd, num_gt_with_ccs_mode =0 ;for (gt =0 ; gt < num_gt; gt++) { -igt_require (get_num_cslices (gt, &num_slices)); +if (!get_num_cslices (gt, &num_slices)) +continue ; + num_gt_with_ccs_mode++; gt_fd =gt_sysfs_open (gt);for (m =1 ; m <= num_slices; m++) {if (num_slices % m)
@@ -150,6 +156,8 @@ test_compute_kernel_with_ccs_mode(int num_gt)close (gt_fd); } + +igt_require (num_gt_with_ccs_mode >0 ); }/**
Signature · 1 line
2.43.0
Patchwork
CI✓ CI.xeBAT: success for tests/xe_compute: Don't require ccs_mode on every GT (rev2)
== Series Details ==
== Series Details ==
Series: tests/xe_compute: Don't require ccs_mode on every GT (rev2)
URL : https://patchwork.freedesktop.org/series/131523/
State : success
== Summary ==
CI Bug Log - changes from XEIGT_7786_BAT -> XEIGTPW_10936_BAT
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Participating hosts (5 -> 4)
------------------------------
Missing (1): bat-lnl-1
Known issues
------------
Here are the changes found in XEIGTPW_10936_BAT that come from known issues:
### IGT changes ###
#### Possible fixes ####
* igt@xe_evict@evict-beng-small-external:
- bat-dg2-oem2: [SKIP][1] ([Intel XE#1130]) -> [PASS][2] +13 other tests pass
[1]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7786/bat-dg2-oem2/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10936/bat-dg2-oem2/igt@[email protected]
* igt@xe_module_load@load:
- bat-dg2-oem2: [FAIL][3] ([Intel XE#1132]) -> [PASS][4]
[3]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7786/bat-dg2-oem2/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10936/bat-dg2-oem2/igt@[email protected]
#### Warnings ####
* igt@xe_evict@evict-beng-mixed-threads-small-multi-vm:
- bat-dg2-oem2: [SKIP][5] ([Intel XE#1130]) -> [TIMEOUT][6] ([Intel XE#1027] / [Intel XE#1088])
[5]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7786/bat-dg2-oem2/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10936/bat-dg2-oem2/igt@[email protected]
* igt@xe_evict@evict-beng-small:
- bat-dg2-oem2: [SKIP][7] ([Intel XE#1130]) -> [DMESG-WARN][8] ([Intel XE#1088] / [Intel XE#1373])
[7]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7786/bat-dg2-oem2/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10936/bat-dg2-oem2/igt@[email protected]
* igt@xe_evict@evict-cm-threads-small:
- bat-dg2-oem2: [SKIP][9] ([Intel XE#1130]) -> [INCOMPLETE][10] ([Intel XE#1027] / [Intel XE#804])
[9]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7786/bat-dg2-oem2/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10936/bat-dg2-oem2/igt@[email protected]
* igt@xe_evict@evict-mixed-threads-small:
- bat-dg2-oem2: [SKIP][11] ([Intel XE#1130]) -> [INCOMPLETE][12] ([Intel XE#804])
[11]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7786/bat-dg2-oem2/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10936/bat-dg2-oem2/igt@[email protected]
* igt@xe_exec_threads@threads-mixed-userptr-invalidate:
- bat-adlp-7: [INCOMPLETE][13] ([Intel XE#1044]) -> [INCOMPLETE][14] ([Intel XE#1044] / [Intel XE#1376])
[13]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7786/bat-adlp-7/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10936/bat-adlp-7/igt@[email protected]
[Intel XE#1027]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1027
[Intel XE#1044]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1044
[Intel XE#1088]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1088
[Intel XE#1130]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1130
[Intel XE#1132]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1132
[Intel XE#1373]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1373
[Intel XE#1376]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1376
[Intel XE#804]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/804
Build changes
-------------
* IGT: IGT_7786 -> IGTPW_10936
* Linux: xe-998-f9c56f1a03b5c35488671e4ffe61e28b12ffe163 -> xe-1004-07c774152cf8a034784b40978a77b5ee66e4779b
IGTPW_10936: 10936
IGT_7786: 1e4a3cd0a4bb3419fb70ed3e01259485b056dcfd @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
xe-1004-07c774152cf8a034784b40978a77b5ee66e4779b: 07c774152cf8a034784b40978a77b5ee66e4779b xe-998-f9c56f1a03b5c35488671e4ffe61e28b12ffe163: f9c56f1a03b5c35488671e4ffe61e28b12ffe163
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10936/index.html
Quoting Matt Roper (2024-03-27 20:47:59-03:00)
Quoted 13 lines
On platforms with standalone media, we expect some GTs to have CCS engines (meaning
ccs_modecan be tested if there's more than one CCS), but the media GT will never have any CCS engines and will never exposeccs_mode. Move theigt_require()out of the loop so that we don't declare the whole test a skip upon encountering the media GT when the test already executed successfully on the primary GT.v2:
- Make the same fix for thecompute_kernelsubtest, not just the basic subtest. (Gustavo)
- Treat get_num_cslices()'s return value as a bool rather than an integer for clarity.
Quoted 3 lines
Cc Niranjana Vishwanathapura <[email protected]>Cc Gustavo Sousa <[email protected]>Signed-off-by Matt Roper <[email protected]>
Quoted 61 lines
---
tests/intel/xe_compute.c| 16 ++++++++++++----1 file changed, 12 insertions(+), 4 deletions(-)tests/intel/xe_compute.c +12
-4@@ -51,11 +51,13 @@ test_ccs_mode(int num_gt) {struct drm_xe_engine_class_instance *hwe;u32 gt, m, ccs_mode, vm, q, num_slices; -int fd, gt_fd; +int fd, gt_fd, num_gt_with_ccs_mode =0 ;for (gt =0 ; gt < num_gt; gt++) { -igt_require (get_num_cslices (gt, &num_slices)); +if (!get_num_cslices (gt, &num_slices)) +continue ; + num_gt_with_ccs_mode++; gt_fd =gt_sysfs_open (gt);igt_assert (igt_sysfs_printf (gt_fd,"ccs_mode" ,"%u" ,0 ) <0 );for (m =1 ; m <= num_slices; m++) {@@ -105,6 +107,8 @@ test_ccs_mode(int num_gt)close (gt_fd); } + +igt_require (num_gt_with_ccs_mode >0 ); }/** @@ -118,11 +122,13 @@ test_compute_kernel_with_ccs_mode(int num_gt) {struct drm_xe_engine_class_instance *hwe;u32 gt, m, num_slices; -int fd, gt_fd; +int fd, gt_fd, num_gt_with_ccs_mode =0 ;for (gt =0 ; gt < num_gt; gt++) { -igt_require (get_num_cslices (gt, &num_slices)); +if (!get_num_cslices (gt, &num_slices)) +continue ; + num_gt_with_ccs_mode++; gt_fd =gt_sysfs_open (gt);for (m =1 ; m <= num_slices; m++) {if (num_slices % m)@@ -150,6 +156,8 @@ test_compute_kernel_with_ccs_mode(int num_gt)close (gt_fd); } + +igt_require (num_gt_with_ccs_mode >0 ); }/** Signature · 1 line
2.43.0