[igt-dev] [PATCH V3] [PATCH i-g-t] gem_ctx_create:Adjusted test to use __for_each_physical_engine to utilize all available engines

Chris Wilson chris at chris-wilson.co.uk
Tue Mar 3 14:28:44 UTC 2020


Quoting Arjun Melkaveri (2020-02-07 12:59:41)
> @@ -179,11 +195,22 @@ static void active(int fd, unsigned engine, int timeout, int ncpus)
>         igt_fork(child, ncpus) {
>                 struct timespec start, end;
>                 unsigned count = 0;
> +               int i915;
> +               uint32_t ctx;
> +
> +               i915 = gem_reopen_driver(fd);
> +               /*
> +                * Ensure the gpu is idle by launching
> +                * a nop execbuf and stalling for it.
> +                */
> +               gem_quiescent_gpu(i915);
> +               ctx = gem_context_create(i915);
> +               gem_context_copy_engines(fd, 0, i915, ctx);
>  
>                 clock_gettime(CLOCK_MONOTONIC, &start);
>                 do {
>                         do {
> -                               execbuf.rsvd1 = gem_context_create(fd);
> +                               execbuf.rsvd1 = ctx;
>                                 for (unsigned n = 0; n < nengine; n++) {
>                                         execbuf.flags = engines[n];
>                                         gem_execbuf(fd, &execbuf);

Ahem. The point of the test was to create a new context, not keep using
a dead context.
-Chris


More information about the igt-dev mailing list