From: Anshuman Gupta <anshuman.gupta@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: petri.latvala@intel.com, Chris Wilson <chris.p.wilson@intel.com>,
badal.nilawar@intel.com, rodrigo.vivi@intel.com
Subject: [igt-dev] [PATCH i-g-t v5 1/9] test/i915_pm_rpm: Add placement to gem-{mmap-type, execbuf}
Date: Fri, 6 May 2022 21:15:45 +0530 [thread overview]
Message-ID: <20220506154553.6146-2-anshuman.gupta@intel.com> (raw)
In-Reply-To: <20220506154553.6146-1-anshuman.gupta@intel.com>
Add memory region placement to gem-{mmap-type, execbuf} subtest.
This will be useful to extend these sub-test for D3Cold.
Cc: Chris Wilson <chris.p.wilson@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
tests/i915/i915_pm_rpm.c | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/tests/i915/i915_pm_rpm.c b/tests/i915/i915_pm_rpm.c
index 461730e8a..d2bce5826 100644
--- a/tests/i915/i915_pm_rpm.c
+++ b/tests/i915/i915_pm_rpm.c
@@ -1069,7 +1069,8 @@ static void debugfs_forcewake_user_subtest(void)
igt_assert(wait_for_suspended());
}
-static void gem_mmap_args(const struct mmap_offset *t)
+static void gem_mmap_args(const struct mmap_offset *t,
+ struct drm_i915_gem_memory_class_instance *mem_regions)
{
int i;
uint32_t handle;
@@ -1079,7 +1080,7 @@ static void gem_mmap_args(const struct mmap_offset *t)
/* Create, map and set data while the device is active. */
enable_one_screen_and_wait(&ms_data);
- handle = gem_create(drm_fd, buf_size);
+ handle = gem_create_in_memory_region_list(drm_fd, buf_size, mem_regions, 1);
gem_buf = __gem_mmap_offset(drm_fd, handle, 0, buf_size,
PROT_READ | PROT_WRITE, t->type);
@@ -1290,7 +1291,7 @@ static void submit_blt_cmd(uint32_t dst_handle, int dst_size,
}
/* Make sure we can submit a batch buffer and verify its result. */
-static void gem_execbuf_subtest(void)
+static void gem_execbuf_subtest(struct drm_i915_gem_memory_class_instance *mem_regions)
{
int x, y;
uint32_t handle;
@@ -1308,7 +1309,7 @@ static void gem_execbuf_subtest(void)
/* Create and set data while the device is active. */
enable_one_screen_and_wait(&ms_data);
- handle = gem_create(drm_fd, dst_size);
+ handle = gem_create_in_memory_region_list(drm_fd, dst_size, mem_regions, 1);
cpu_buf = malloc(dst_size);
igt_assert(cpu_buf);
@@ -2083,15 +2084,21 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
/* GEM */
igt_subtest_with_dynamic("gem-mmap-type") {
for_each_mmap_offset_type(drm_fd, t) {
- igt_dynamic_f("%s", t->name)
- gem_mmap_args(t);
+ for_each_memory_region(r, drm_fd) {
+ igt_dynamic_f("%s-%s", t->name, r->name)
+ gem_mmap_args(t, &r->ci);
+ }
}
}
igt_subtest("gem-pread")
gem_pread_subtest();
- igt_subtest("gem-execbuf")
- gem_execbuf_subtest();
+ igt_subtest_with_dynamic("gem-execbuf") {
+ for_each_memory_region(r, drm_fd) {
+ igt_dynamic_f("%s", r->name)
+ gem_execbuf_subtest(&r->ci);
+ }
+ }
igt_subtest("gem-idle")
gem_idle_subtest();
igt_subtest("gem-evict-pwrite") {
--
2.26.2
next prev parent reply other threads:[~2022-05-06 15:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-06 15:45 [igt-dev] [PATCH i-g-t v5 0/9] D3Cold Tool & IGT Anshuman Gupta
2022-05-06 15:45 ` Anshuman Gupta [this message]
2022-05-06 15:45 ` [igt-dev] [PATCH i-g-t v5 2/9] lib/igt_device: Get gfx PCI card root port Anshuman Gupta
2022-05-06 15:45 ` [igt-dev] [PATCH i-g-t v5 3/9] lib/igt_pm: D3Cold runtime pm infrastructure Anshuman Gupta
2022-05-09 8:42 ` Rodrigo Vivi
2022-05-09 16:50 ` Gupta, Anshuman
2022-05-06 15:45 ` [igt-dev] [PATCH i-g-t v5 4/9] tools: Add intel_pm_rpm tool Anshuman Gupta
2022-05-06 15:45 ` [igt-dev] [PATCH i-g-t v5 5/9] tools/intel_pm_rpm: Add an option to setup d3cold Anshuman Gupta
2022-05-09 8:45 ` Rodrigo Vivi
2022-05-06 15:45 ` [igt-dev] [PATCH i-g-t v5 6/9] i915_pm_rpm: Add D3Cold basic subtest Anshuman Gupta
2022-05-06 15:45 ` [igt-dev] [PATCH i-g-t v5 7/9] i915_pm_rpm: Extend gem_exec_stress test with D3Cold Anshuman Gupta
2022-05-06 15:45 ` [igt-dev] [PATCH i-g-t v5 8/9] i915_pm_rpm: Extend gem_execbuf " Anshuman Gupta
2022-05-06 15:45 ` [igt-dev] [PATCH i-g-t v5 9/9] i915_pm_rpm: Extend gem-mmap-type " Anshuman Gupta
2022-05-06 16:26 ` [igt-dev] ✓ Fi.CI.BAT: success for D3Cold Tool & IGT (rev5) Patchwork
2022-05-06 18:57 ` [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=20220506154553.6146-2-anshuman.gupta@intel.com \
--to=anshuman.gupta@intel.com \
--cc=badal.nilawar@intel.com \
--cc=chris.p.wilson@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=petri.latvala@intel.com \
--cc=rodrigo.vivi@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