From: Anshuman Gupta <anshuman.gupta@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: chris.p.wilson@intel.com
Subject: [igt-dev] [PATCH i-g-t 2/2] i915_pm_rpm: Add placement to gem_exec_stress
Date: Thu, 3 Mar 2022 19:36:36 +0530 [thread overview]
Message-ID: <20220303140636.26652-3-anshuman.gupta@intel.com> (raw)
In-Reply-To: <20220303140636.26652-1-anshuman.gupta@intel.com>
This add memory region placement to gem_exec_stress group of test.
gem-execbuf-stress-pc8 is odd one test as PC8 is applicable to igfx
platform. dgfx sox has its own PkgG sates therefore memory region
placement is irrelevant for gem-execbuf-stress-pc8 test.
Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
---
tests/i915/i915_pm_rpm.c | 30 ++++++++++++++++++++++--------
1 file changed, 22 insertions(+), 8 deletions(-)
diff --git a/tests/i915/i915_pm_rpm.c b/tests/i915/i915_pm_rpm.c
index 1df0ed222..cf724b2a6 100644
--- a/tests/i915/i915_pm_rpm.c
+++ b/tests/i915/i915_pm_rpm.c
@@ -47,6 +47,7 @@
#include "i915/gem.h"
#include "i915/gem_create.h"
+#include "i915/gem_memory_topology.h"
#include "igt.h"
#include "igt_kmod.h"
#include "igt_sysfs.h"
@@ -1373,7 +1374,9 @@ static void gem_execbuf_subtest(void)
/* Assuming execbuf already works, let's see what happens when we force many
* suspend/resume cycles with commands. */
-static void gem_execbuf_stress_subtest(int rounds, int wait_flags)
+static void
+gem_execbuf_stress_subtest(int rounds, int wait_flags,
+ struct drm_i915_gem_memory_class_instance *mem_regions)
{
int i;
int batch_size = 4 * sizeof(uint32_t);
@@ -1396,7 +1399,12 @@ static void gem_execbuf_stress_subtest(int rounds, int wait_flags)
disable_all_screens_and_wait(&ms_data);
- handle = gem_create(drm_fd, batch_size);
+ /* PC8 test is only applicable to igfx */
+ if (wait_flags & WAIT_PC8_RES)
+ handle = gem_create(drm_fd, batch_size);
+ else
+ handle = gem_create_in_memory_region_list(drm_fd, batch_size, mem_regions, 1);
+
gem_write(drm_fd, handle, 0, batch_buf, batch_size);
objs[0].handle = handle;
@@ -2038,8 +2046,9 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
/* Skip instead of failing in case the machine is not prepared to reach
* PC8+. We don't want bug reports from cases where the machine is just
* not properly configured. */
- igt_fixture
+ igt_fixture {
igt_require(setup_environment(false));
+ }
if (stay)
igt_subtest("stay")
@@ -2151,12 +2160,17 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
system_suspend_subtest(SUSPEND_STATE_DISK, SUSPEND_TEST_NONE);
/* GEM stress */
- igt_subtest("gem-execbuf-stress")
- gem_execbuf_stress_subtest(rounds, WAIT_STATUS);
+ igt_subtest_with_dynamic("gem-execbuf-stress") {
+ for_each_memory_region(r, drm_fd) {
+ igt_dynamic_f("%s", r->name)
+ gem_execbuf_stress_subtest(rounds, WAIT_STATUS, &r->ci);
+ igt_dynamic_f("%s-%s", "extra-wait", r->name)
+ gem_execbuf_stress_subtest(rounds, WAIT_STATUS | WAIT_EXTRA, &r->ci);
+ }
+ }
+
igt_subtest("gem-execbuf-stress-pc8")
- gem_execbuf_stress_subtest(rounds, WAIT_PC8_RES);
- igt_subtest("gem-execbuf-stress-extra-wait")
- gem_execbuf_stress_subtest(rounds, WAIT_STATUS | WAIT_EXTRA);
+ gem_execbuf_stress_subtest(rounds, WAIT_PC8_RES, 0);
/* power-wake reference tests */
igt_subtest("pm-tiling") {
--
2.26.2
next prev parent reply other threads:[~2022-03-03 14:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-03 14:06 [igt-dev] [PATCH i-g-t 0/2] Add placement to gem_exec_stress Anshuman Gupta
2022-03-03 14:06 ` [igt-dev] [PATCH i-g-t 1/2] i915/gem_eio: Exercise object creation while wedged Anshuman Gupta
2022-03-05 6:30 ` Dixit, Ashutosh
2022-03-07 8:02 ` Zbigniew Kempczyński
2022-03-08 3:18 ` Dixit, Ashutosh
2022-03-03 14:06 ` Anshuman Gupta [this message]
2022-03-03 16:18 ` [igt-dev] ✓ Fi.CI.BAT: success for Add placement to gem_exec_stress Patchwork
2022-03-04 2:24 ` [igt-dev] ✗ Fi.CI.IGT: failure " 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=20220303140636.26652-3-anshuman.gupta@intel.com \
--to=anshuman.gupta@intel.com \
--cc=chris.p.wilson@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.