[Intel-gfx] [PATCH i-g-t 2/2] i915/gem_ctx_thrash: Reopen the same device

Dixit, Ashutosh ashutosh.dixit at intel.com
Thu Nov 5 01:51:46 UTC 2020


On Wed, 04 Nov 2020 16:21:24 -0800, Chris Wilson wrote:
>
> Use gem_reopen_driver() to always reopen the same device without relying
> on the filtering in drm_open_driver().

Reviewed-by: Ashutosh Dixit <ashutosh.dixit at intel.com>

> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> ---
>  tests/i915/gem_ctx_thrash.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/i915/gem_ctx_thrash.c b/tests/i915/gem_ctx_thrash.c
> index d32619d5d..d9ddd6689 100644
> --- a/tests/i915/gem_ctx_thrash.c
> +++ b/tests/i915/gem_ctx_thrash.c
> @@ -250,7 +250,7 @@ static void processes(void)
>	fds = malloc(num_ctx * sizeof(int));
>	igt_assert(fds);
>	for (unsigned n = 0; n < num_ctx; n++) {
> -		fds[n] = drm_open_driver(DRIVER_INTEL);
> +		fds[n] = gem_reopen_driver(fd);
>		if (fds[n] == -1) {
>			int err = errno;
>			for (unsigned i = n; i--; )


More information about the Intel-gfx mailing list