[Intel-gfx] [PATCH i-g-t] igt/gem_fence_thrash, gem_mmap_gtt: Don't let the device sleep
Chris Wilson
chris at chris-wilson.co.uk
Thu May 23 10:17:46 UTC 2019
Quoting Mika Kuoppala (2019-05-23 11:08:43)
> Chris Wilson <chris at 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 at 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.
It's outright cheating. But it's much simpler than the patches to add an
autosuspend timeout for ggtt access. And should help show if this is the
problem.
-Chris
More information about the Intel-gfx
mailing list