From: Lionel Landwerlin <lionel.g.landwerlin@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] [Intel-gfx] [PATCH i-g-t] perf: Verify rc6 works first
Date: Fri, 24 Apr 2020 13:58:30 +0300 [thread overview]
Message-ID: <3a6ef95c-6772-5965-99eb-6f088c9991b8@intel.com> (raw)
In-Reply-To: <20200424101941.4109878-1-chris@chris-wilson.co.uk>
Makes sense :
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Thanks,
-Lionel
On 24/04/2020 13:19, Chris Wilson wrote:
> We want to verify that OA disables rc6 (so that its metrics are not
> interrupted by the device sleeping), and once OA is finished, the device
> is allowed to sleep again. If rc6 is broken, the test fails since rc6
> never recovers -- but that is expected as rc6 is broken.
>
> Skip the test rather than fail for an external issue; we know rc6 is
> broken on ehl!
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> tests/perf.c | 28 ++++++++++++++++++----------
> 1 file changed, 18 insertions(+), 10 deletions(-)
>
> diff --git a/tests/perf.c b/tests/perf.c
> index b7d5e50e3..24d245496 100644
> --- a/tests/perf.c
> +++ b/tests/perf.c
> @@ -4147,27 +4147,35 @@ test_rc6_disable(void)
> .num_properties = sizeof(properties) / 16,
> .properties_ptr = to_user_pointer(properties),
> };
> - unsigned long n_events_start, n_events_end;
> - unsigned long rc6_enabled;
> + unsigned long rc6_start, rc6_end, rc6_enabled;
>
> rc6_enabled = 0;
> igt_sysfs_scanf(sysfs, "power/rc6_enable", "%lu", &rc6_enabled);
> igt_require(rc6_enabled);
>
> + /* Verify rc6 is functional by measuring residency while idle */
> + gem_quiescent_gpu(drm_fd);
> + rc6_start = rc6_residency_ms();
> + usleep(50000);
> + rc6_end = rc6_residency_ms();
> + igt_require(rc6_end != rc6_start);
> +
> + /* While OA is active, we keep rc6 disabled so we don't lose metrics */
> stream_fd = __perf_open(drm_fd, ¶m, false);
>
> - n_events_start = rc6_residency_ms();
> - nanosleep(&(struct timespec){ .tv_sec = 0, .tv_nsec = 500000000 }, NULL);
> - n_events_end = rc6_residency_ms();
> - igt_assert_eq(n_events_end - n_events_start, 0);
> + rc6_start = rc6_residency_ms();
> + usleep(50000);
> + rc6_end = rc6_residency_ms();
> + igt_assert_eq(rc6_end - rc6_start, 0);
>
> __perf_close(stream_fd);
> gem_quiescent_gpu(drm_fd);
>
> - n_events_start = rc6_residency_ms();
> - nanosleep(&(struct timespec){ .tv_sec = 1, .tv_nsec = 0 }, NULL);
> - n_events_end = rc6_residency_ms();
> - igt_assert_neq(n_events_end - n_events_start, 0);
> + /* But once OA is closed, we expect the device to sleep again */
> + rc6_start = rc6_residency_ms();
> + usleep(50000);
> + rc6_end = rc6_residency_ms();
> + igt_assert_neq(rc6_end - rc6_start, 0);
> }
>
> static void
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2020-04-24 10:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-24 10:19 [Intel-gfx] [PATCH i-g-t] perf: Verify rc6 works first Chris Wilson
2020-04-24 10:58 ` Lionel Landwerlin [this message]
2020-04-24 11:24 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2020-04-24 13:00 ` [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=3a6ef95c-6772-5965-99eb-6f088c9991b8@intel.com \
--to=lionel.g.landwerlin@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