From: Kamil Konieczny <kamil.konieczny@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 3/3] i915/gem_exec_gttfill: fix multigpu subtest
Date: Tue, 14 Feb 2023 20:28:30 +0100 [thread overview]
Message-ID: <20230214192830.51997-4-kamil.konieczny@linux.intel.com> (raw)
In-Reply-To: <20230214192830.51997-1-kamil.konieczny@linux.intel.com>
Fix multigpu subtest and open cards in order, starting
from first one.
Signed-off-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
---
tests/i915/gem_exec_gttfill.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/tests/i915/gem_exec_gttfill.c b/tests/i915/gem_exec_gttfill.c
index 137277fe..c310a981 100644
--- a/tests/i915/gem_exec_gttfill.c
+++ b/tests/i915/gem_exec_gttfill.c
@@ -266,11 +266,23 @@ igt_main
}
igt_subtest("multigpu-basic") { /* run on two or more discrete cards */
+#define MAX_GPU 16
+ int fds[MAX_GPU];
+
igt_require(gpu_count > 1);
+ igt_require(gpu_count <= MAX_GPU);
+ for (int i = 0; i < gpu_count; i++) {
+ int n_fd;
+
+ n_fd = i ? __drm_open_driver_another(i, DRIVER_INTEL) : gem_reopen_driver(i915);
+ igt_assert(n_fd >= 0);
+ fds[i] = n_fd;
+ }
+
igt_multi_fork(child, gpu_count) {
int g_fd;
// prepare
- g_fd = __drm_open_driver_another(child, DRIVER_INTEL);
+ g_fd = gem_reopen_driver(fds[child]);
igt_assert(g_fd >= 0);
ctx = intel_ctx_create_all_physical(g_fd);
igt_fork_hang_detector(g_fd);
--
2.37.2
next prev parent reply other threads:[~2023-02-14 19:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-14 19:28 [igt-dev] [PATCH i-g-t 0/3] Fix multi-gpu subtests and open all cards consecutivly Kamil Konieczny
2023-02-14 19:28 ` [igt-dev] [PATCH i-g-t 1/3] tests/i915/gem_basic: fix multigpu subtest Kamil Konieczny
2023-02-14 19:28 ` [igt-dev] [PATCH i-g-t 2/3] tests/i915/gem_close_race: fix multi-gpu subtests Kamil Konieczny
2023-02-14 19:28 ` Kamil Konieczny [this message]
2023-02-14 20:23 ` [igt-dev] ✓ Fi.CI.BAT: success for Fix multi-gpu subtests and open all cards consecutivly Patchwork
2023-02-15 5:16 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230214192830.51997-4-kamil.konieczny@linux.intel.com \
--to=kamil.konieczny@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox