All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] test/i915/gem_ringfill: Create contexts on the right FD with NEW_FD
@ 2021-07-14 11:56 Jason Ekstrand
  2021-07-14 12:09 ` Zbigniew Kempczyński
  2021-07-15 11:30 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
  0 siblings, 2 replies; 3+ messages in thread
From: Jason Ekstrand @ 2021-07-14 11:56 UTC (permalink / raw)
  To: igt-dev

We originally did the re-open dance because we were copying engines from
ctx0 on one FD to ctx0 on the other and we needed both FDs.  When we
converted to intel_ctx_t in 81e16a59d788 ("tests/i915/gem_ringfill:
Convert to intel_ctx_t"), we got the FDs wrong in the context create.
This both fixes the bug and avoids the whold FD dance.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Fixes: 81e16a59d788 ("tests/i915/gem_ringfill: Convert to intel_ctx_t")
---
 tests/i915/gem_ringfill.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/tests/i915/gem_ringfill.c b/tests/i915/gem_ringfill.c
index 5d2169d65..d32d47994 100644
--- a/tests/i915/gem_ringfill.c
+++ b/tests/i915/gem_ringfill.c
@@ -203,11 +203,8 @@ static void run_test(int fd, const intel_ctx_t *ctx, unsigned ring,
 		igt_fork(child, nchild) {
 			const intel_ctx_t *child_ctx = NULL;
 			if (flags & NEWFD) {
-				int this;
-
-				this = gem_reopen_driver(fd);
+				fd = gem_reopen_driver(fd);
 				child_ctx = intel_ctx_create(fd, &ctx->cfg);
-				fd = this;
 
 				setup_execbuf(fd, child_ctx, &execbuf, obj, reloc, ring);
 			}
-- 
2.31.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] test/i915/gem_ringfill: Create contexts on the right FD with NEW_FD
  2021-07-14 11:56 [igt-dev] [PATCH i-g-t] test/i915/gem_ringfill: Create contexts on the right FD with NEW_FD Jason Ekstrand
@ 2021-07-14 12:09 ` Zbigniew Kempczyński
  2021-07-15 11:30 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
  1 sibling, 0 replies; 3+ messages in thread
From: Zbigniew Kempczyński @ 2021-07-14 12:09 UTC (permalink / raw)
  To: Jason Ekstrand; +Cc: igt-dev

On Wed, Jul 14, 2021 at 06:56:12AM -0500, Jason Ekstrand wrote:
> We originally did the re-open dance because we were copying engines from
> ctx0 on one FD to ctx0 on the other and we needed both FDs.  When we
> converted to intel_ctx_t in 81e16a59d788 ("tests/i915/gem_ringfill:
> Convert to intel_ctx_t"), we got the FDs wrong in the context create.
> This both fixes the bug and avoids the whold FD dance.
> 
> Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
> Fixes: 81e16a59d788 ("tests/i915/gem_ringfill: Convert to intel_ctx_t")

LGTM

Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>

--
Zbigniew

> ---
>  tests/i915/gem_ringfill.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/tests/i915/gem_ringfill.c b/tests/i915/gem_ringfill.c
> index 5d2169d65..d32d47994 100644
> --- a/tests/i915/gem_ringfill.c
> +++ b/tests/i915/gem_ringfill.c
> @@ -203,11 +203,8 @@ static void run_test(int fd, const intel_ctx_t *ctx, unsigned ring,
>  		igt_fork(child, nchild) {
>  			const intel_ctx_t *child_ctx = NULL;
>  			if (flags & NEWFD) {
> -				int this;
> -
> -				this = gem_reopen_driver(fd);
> +				fd = gem_reopen_driver(fd);
>  				child_ctx = intel_ctx_create(fd, &ctx->cfg);
> -				fd = this;
>  
>  				setup_execbuf(fd, child_ctx, &execbuf, obj, reloc, ring);
>  			}
> -- 
> 2.31.1
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [igt-dev] ✗ Fi.CI.BAT: failure for test/i915/gem_ringfill: Create contexts on the right FD with NEW_FD
  2021-07-14 11:56 [igt-dev] [PATCH i-g-t] test/i915/gem_ringfill: Create contexts on the right FD with NEW_FD Jason Ekstrand
  2021-07-14 12:09 ` Zbigniew Kempczyński
@ 2021-07-15 11:30 ` Patchwork
  1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2021-07-15 11:30 UTC (permalink / raw)
  To: Jason Ekstrand; +Cc: igt-dev


[-- Attachment #1.1: Type: text/plain, Size: 257 bytes --]

== Series Details ==

Series: test/i915/gem_ringfill: Create contexts on the right FD with NEW_FD
URL   : https://patchwork.freedesktop.org/series/92524/
State : failure

== Summary ==

Series 92524 revision 1 was fully merged or fully failed: no git log



[-- Attachment #1.2: Type: text/html, Size: 725 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-15 11:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-14 11:56 [igt-dev] [PATCH i-g-t] test/i915/gem_ringfill: Create contexts on the right FD with NEW_FD Jason Ekstrand
2021-07-14 12:09 ` Zbigniew Kempczyński
2021-07-15 11:30 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.