* [igt-dev] [PATCH i-g-t v7 1/3] lib/drmtest: allow out of order device opening
2023-10-03 14:59 [igt-dev] [PATCH i-g-t v7 0/3] drmtest changes for running tests on multi-gpu Kamil Konieczny
@ 2023-10-03 14:59 ` Kamil Konieczny
2023-10-03 14:59 ` [igt-dev] [PATCH i-g-t v7 2/3] tests/intel/xe_create: extend massive subtest to multi-gpu Kamil Konieczny
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Kamil Konieczny @ 2023-10-03 14:59 UTC (permalink / raw)
To: igt-dev
Allow to open cards with filters out of order, not in
the sequence 0...N. This will fix problem found out with test
gem_exec_gttfill@multigpu-basic with three discrete GPUs:
Opened device: /dev/dri/card1
Starting subtest: multigpu-basic
<g:1> Opened device: /dev/dri/card2
gem_exec_gttfill: ../lib/drmtest.c:313: _is_already_opened: Assertion `as_idx <= _opened_fds_count' failed.
Added also some debug prints for diagnosing problems with
multi-GPU tests.
v2: fix setting opened count in _set_opened_fd()
v3: search all already opened fds in _is_already_opened()
v4: revert change in v3, this will cause treating zero as
special index (no checks) as some test depend on it
v5: start searching for driver from requested index,
limit checks for already opened drivers to currently
opened count (Kamil)
Cc: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Signed-off-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
---
lib/drmtest.c | 28 +++++++++++++++++++++++-----
1 file changed, 23 insertions(+), 5 deletions(-)
diff --git a/lib/drmtest.c b/lib/drmtest.c
index e1da66c87..43524c5ad 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -296,13 +296,18 @@ static int _opened_fds_count;
static void _set_opened_fd(int idx, int fd)
{
assert(idx < ARRAY_SIZE(_opened_fds));
- assert(idx <= _opened_fds_count);
+
+ if (idx >= _opened_fds_count) {
+ for (int i = _opened_fds_count; i < idx; ++i)
+ _opened_fds[i].fd = -1;
+ }
_opened_fds[idx].fd = fd;
assert(fstat(fd, &_opened_fds[idx].stat) == 0);
- _opened_fds_count = idx+1;
+ if (idx >= _opened_fds_count)
+ _opened_fds_count = idx + 1;
}
static bool _is_already_opened(const char *path, int as_idx)
@@ -310,16 +315,23 @@ static bool _is_already_opened(const char *path, int as_idx)
struct stat new;
assert(as_idx < ARRAY_SIZE(_opened_fds));
- assert(as_idx <= _opened_fds_count);
/*
* we cannot even stat the device, so it's of no use - let's claim it's
* already opened
*/
- if (igt_debug_on(stat(path, &new) != 0))
+ if (igt_debug_on(stat(path, &new) != 0)) {
+ igt_debug("cannot stat device: %s\n", path);
return true;
+ }
+
+ if (as_idx > _opened_fds_count)
+ as_idx = _opened_fds_count;
for (int i = 0; i < as_idx; ++i) {
+ if (_opened_fds[i].fd == -1)
+ continue;
+
/* did we cross filesystem boundary? */
assert(_opened_fds[i].stat.st_dev == new.st_dev);
@@ -338,6 +350,7 @@ static int __search_and_open(const char *base, int offset, unsigned int chipset,
if (forced)
igt_debug("Force option used: Using driver %s\n", forced);
+ offset += as_idx;
for (int i = 0; i < 16; i++) {
char name[80];
int fd;
@@ -484,6 +497,7 @@ int __drm_open_driver_another(int idx, int chipset)
{
int fd = -1;
+ igt_debug("card idx: %d chipset: %d\n", idx, chipset);
if (chipset != DRIVER_VGEM && igt_device_filter_count() > idx) {
struct igt_device_card card;
bool found;
@@ -491,6 +505,7 @@ int __drm_open_driver_another(int idx, int chipset)
found = __get_card_for_nth_filter(idx, &card);
if (!found) {
+ igt_debug("cannot find card idx: %d, loading module\n", idx);
drm_load_module(chipset);
found = __get_card_for_nth_filter(idx, &card);
}
@@ -500,11 +515,14 @@ int __drm_open_driver_another(int idx, int chipset)
igt_device_filter_get(idx));
else if (_is_already_opened(card.card, idx))
igt_warn("card maching filter %d is already opened\n", idx);
- else
+ else {
+ igt_debug("card idx: %d found: %s\n", idx, card.card);
fd = __open_driver_exact(card.card, chipset);
+ }
} else {
/* no filter for device idx, let's open whatever is available */
+ igt_debug("No filter for device idx: %d\n", idx);
fd = __open_driver("/dev/dri/card", 0, chipset, idx);
}
--
2.42.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* [igt-dev] [PATCH i-g-t v7 2/3] tests/intel/xe_create: extend massive subtest to multi-gpu
2023-10-03 14:59 [igt-dev] [PATCH i-g-t v7 0/3] drmtest changes for running tests on multi-gpu Kamil Konieczny
2023-10-03 14:59 ` [igt-dev] [PATCH i-g-t v7 1/3] lib/drmtest: allow out of order device opening Kamil Konieczny
@ 2023-10-03 14:59 ` Kamil Konieczny
2023-10-03 14:59 ` [igt-dev] [PATCH i-g-t v7 3/3] lib/drmtest: drop checks for opened device for filters Kamil Konieczny
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Kamil Konieczny @ 2023-10-03 14:59 UTC (permalink / raw)
To: igt-dev
Sample code extends existing create-massive-size subtest to run
on multi-GPUs boards. This will currently work only with
--drivers or IGT_DRIVERS options selecting at least two dGPU
cards.
v2: Fixed bug in opening wrong multi-gpu device (Zbigniew)
v3: revert to use filter count, add require for xe, change
subtest description
v4: correct description
Cc: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Signed-off-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
---
tests/intel/xe_create.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/tests/intel/xe_create.c b/tests/intel/xe_create.c
index 8d845e5c8..ee970450f 100644
--- a/tests/intel/xe_create.c
+++ b/tests/intel/xe_create.c
@@ -12,6 +12,7 @@
#include <string.h>
#include "igt.h"
+#include "igt_device_scan.h"
#include "xe_drm.h"
#include "xe/xe_ioctl.h"
#include "xe/xe_query.h"
@@ -191,6 +192,13 @@ static void create_execqueues(int fd, enum exec_queue_destroy ed)
* Test category: functionality test
* Description: Verifies xe bo create returns expected error code on massive
* buffer sizes.
+ *
+ * SUBTEST: multigpu-create-massive-size
+ * Functionality: ioctl
+ * Test category: functionality test
+ * Feature: multigpu
+ * Description: Verifies xe bo create with massive buffer sizes runs correctly
+ * on two or more GPUs.
*/
static void create_massive_size(int fd)
{
@@ -228,6 +236,23 @@ igt_main
create_massive_size(xe);
}
+ igt_subtest("multigpu-create-massive-size") {
+ int gpu_filter_count = igt_device_filter_count();
+
+ igt_require(xe > 0);
+ igt_require(gpu_filter_count >= 2);
+ igt_multi_fork(child, gpu_filter_count) {
+ int gpu_fd;
+
+ gpu_fd = child ? __drm_open_driver_another(child, DRIVER_XE) : drm_reopen_driver(xe);
+ igt_assert_f(gpu_fd > 0, "cannot open gpu-%d, errno=%d\n", child, errno);
+
+ create_massive_size(gpu_fd);
+ drm_close_driver(gpu_fd);
+ }
+ igt_waitchildren();
+ }
+
igt_fixture
drm_close_driver(xe);
}
--
2.42.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* [igt-dev] [PATCH i-g-t v7 3/3] lib/drmtest: drop checks for opened device for filters
2023-10-03 14:59 [igt-dev] [PATCH i-g-t v7 0/3] drmtest changes for running tests on multi-gpu Kamil Konieczny
2023-10-03 14:59 ` [igt-dev] [PATCH i-g-t v7 1/3] lib/drmtest: allow out of order device opening Kamil Konieczny
2023-10-03 14:59 ` [igt-dev] [PATCH i-g-t v7 2/3] tests/intel/xe_create: extend massive subtest to multi-gpu Kamil Konieczny
@ 2023-10-03 14:59 ` Kamil Konieczny
2023-10-03 16:02 ` [igt-dev] ✗ Fi.CI.BAT: failure for drmtest changes for running tests on multi-gpu (rev6) Patchwork
2023-10-03 16:12 ` [igt-dev] ✓ CI.xeBAT: success " Patchwork
4 siblings, 0 replies; 6+ messages in thread
From: Kamil Konieczny @ 2023-10-03 14:59 UTC (permalink / raw)
To: igt-dev
When using filters honor user choice and don't restrict opens
to non-opened devices. This will allow a user to test some
multiGPU tests with repeated filter for card zero:
--device=pci:vendor=Intel,device=discrete,card=0\;pci:vendor=Intel,device=discrete,card=0
If the user want it just allow this. Also while at this, move
debug print into filter loop as there is already one for
non-filter.
Cc: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Petri Latvala <adrinael@adrinael.net>
Cc: Arkadiusz Hiler <arek@hiler.eu>
Signed-off-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
---
lib/drmtest.c | 20 +++++++++-----------
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/lib/drmtest.c b/lib/drmtest.c
index 43524c5ad..dbfa0282d 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -454,8 +454,8 @@ static bool __get_card_for_nth_filter(int idx, struct igt_device_card *card)
* * device scanning is executed,
* * idx-th filter (starting with 0, filters are semicolon separated) is used
* * if there is no idx-th filter, goto 2
- * * first device maching the filter is selected
- * * if it's already opened (for indexes = 0..idx-1) we fail with -1
+ * * device maching the requested filter is selected
+ * * if it's not matched we fail with -1
* * otherwise open the device and return the fd
*
* 2. compatibility mode - open the first DRM device we can find that is not
@@ -497,11 +497,11 @@ int __drm_open_driver_another(int idx, int chipset)
{
int fd = -1;
- igt_debug("card idx: %d chipset: %d\n", idx, chipset);
if (chipset != DRIVER_VGEM && igt_device_filter_count() > idx) {
struct igt_device_card card;
bool found;
+ igt_debug("card idx: %d chipset: %d\n", idx, chipset);
found = __get_card_for_nth_filter(idx, &card);
if (!found) {
@@ -510,16 +510,14 @@ int __drm_open_driver_another(int idx, int chipset)
found = __get_card_for_nth_filter(idx, &card);
}
- if (!found || !strlen(card.card))
- igt_warn("No card matches the filter! [%s]\n",
- igt_device_filter_get(idx));
- else if (_is_already_opened(card.card, idx))
- igt_warn("card maching filter %d is already opened\n", idx);
- else {
- igt_debug("card idx: %d found: %s\n", idx, card.card);
+ if (!found || !strlen(card.card)) {
+ igt_warn("No card matches the filter! [%s]%s\n",
+ igt_device_filter_get(idx),
+ found && !strlen(card.card) ? " (card empty)" : "");
+ } else {
+ igt_debug("card %d found: [%s]\n", idx, card.card);
fd = __open_driver_exact(card.card, chipset);
}
-
} else {
/* no filter for device idx, let's open whatever is available */
igt_debug("No filter for device idx: %d\n", idx);
--
2.42.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* [igt-dev] ✗ Fi.CI.BAT: failure for drmtest changes for running tests on multi-gpu (rev6)
2023-10-03 14:59 [igt-dev] [PATCH i-g-t v7 0/3] drmtest changes for running tests on multi-gpu Kamil Konieczny
` (2 preceding siblings ...)
2023-10-03 14:59 ` [igt-dev] [PATCH i-g-t v7 3/3] lib/drmtest: drop checks for opened device for filters Kamil Konieczny
@ 2023-10-03 16:02 ` Patchwork
2023-10-03 16:12 ` [igt-dev] ✓ CI.xeBAT: success " Patchwork
4 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2023-10-03 16:02 UTC (permalink / raw)
To: Kamil Konieczny; +Cc: igt-dev
[-- Attachment #1: Type: text/plain, Size: 4934 bytes --]
== Series Details ==
Series: drmtest changes for running tests on multi-gpu (rev6)
URL : https://patchwork.freedesktop.org/series/123991/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_13705 -> IGTPW_9911
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with IGTPW_9911 absolutely need to be
verified manually.
If you think the reported changes have nothing to do with the changes
introduced in IGTPW_9911, please notify your bug team (lgci.bug.filing@intel.com) to allow them
to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9911/index.html
Participating hosts (39 -> 40)
------------------------------
Additional (2): fi-kbl-soraka fi-pnv-d510
Missing (1): fi-snb-2520m
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_9911:
### IGT changes ###
#### Possible regressions ####
* igt@i915_selftest@live@hangcheck:
- fi-skl-guc: [PASS][1] -> [DMESG-FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13705/fi-skl-guc/igt@i915_selftest@live@hangcheck.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9911/fi-skl-guc/igt@i915_selftest@live@hangcheck.html
Known issues
------------
Here are the changes found in IGTPW_9911 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_suspend@basic-s0@smem:
- bat-dg2-9: [PASS][3] -> [INCOMPLETE][4] ([i915#9275])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13705/bat-dg2-9/igt@gem_exec_suspend@basic-s0@smem.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9911/bat-dg2-9/igt@gem_exec_suspend@basic-s0@smem.html
* igt@gem_huc_copy@huc-copy:
- fi-kbl-soraka: NOTRUN -> [SKIP][5] ([fdo#109271] / [i915#2190])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9911/fi-kbl-soraka/igt@gem_huc_copy@huc-copy.html
* igt@gem_lmem_swapping@basic:
- fi-kbl-soraka: NOTRUN -> [SKIP][6] ([fdo#109271] / [i915#4613]) +3 other tests skip
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9911/fi-kbl-soraka/igt@gem_lmem_swapping@basic.html
* igt@i915_selftest@live@gt_pm:
- fi-kbl-soraka: NOTRUN -> [DMESG-FAIL][7] ([i915#1886] / [i915#7913])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9911/fi-kbl-soraka/igt@i915_selftest@live@gt_pm.html
* igt@kms_dsc@dsc-basic:
- fi-kbl-soraka: NOTRUN -> [SKIP][8] ([fdo#109271]) +9 other tests skip
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9911/fi-kbl-soraka/igt@kms_dsc@dsc-basic.html
* igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence:
- bat-dg2-11: NOTRUN -> [SKIP][9] ([i915#1845]) +3 other tests skip
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9911/bat-dg2-11/igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence.html
* igt@kms_psr@primary_page_flip:
- fi-pnv-d510: NOTRUN -> [SKIP][10] ([fdo#109271]) +31 other tests skip
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9911/fi-pnv-d510/igt@kms_psr@primary_page_flip.html
#### Possible fixes ####
* igt@kms_pipe_crc_basic@read-crc-frame-sequence@pipe-d-edp-1:
- bat-rplp-1: [ABORT][11] ([i915#8668]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13705/bat-rplp-1/igt@kms_pipe_crc_basic@read-crc-frame-sequence@pipe-d-edp-1.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9911/bat-rplp-1/igt@kms_pipe_crc_basic@read-crc-frame-sequence@pipe-d-edp-1.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#1886]: https://gitlab.freedesktop.org/drm/intel/issues/1886
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913
[i915#8668]: https://gitlab.freedesktop.org/drm/intel/issues/8668
[i915#9275]: https://gitlab.freedesktop.org/drm/intel/issues/9275
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_7510 -> IGTPW_9911
CI-20190529: 20190529
CI_DRM_13705: c7379e9ad81bca56e268003928cd81a04c3b10d0 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_9911: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9911/index.html
IGT_7510: a4b4a33d8312e4e30ca23d26bbd1758e56540e1d @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Testlist changes
----------------
+igt@xe_create@multigpu-create-massive-size
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9911/index.html
[-- Attachment #2: Type: text/html, Size: 5961 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread* [igt-dev] ✓ CI.xeBAT: success for drmtest changes for running tests on multi-gpu (rev6)
2023-10-03 14:59 [igt-dev] [PATCH i-g-t v7 0/3] drmtest changes for running tests on multi-gpu Kamil Konieczny
` (3 preceding siblings ...)
2023-10-03 16:02 ` [igt-dev] ✗ Fi.CI.BAT: failure for drmtest changes for running tests on multi-gpu (rev6) Patchwork
@ 2023-10-03 16:12 ` Patchwork
4 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2023-10-03 16:12 UTC (permalink / raw)
To: Kamil Konieczny; +Cc: igt-dev
[-- Attachment #1: Type: text/plain, Size: 2257 bytes --]
== Series Details ==
Series: drmtest changes for running tests on multi-gpu (rev6)
URL : https://patchwork.freedesktop.org/series/123991/
State : success
== Summary ==
CI Bug Log - changes from XEIGT_7510_BAT -> XEIGTPW_9911_BAT
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Participating hosts (4 -> 4)
------------------------------
No changes in participating hosts
Known issues
------------
Here are the changes found in XEIGTPW_9911_BAT that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@xe_exec_store@basic-store:
- bat-adlp-7: [PASS][1] -> [FAIL][2] ([Intel XE#761])
[1]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7510/bat-adlp-7/igt@xe_exec_store@basic-store.html
[2]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_9911/bat-adlp-7/igt@xe_exec_store@basic-store.html
* igt@xe_live_ktest@bo:
- bat-dg2-oem2: [PASS][3] -> [INCOMPLETE][4] ([Intel XE#695])
[3]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7510/bat-dg2-oem2/igt@xe_live_ktest@bo.html
[4]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_9911/bat-dg2-oem2/igt@xe_live_ktest@bo.html
#### Possible fixes ####
* igt@kms_flip@basic-flip-vs-wf_vblank@d-edp1:
- bat-adlp-7: [FAIL][5] ([Intel XE#480]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7510/bat-adlp-7/igt@kms_flip@basic-flip-vs-wf_vblank@d-edp1.html
[6]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_9911/bat-adlp-7/igt@kms_flip@basic-flip-vs-wf_vblank@d-edp1.html
[Intel XE#480]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/480
[Intel XE#695]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/695
[Intel XE#761]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/761
Build changes
-------------
* IGT: IGT_7510 -> IGTPW_9911
IGTPW_9911: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9911/index.html
IGT_7510: a4b4a33d8312e4e30ca23d26bbd1758e56540e1d @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
xe-410-02ab43e36623665d8644d46162bd4ec5eeb68489: 02ab43e36623665d8644d46162bd4ec5eeb68489
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_9911/index.html
[-- Attachment #2: Type: text/html, Size: 2877 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread