[Intel-gfx] [igt-dev] [PATCH i-g-t] i915/gem_ctx_persistence: Race context closure with replace-engines
Chris Wilson
chris at chris-wilson.co.uk
Thu Feb 13 09:51:38 UTC 2020
Quoting Tvrtko Ursulin (2020-02-13 09:07:59)
>
> On 11/02/2020 19:22, Chris Wilson wrote:
> > + igt_until_timeout(5) {
> > + igt_spin_t *spin;
> > + uint32_t ctx;
> > +
> > + ctx = gem_context_clone_with_engines(i915, 0);
> > + gem_context_set_persistence(i915, ctx, true);
> > +
> > + spin = igt_spin_new(i915, ctx, .flags = IGT_SPIN_FENCE_OUT);
> > + for (int i = 0; i < ncpus; i++)
> > + write(t[i].pipe[1], &ctx, sizeof(ctx));
>
> It's early so I hope I am not too confused, but drm client in the forked
> process is a different one. So I think it needs to use threads to be
> able to share.
It using the same fd, so the children have control over the parents ctx
(and shares the ctx id space via the fd)
-Chris
More information about the Intel-gfx
mailing list