Message ID | 20201105002124.37888-2-chris@chris-wilson.co.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [i-g-t,1/2] i915/gem_exec_whisper: Reopen existing device | expand |
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@intel.com> > Signed-off-by: Chris Wilson <chris@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--; )
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--; )
Use gem_reopen_driver() to always reopen the same device without relying on the filtering in drm_open_driver(). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> --- tests/i915/gem_ctx_thrash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)