[igt-dev] [PATCH i-g-t v2 1/1] i915_pm_rpm: gem-execbuf-stress-extra-wait faster
Chris Wilson
chris at chris-wilson.co.uk
Tue Mar 12 15:24:28 UTC 2019
Quoting Caz Yokoyama (2019-03-12 03:31:31)
> With the corresponding patch in drm-tip,
> confirm there is no additional work needed when
> GPU is in suspended state.
>
> Signed-off-by: Caz Yokoyama <caz.yokoyama at intel.com>
> ---
> lib/igt_debugfs.h | 7 +++++++
> tests/i915/i915_pm_rpm.c | 7 +++++--
> 2 files changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/lib/igt_debugfs.h b/lib/igt_debugfs.h
> index b9cf0f81..9fa38b42 100644
> --- a/lib/igt_debugfs.h
> +++ b/lib/igt_debugfs.h
> @@ -216,6 +216,13 @@ void igt_require_hpd_storm_ctl(int fd);
> DROP_FREED | \
> DROP_IDLE)
>
> +/**
> + * DROP_SUSPEND:
> + *
> + * force to suspended state.
> + */
> +#define DROP_SUSPEND 0x200
> +
> void igt_reset_fifo_underrun_reporting(int drm_fd);
>
> bool igt_drop_caches_has(int fd, uint64_t val);
> diff --git a/tests/i915/i915_pm_rpm.c b/tests/i915/i915_pm_rpm.c
> index be296f52..79528d18 100644
> --- a/tests/i915/i915_pm_rpm.c
> +++ b/tests/i915/i915_pm_rpm.c
> @@ -1338,12 +1338,15 @@ static void gem_execbuf_stress_subtest(int rounds, int wait_flags)
> for (i = 0; i < rounds; i++) {
> gem_execbuf(drm_fd, &execbuf);
>
> + igt_drop_caches_set(drm_fd, DROP_IDLE); /* clean up idle work */
> if (wait_flags & WAIT_STATUS)
> igt_assert(wait_for_suspended());
> if (wait_flags & WAIT_PC8_RES)
> igt_assert(pc8_plus_residency_changed(30));
> - if (wait_flags & WAIT_EXTRA)
> - sleep(5);
> + if (wait_flags & WAIT_EXTRA) {
> + /* force to suspend mode */
> + igt_drop_caches_set(drm_fd, DROP_SUSPEND);
> + }
Hmm, this would ostensibly be a quicker WAIT_STATUS. So the meaning of
WAIT_EXTRA (whatever that meaning was) is now tautological.
-Chris
More information about the igt-dev
mailing list