[igt-dev] [PATCH] [PATCH i-g-t][V2]tests/i915/gem_ctx_create: Reverted device reopen logic

Chris Wilson chris at chris-wilson.co.uk
Mon Mar 23 10:53:52 UTC 2020


Quoting Arjun Melkaveri (2020-03-23 08:39:20)
> Removed gem_reopen_driver and gem_context_copy_engines
> logic from code as it is not recommended.
> No reopen after fork is needed .
> 
> V2:
> Added gem_context_copy_engines to copy engines over.
> 
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Ursulin Tvrtko <tvrtko.ursulin at intel.com>
> Signed-off-by: Arjun Melkaveri <arjun.melkaveri at intel.com>
> ---
>  tests/i915/gem_ctx_create.c | 44 +++++--------------------------------
>  1 file changed, 6 insertions(+), 38 deletions(-)
> 
> diff --git a/tests/i915/gem_ctx_create.c b/tests/i915/gem_ctx_create.c
> index 2d477226..61a25d5b 100644
> --- a/tests/i915/gem_ctx_create.c
> +++ b/tests/i915/gem_ctx_create.c
> @@ -100,11 +100,10 @@ static void files(int core, int timeout, const int ncpus)
>         igt_fork(child, ncpus) {
>                 struct timespec start, end;
>                 unsigned count = 0;
> -               int fd;
>  
>                 clock_gettime(CLOCK_MONOTONIC, &start);
>                 do {
> -                       fd = gem_reopen_driver(core);
> +                       int fd = drm_open_driver(DRIVER_INTEL);

gem_reopen_driver() is an improvement over drm_open_driver() in this
circumstance.
-Chris


More information about the igt-dev mailing list