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

Melkaveri, Arjun arjun.melkaveri at intel.com
Tue Mar 3 14:33:58 UTC 2020


-----Original Message-----
From: Chris Wilson <chris at chris-wilson.co.uk> 
Sent: Tuesday, March 3, 2020 7:59 PM
To: Melkaveri, Arjun <arjun.melkaveri at intel.com>; igt-dev at lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH V3] [PATCH i-g-t] gem_ctx_create:Adjusted test to use __for_each_physical_engine to utilize all available engines

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

Will correct it and send patch  , saw where I have gone wrong now . 

-Arjun 


More information about the igt-dev mailing list