From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] igt/gem_fence_thrash, gem_mmap_gtt: Don't let the device sleep
Date: Thu, 23 May 2019 13:08:43 +0300 [thread overview]
Message-ID: <87mujdfpp0.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20190523094940.30195-1-chris@chris-wilson.co.uk>
Chris Wilson <chris@chris-wilson.co.uk> writes:
> 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);
I was seeking the corresponding debugfs entry. However
it seems forcewake user takes the pm ref and you want to piggyback on
that.
also igt_assert(fd != -1) ?
-Mika
> + 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
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-05-23 10:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-23 9:49 [Intel-gfx] [PATCH i-g-t] igt/gem_fence_thrash, gem_mmap_gtt: Don't let the device sleep Chris Wilson
2019-05-23 10:08 ` Mika Kuoppala [this message]
2019-05-23 10:17 ` [igt-dev] " 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=87mujdfpp0.fsf@gaia.fi.intel.com \
--to=mika.kuoppala@linux.intel.com \
--cc=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