From: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
To: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t 6/7] tests/i915/gem_exec_gttfill: add new subtest multigpu-basic
Date: Mon, 5 Dec 2022 07:28:46 +0100 [thread overview]
Message-ID: <20221205072846.1756189a@maurocar-mobl2> (raw)
In-Reply-To: <20221202205705.58879-7-kamil.konieczny@linux.intel.com>
On Fri, 2 Dec 2022 21:57:04 +0100
Kamil Konieczny <kamil.konieczny@linux.intel.com> wrote:
> Add new subtest multigpu-basic to be run on two or more GPU cards
> simultanosly. For this to work test should be run with --device
> option, for example with:
> --device=pci:vendor=Intel,device=discrete,card=0\;pci:vendor=Intel,device=discrete,card=1
> or
> --device=pci:vendor=Intel,device=discrete,card=all
>
> Signed-off-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
> ---
> tests/i915/gem_exec_gttfill.c | 32 ++++++++++++++++++++++++++++++--
> 1 file changed, 30 insertions(+), 2 deletions(-)
>
> diff --git a/tests/i915/gem_exec_gttfill.c b/tests/i915/gem_exec_gttfill.c
> index f9f244d6..5be8428d 100644
> --- a/tests/i915/gem_exec_gttfill.c
> +++ b/tests/i915/gem_exec_gttfill.c
> @@ -24,6 +24,7 @@
> #include "i915/gem.h"
> #include "i915/gem_create.h"
> #include "igt.h"
> +#include "igt_device_scan.h"
> #include "igt_rand.h"
>
> IGT_TEST_DESCRIPTION("Fill the GTT with batches.");
> @@ -226,7 +227,7 @@ igt_main
> {
> const struct intel_execution_engine2 *e;
> const intel_ctx_t *ctx;
> - int i915 = -1;
> + int i915 = -1, gpu_count;
>
> igt_fixture {
> i915 = drm_open_driver(DRIVER_INTEL);
> @@ -258,9 +259,36 @@ igt_main
> fillgtt(i915, ctx, ALL_ENGINES, 20);
>
> igt_fixture {
> - intel_allocator_multiprocess_stop();
> igt_stop_hang_detector();
> intel_ctx_destroy(i915, ctx);
> + // prepare multigpu tests
> + gpu_count = igt_device_filter_count();
> + if (gpu_count < 2)
> + gpu_count = 1;
Same command as on patch 5/7: there's no need to add this check...
> + }
> +
> + igt_subtest("multigpu-basic") { /* run on two or more discrete cards */
> + igt_require(gpu_count > 1);
As you're already asserting it here.
> + igt_multi_fork(child, gpu_count) {
> + int g_fd;
> + // prepare
> + g_fd = __drm_open_driver_another(child, DRIVER_INTEL);
> + igt_assert(g_fd >= 0);
> + ctx = intel_ctx_create_all_physical(g_fd);
> + igt_fork_hang_detector(g_fd);
> + // subtest
> + fillgtt(g_fd, ctx, ALL_ENGINES, 1);
> + // release resources
> + igt_stop_hang_detector();
> + intel_ctx_destroy(g_fd, ctx);
> + close(g_fd);
> + }
> +
> + igt_waitchildren();
> + }
> +
> + igt_fixture {
> + intel_allocator_multiprocess_stop();
> close(i915);
> }
> }
After addressing it:
Reviewed-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Regards,
Mauro
next prev parent reply other threads:[~2022-12-05 6:28 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20221202205705.58879-1-kamil.konieczny@linux.intel.com>
2022-12-02 20:57 ` [igt-dev] [PATCH i-g-t 2/7] lib/igt_core: store GPU string or opened device name Kamil Konieczny
2022-12-07 10:32 ` Petri Latvala
2022-12-02 20:57 ` [igt-dev] [PATCH i-g-t 3/7] lib/igt_core: add prefix to logging Kamil Konieczny
2022-12-05 6:12 ` Mauro Carvalho Chehab
2022-12-02 20:57 ` [igt-dev] [PATCH i-g-t 4/7] lib/tests/igt_fork: add tests for igt_multi_fork Kamil Konieczny
2022-12-05 6:15 ` Mauro Carvalho Chehab
2022-12-02 20:57 ` [igt-dev] [PATCH i-g-t 6/7] tests/i915/gem_exec_gttfill: add new subtest multigpu-basic Kamil Konieczny
2022-12-05 6:28 ` Mauro Carvalho Chehab [this message]
2022-12-02 20:57 ` [igt-dev] [PATCH i-g-t 7/7] tests/i915/gem_close_race: add multiGPU subtests Kamil Konieczny
2022-12-05 6:30 ` Mauro Carvalho Chehab
2022-12-02 21:38 ` [igt-dev] ✗ Fi.CI.BAT: failure for Add few multi-GPU subtests with the help of igt_multi_fork macro Patchwork
2022-12-05 14:33 ` Kamil Konieczny
[not found] ` <20221202205705.58879-6-kamil.konieczny@linux.intel.com>
2022-12-05 6:10 ` [igt-dev] [PATCH i-g-t 5/7] tests/i915/gem_basic: add multigpu-create-close subtest Mauro Carvalho Chehab
[not found] ` <20221202205705.58879-2-kamil.konieczny@linux.intel.com>
2022-12-05 6:32 ` [igt-dev] [PATCH i-g-t 1/7] lib/igt_core: add igt_multi_fork for parallel tests Mauro Carvalho Chehab
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=20221205072846.1756189a@maurocar-mobl2 \
--to=mauro.chehab@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kamil.konieczny@linux.intel.com \
/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