From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Cc: igt-dev@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH i-g-t] igt/gem_fence_thrash, gem_mmap_gtt: Don't let the device sleep
Date: Thu, 23 May 2019 10:49:40 +0100 [thread overview]
Message-ID: <20190523094940.30195-1-chris@chris-wilson.co.uk> (raw)
These tests are not intended to exercise runtime pm, but the device
going to sleep in the middle of these tests can significantly slow them
down as the GTT mmapping is torn down and must be rebuilt. This can be a
major nuisance if the device autosuspends many times a second.
These tests differ from typical applications as they are not doing any
rendering or utilizing the display which would ordinarily keep the
device awake.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
tests/i915/gem_fence_thrash.c | 17 +++++++++++++++++
tests/i915/gem_mmap_gtt.c | 15 ++++++++++++++-
2 files changed, 31 insertions(+), 1 deletion(-)
diff --git a/tests/i915/gem_fence_thrash.c b/tests/i915/gem_fence_thrash.c
index 2d7fb2ff8..770e9cb98 100644
--- a/tests/i915/gem_fence_thrash.c
+++ b/tests/i915/gem_fence_thrash.c
@@ -232,10 +232,27 @@ static int run_test(int threads_per_fence, void *f, int tiling,
return 0;
}
+static int wakeref_open(int device)
+{
+ int dir, fd;
+
+ dir = igt_debugfs_dir(device);
+ fd = openat(dir, "i915_wakeref_user", O_RDONLY);
+ close(dir);
+
+ return fd;
+}
+
igt_main
{
igt_skip_on_simulation();
+ igt_fixture {
+ int fd = drm_open_driver(DRIVER_INTEL);
+ wakeref_open(fd);
+ close(fd);
+ }
+
igt_subtest("bo-write-verify-none")
igt_assert(run_test(0, bo_write_verify, I915_TILING_NONE, 80) == 0);
diff --git a/tests/i915/gem_mmap_gtt.c b/tests/i915/gem_mmap_gtt.c
index 9a670f030..4b709f81e 100644
--- a/tests/i915/gem_mmap_gtt.c
+++ b/tests/i915/gem_mmap_gtt.c
@@ -873,6 +873,17 @@ static int mmap_ioctl(int i915, struct drm_i915_gem_mmap_gtt *arg)
return err;
}
+static int wakeref_open(int device)
+{
+ int dir, fd;
+
+ dir = igt_debugfs_dir(device);
+ fd = openat(dir, "i915_wakeref_user", O_RDONLY);
+ close(dir);
+
+ return fd;
+}
+
int fd;
igt_main
@@ -880,8 +891,10 @@ igt_main
if (igt_run_in_simulation())
OBJECT_SIZE = 1 * 1024 * 1024;
- igt_fixture
+ igt_fixture {
fd = drm_open_driver(DRIVER_INTEL);
+ wakeref_open(fd);
+ }
igt_subtest("bad-object") {
uint32_t real_handle = gem_create(fd, 4096);
--
2.20.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next reply other threads:[~2019-05-23 9:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-23 9:49 Chris Wilson [this message]
2019-05-23 10:08 ` [igt-dev] [PATCH i-g-t] igt/gem_fence_thrash, gem_mmap_gtt: Don't let the device sleep Mika Kuoppala
2019-05-23 10:17 ` Chris Wilson
2019-05-23 12:05 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-05-24 11:17 ` [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=20190523094940.30195-1-chris@chris-wilson.co.uk \
--to=chris@chris-wilson.co.uk \
--cc=igt-dev@lists.freedesktop.org \
--cc=intel-gfx@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