* [Intel-gfx] [PATCH i-g-t] i915/gem_exec_fence: Use default-context for syncobj-timeline-wait
@ 2020-08-07 8:45 Chris Wilson
2020-08-07 9:00 ` Lionel Landwerlin
0 siblings, 1 reply; 3+ messages in thread
From: Chris Wilson @ 2020-08-07 8:45 UTC (permalink / raw)
To: intel-gfx; +Cc: igt-dev, Chris Wilson
syncobj-timeline-wait is only exercising waits on the syncobj along a
single timeline, for which it can use the universally available default
context, and so not try and fail to create a HW context on very old
platforms.
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2308
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
---
tests/i915/gem_exec_fence.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/tests/i915/gem_exec_fence.c b/tests/i915/gem_exec_fence.c
index c9b95fe64..b240c30bf 100644
--- a/tests/i915/gem_exec_fence.c
+++ b/tests/i915/gem_exec_fence.c
@@ -1970,7 +1970,6 @@ static void test_syncobj_timeline_wait(int fd)
MI_BATCH_BUFFER_END,
MI_NOOP,
};
- uint32_t gem_context = gem_context_clone_with_engines(fd, 0);
struct drm_i915_gem_exec_object2 obj;
struct drm_i915_gem_execbuffer2 execbuf;
struct drm_i915_gem_execbuffer_ext_timeline_fences timeline_fences;
@@ -1988,7 +1987,7 @@ static void test_syncobj_timeline_wait(int fd)
gem_quiescent_gpu(fd);
- spin = igt_spin_new(fd, .ctx = gem_context, .engine = ALL_ENGINES);
+ spin = igt_spin_new(fd, .engine = ALL_ENGINES);
memset(&timeline_fences, 0, sizeof(timeline_fences));
timeline_fences.base.name = DRM_I915_GEM_EXECBUFFER_EXT_TIMELINE_FENCES;
@@ -2000,7 +1999,6 @@ static void test_syncobj_timeline_wait(int fd)
execbuf.buffers_ptr = to_user_pointer(&obj);
execbuf.buffer_count = 1;
execbuf.batch_len = sizeof(bbe);
- execbuf.rsvd1 = gem_context;
memset(&obj, 0, sizeof(obj));
obj.handle = gem_create(fd, 4096);
@@ -2055,8 +2053,6 @@ static void test_syncobj_timeline_wait(int fd)
gem_sync(fd, handle[i]);
gem_close(fd, handle[i]);
}
-
- gem_context_destroy(fd, gem_context);
}
static const char *test_syncobj_timeline_export_desc =
--
2.28.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Intel-gfx] [PATCH i-g-t] i915/gem_exec_fence: Use default-context for syncobj-timeline-wait
2020-08-07 8:45 [Intel-gfx] [PATCH i-g-t] i915/gem_exec_fence: Use default-context for syncobj-timeline-wait Chris Wilson
@ 2020-08-07 9:00 ` Lionel Landwerlin
2020-08-07 9:11 ` [Intel-gfx] [igt-dev] " Chris Wilson
0 siblings, 1 reply; 3+ messages in thread
From: Lionel Landwerlin @ 2020-08-07 9:00 UTC (permalink / raw)
To: Chris Wilson, intel-gfx; +Cc: igt-dev
On 07/08/2020 11:45, Chris Wilson wrote:
> syncobj-timeline-wait is only exercising waits on the syncobj along a
> single timeline, for which it can use the universally available default
> context, and so not try and fail to create a HW context on very old
> platforms.
>
> Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2308
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Hm... I thought maybe we didn't get all the engines on the default context.
If that's not the case :
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Thanks!
-Lionel
> ---
> tests/i915/gem_exec_fence.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/tests/i915/gem_exec_fence.c b/tests/i915/gem_exec_fence.c
> index c9b95fe64..b240c30bf 100644
> --- a/tests/i915/gem_exec_fence.c
> +++ b/tests/i915/gem_exec_fence.c
> @@ -1970,7 +1970,6 @@ static void test_syncobj_timeline_wait(int fd)
> MI_BATCH_BUFFER_END,
> MI_NOOP,
> };
> - uint32_t gem_context = gem_context_clone_with_engines(fd, 0);
> struct drm_i915_gem_exec_object2 obj;
> struct drm_i915_gem_execbuffer2 execbuf;
> struct drm_i915_gem_execbuffer_ext_timeline_fences timeline_fences;
> @@ -1988,7 +1987,7 @@ static void test_syncobj_timeline_wait(int fd)
>
> gem_quiescent_gpu(fd);
>
> - spin = igt_spin_new(fd, .ctx = gem_context, .engine = ALL_ENGINES);
> + spin = igt_spin_new(fd, .engine = ALL_ENGINES);
>
> memset(&timeline_fences, 0, sizeof(timeline_fences));
> timeline_fences.base.name = DRM_I915_GEM_EXECBUFFER_EXT_TIMELINE_FENCES;
> @@ -2000,7 +1999,6 @@ static void test_syncobj_timeline_wait(int fd)
> execbuf.buffers_ptr = to_user_pointer(&obj);
> execbuf.buffer_count = 1;
> execbuf.batch_len = sizeof(bbe);
> - execbuf.rsvd1 = gem_context;
>
> memset(&obj, 0, sizeof(obj));
> obj.handle = gem_create(fd, 4096);
> @@ -2055,8 +2053,6 @@ static void test_syncobj_timeline_wait(int fd)
> gem_sync(fd, handle[i]);
> gem_close(fd, handle[i]);
> }
> -
> - gem_context_destroy(fd, gem_context);
> }
>
> static const char *test_syncobj_timeline_export_desc =
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Intel-gfx] [igt-dev] [PATCH i-g-t] i915/gem_exec_fence: Use default-context for syncobj-timeline-wait
2020-08-07 9:00 ` Lionel Landwerlin
@ 2020-08-07 9:11 ` Chris Wilson
0 siblings, 0 replies; 3+ messages in thread
From: Chris Wilson @ 2020-08-07 9:11 UTC (permalink / raw)
To: Lionel Landwerlin, intel-gfx; +Cc: igt-dev
Quoting Lionel Landwerlin (2020-08-07 10:00:14)
> On 07/08/2020 11:45, Chris Wilson wrote:
> > syncobj-timeline-wait is only exercising waits on the syncobj along a
> > single timeline, for which it can use the universally available default
> > context, and so not try and fail to create a HW context on very old
> > platforms.
> >
> > Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2308
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
>
>
> Hm... I thought maybe we didn't get all the engines on the default context.
A fresh context, either the default for a new fd or from
gem_context_create(), only gets the default set of engines. The context
created here has a clone of the engines from the default context, which
we hope has been reconfigured already to have the set of all available
engines.
__for_each_physical_engine() works by querying the kernel and
reconfiguring the default context to suite. Fortunately that is run in a
fixture early on in gem_exec_fence, so by the time we get to the syncobj
group, we have all engines available.
Looks like we're good to iterate over them all :)
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-08-07 9:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-07 8:45 [Intel-gfx] [PATCH i-g-t] i915/gem_exec_fence: Use default-context for syncobj-timeline-wait Chris Wilson
2020-08-07 9:00 ` Lionel Landwerlin
2020-08-07 9:11 ` [Intel-gfx] [igt-dev] " Chris Wilson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).