[Intel-gfx] [PATCH i-g-t] lib/gt: Make use of dummyload library to create recursive batch
Chris Wilson
chris at chris-wilson.co.uk
Fri Jul 13 18:28:31 UTC 2018
Quoting Antonio Argenziano (2018-07-13 19:22:41)
>
>
> On 13/07/18 03:06, Chris Wilson wrote:
> > From: Antonio Argenziano <antonio.argenziano at intel.com>
> >
> > An hanging batch is nothing more than a spinning batch that never gets
> > stopped, so re-use the routines implemented in dummyload.c.
> >
> > v2: Let caller decide spin loop size
> > v3: Only use loose loops for hangs (Chris)
> > v4: No requires
> > v5: Free the spinner
> > v6: Chamelium exists.
> >
> > Signed-off-by: Antonio Argenziano <antonio.argenziano at intel.com>
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> > ---
>
> > /**
> > @@ -377,11 +329,11 @@ igt_hang_t igt_hang_ring(int fd, int ring)
> > */
> > void igt_post_hang_ring(int fd, igt_hang_t arg)
> > {
> > - if (arg.handle == 0)
> > + if (!arg.spin)
> > return;
> >
> > - gem_sync(fd, arg.handle);
> > - gem_close(fd, arg.handle);
> > + gem_sync(fd, arg.spin->handle); /* Wait until it hangs */
>
> I was expecting a poll spinner + manual reset here.
That would break some tests that are using this for hangcheck.
(Not break as such, just make them not work as intended.) More refinement
required, there's room for plenty here!
>
> > + igt_spin_batch_free(fd, arg.spin);
> >
> > context_set_ban(fd, arg.ctx, arg.ban);
> >
> > diff --git a/lib/igt_gt.h b/lib/igt_gt.h
>
> > +
> > +#define igt_list_for_each_safe(pos, tmp, head, member) \
>
> (nitpick) extra tab.
So much for just moving it to a new header :)
> > + for (pos = igt_list_first_entry(head, pos, member), \
> > + tmp = igt_list_next_entry(pos, member); \
>
> I trust you and the compiler got all the places that needed changing.
>
> Reviewed-by: Antonio Argenziano <antonio.argenziano at intel.com>
>
> Thanks for picking-up this. At my speed it would have taken years :).
The task is only just begun.
-Sisyphus
More information about the Intel-gfx
mailing list