* [igt-dev] [PATCH v2] lib/i915: gem_engine_topology: get eb flags from engine's class:instance
@ 2019-06-20 13:14 Andi Shyti
2019-06-20 16:14 ` Tvrtko Ursulin
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Andi Shyti @ 2019-06-20 13:14 UTC (permalink / raw)
To: IGT dev; +Cc: Andi Shyti
The execution buffer flag value has now the engine index as it is
mapped in the context. Retrieve the mapped index by interrogating
the driver starting from the class/instance tuple.
A "gem_context_get_eb_flags_ci" helper allows to avoid declaring
a "struct i915_engine_class_instance" for the purpose.
Return -EINVAL if the engine is not mapped in the given context.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Andi Shyti <andi.shyti@intel.com>
Cc: Ramalingam C <ramalingam.c@intel.com>
---
V1 --> V2 changelog:
--------------------
- refactor the code to avoid initializing the context just for
the purpose of getting the execution buffer flag (thanks
Tvrtko)
lib/i915/gem_engine_topology.c | 31 +++++++++++++++++++++++++++++++
lib/i915/gem_engine_topology.h | 6 ++++++
2 files changed, 37 insertions(+)
diff --git a/lib/i915/gem_engine_topology.c b/lib/i915/gem_engine_topology.c
index fdd1b951672b..fd5be3491b89 100644
--- a/lib/i915/gem_engine_topology.c
+++ b/lib/i915/gem_engine_topology.c
@@ -270,6 +270,37 @@ int gem_context_lookup_engine(int fd, uint64_t engine, uint32_t ctx_id,
return 0;
}
+int gem_context_get_eb_flags(int fd, uint32_t ctx_id,
+ struct i915_engine_class_instance *ci)
+{
+ DEFINE_CONTEXT_ENGINES_PARAM(engines, param, ctx_id, GEM_MAX_ENGINES);
+
+ /* legacy kernels */
+ if (gem_topology_get_param(fd, ¶m)) {
+ const struct intel_execution_engine2 *e;
+
+ __for_each_static_engine(e)
+ if (e->class == ci->engine_class &&
+ e->instance == ci->engine_instance)
+ return e->flags;
+
+ return -EINVAL;
+ }
+
+ /* context has no engine mapped */
+ if (!param.size)
+ return -EINVAL;
+
+ /* engine map lookup */
+ for (int i = 0; i < param.size; i++)
+ if (engines.engines[i].engine_class == ci->engine_class &&
+ engines.engines[i].engine_instance == ci->engine_instance)
+ return i;
+
+ /* engine is not mapped in the given context */
+ return -EINVAL;
+}
+
void gem_context_set_all_engines(int fd, uint32_t ctx)
{
DEFINE_CONTEXT_ENGINES_PARAM(engines, param, ctx, GEM_MAX_ENGINES);
diff --git a/lib/i915/gem_engine_topology.h b/lib/i915/gem_engine_topology.h
index 2415fd1e379b..57b5473bbd5a 100644
--- a/lib/i915/gem_engine_topology.h
+++ b/lib/i915/gem_engine_topology.h
@@ -53,6 +53,12 @@ int gem_context_lookup_engine(int fd, uint64_t engine, uint32_t ctx_id,
void gem_context_set_all_engines(int fd, uint32_t ctx);
+int gem_context_get_eb_flags(int fd, uint32_t ctx_id,
+ struct i915_engine_class_instance *ci);
+
+#define gem_context_get_eb_flags_ci(f, c, ...) \
+ gem_context_get_eb_flags(f, c, &((struct i915_engine_class_instance){__VA_ARGS__}))
+
#define __for_each_static_engine(e__) \
for ((e__) = intel_execution_engines2; (e__)->name; (e__)++)
--
2.20.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [igt-dev] [PATCH v2] lib/i915: gem_engine_topology: get eb flags from engine's class:instance
2019-06-20 13:14 [igt-dev] [PATCH v2] lib/i915: gem_engine_topology: get eb flags from engine's class:instance Andi Shyti
@ 2019-06-20 16:14 ` Tvrtko Ursulin
2019-06-24 5:45 ` Ramalingam C
2019-06-20 17:19 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-06-20 21:47 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2 siblings, 1 reply; 7+ messages in thread
From: Tvrtko Ursulin @ 2019-06-20 16:14 UTC (permalink / raw)
To: Andi Shyti, IGT dev; +Cc: Andi Shyti
On 20/06/2019 14:14, Andi Shyti wrote:
> The execution buffer flag value has now the engine index as it is
> mapped in the context. Retrieve the mapped index by interrogating
> the driver starting from the class/instance tuple.
>
> A "gem_context_get_eb_flags_ci" helper allows to avoid declaring
> a "struct i915_engine_class_instance" for the purpose.
>
> Return -EINVAL if the engine is not mapped in the given context.
>
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Signed-off-by: Andi Shyti <andi.shyti@intel.com>
> Cc: Ramalingam C <ramalingam.c@intel.com>
> ---
> V1 --> V2 changelog:
> --------------------
> - refactor the code to avoid initializing the context just for
> the purpose of getting the execution buffer flag (thanks
> Tvrtko)
>
> lib/i915/gem_engine_topology.c | 31 +++++++++++++++++++++++++++++++
> lib/i915/gem_engine_topology.h | 6 ++++++
> 2 files changed, 37 insertions(+)
>
> diff --git a/lib/i915/gem_engine_topology.c b/lib/i915/gem_engine_topology.c
> index fdd1b951672b..fd5be3491b89 100644
> --- a/lib/i915/gem_engine_topology.c
> +++ b/lib/i915/gem_engine_topology.c
> @@ -270,6 +270,37 @@ int gem_context_lookup_engine(int fd, uint64_t engine, uint32_t ctx_id,
> return 0;
> }
>
> +int gem_context_get_eb_flags(int fd, uint32_t ctx_id,
> + struct i915_engine_class_instance *ci)
> +{
> + DEFINE_CONTEXT_ENGINES_PARAM(engines, param, ctx_id, GEM_MAX_ENGINES);
> +
> + /* legacy kernels */
> + if (gem_topology_get_param(fd, ¶m)) {
> + const struct intel_execution_engine2 *e;
> +
> + __for_each_static_engine(e)
> + if (e->class == ci->engine_class &&
> + e->instance == ci->engine_instance)
> + return e->flags;
> +
> + return -EINVAL;
> + }
> +
> + /* context has no engine mapped */
> + if (!param.size)
> + return -EINVAL;
> +
> + /* engine map lookup */
> + for (int i = 0; i < param.size; i++)
> + if (engines.engines[i].engine_class == ci->engine_class &&
> + engines.engines[i].engine_instance == ci->engine_instance)
> + return i;
> +
> + /* engine is not mapped in the given context */
> + return -EINVAL;
> +}
Looks good to me.. ;)
> +
> void gem_context_set_all_engines(int fd, uint32_t ctx)
> {
> DEFINE_CONTEXT_ENGINES_PARAM(engines, param, ctx, GEM_MAX_ENGINES);
> diff --git a/lib/i915/gem_engine_topology.h b/lib/i915/gem_engine_topology.h
> index 2415fd1e379b..57b5473bbd5a 100644
> --- a/lib/i915/gem_engine_topology.h
> +++ b/lib/i915/gem_engine_topology.h
> @@ -53,6 +53,12 @@ int gem_context_lookup_engine(int fd, uint64_t engine, uint32_t ctx_id,
>
> void gem_context_set_all_engines(int fd, uint32_t ctx);
>
> +int gem_context_get_eb_flags(int fd, uint32_t ctx_id,
> + struct i915_engine_class_instance *ci);
> +
> +#define gem_context_get_eb_flags_ci(f, c, ...) \
> + gem_context_get_eb_flags(f, c, &((struct i915_engine_class_instance){__VA_ARGS__}))
> +
Hah this is some trick. I assume this allows:
eb.flags = gem_context_get_eb_flags(fd, ctx, ..._RENDER, 0);
?
What if too few or too many parameters are given? I'm in two minds but
can't argue it is very to be able to do this in IGT.
> #define __for_each_static_engine(e__) \
> for ((e__) = intel_execution_engines2; (e__)->name; (e__)++)
>
>
Can you extend the series with a patch which converts the problematic
subtests in perf_pmu to use this helper? Or even merge into this patch,
I don't mind. Would have some moral grounds to r-b it then. ;)
Regards,
Tvrtko
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 7+ messages in thread
* [igt-dev] ✓ Fi.CI.BAT: success for lib/i915: gem_engine_topology: get eb flags from engine's class:instance
2019-06-20 13:14 [igt-dev] [PATCH v2] lib/i915: gem_engine_topology: get eb flags from engine's class:instance Andi Shyti
2019-06-20 16:14 ` Tvrtko Ursulin
@ 2019-06-20 17:19 ` Patchwork
2019-06-20 21:47 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2019-06-20 17:19 UTC (permalink / raw)
To: Andi Shyti; +Cc: igt-dev
== Series Details ==
Series: lib/i915: gem_engine_topology: get eb flags from engine's class:instance
URL : https://patchwork.freedesktop.org/series/62454/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_6314 -> IGTPW_3183
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/62454/revisions/1/mbox/
Known issues
------------
Here are the changes found in IGTPW_3183 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_suspend@basic-s4-devices:
- fi-blb-e6850: [PASS][1] -> [INCOMPLETE][2] ([fdo#107718])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/fi-blb-e6850/igt@gem_exec_suspend@basic-s4-devices.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/fi-blb-e6850/igt@gem_exec_suspend@basic-s4-devices.html
#### Possible fixes ####
* igt@i915_selftest@live_contexts:
- fi-bdw-gvtdvm: [DMESG-FAIL][3] ([fdo#110235]) -> [PASS][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/fi-bdw-gvtdvm/igt@i915_selftest@live_contexts.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/fi-bdw-gvtdvm/igt@i915_selftest@live_contexts.html
* igt@i915_selftest@live_gem:
- fi-icl-dsi: [INCOMPLETE][5] ([fdo#107713]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/fi-icl-dsi/igt@i915_selftest@live_gem.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/fi-icl-dsi/igt@i915_selftest@live_gem.html
* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [FAIL][7] ([fdo#109485]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
* igt@kms_frontbuffer_tracking@basic:
- fi-hsw-peppy: [DMESG-WARN][9] ([fdo#102614]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/fi-hsw-peppy/igt@kms_frontbuffer_tracking@basic.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/fi-hsw-peppy/igt@kms_frontbuffer_tracking@basic.html
[fdo#102614]: https://bugs.freedesktop.org/show_bug.cgi?id=102614
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#109485]: https://bugs.freedesktop.org/show_bug.cgi?id=109485
[fdo#110235]: https://bugs.freedesktop.org/show_bug.cgi?id=110235
Participating hosts (51 -> 45)
------------------------------
Additional (1): fi-icl-u3
Missing (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-icl-y fi-byt-clapper fi-bdw-samus
Build changes
-------------
* IGT: IGT_5064 -> IGTPW_3183
CI_DRM_6314: 1180972dbd2a00f60a4d707772bd7e7ae6732ed5 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_3183: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/
IGT_5064: 22850c1906550fb97b405c019275dcfb34be8cf7 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 7+ messages in thread
* [igt-dev] ✓ Fi.CI.IGT: success for lib/i915: gem_engine_topology: get eb flags from engine's class:instance
2019-06-20 13:14 [igt-dev] [PATCH v2] lib/i915: gem_engine_topology: get eb flags from engine's class:instance Andi Shyti
2019-06-20 16:14 ` Tvrtko Ursulin
2019-06-20 17:19 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
@ 2019-06-20 21:47 ` Patchwork
2 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2019-06-20 21:47 UTC (permalink / raw)
To: Andi Shyti; +Cc: igt-dev
== Series Details ==
Series: lib/i915: gem_engine_topology: get eb flags from engine's class:instance
URL : https://patchwork.freedesktop.org/series/62454/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_6314_full -> IGTPW_3183_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/62454/revisions/1/mbox/
Known issues
------------
Here are the changes found in IGTPW_3183_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_ctx_isolation@rcs0-s3:
- shard-apl: [PASS][1] -> [INCOMPLETE][2] ([fdo#103927])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-apl2/igt@gem_ctx_isolation@rcs0-s3.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-apl7/igt@gem_ctx_isolation@rcs0-s3.html
* igt@gem_eio@in-flight-immediate:
- shard-apl: [PASS][3] -> [DMESG-WARN][4] ([fdo#110913 ]) +3 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-apl2/igt@gem_eio@in-flight-immediate.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-apl5/igt@gem_eio@in-flight-immediate.html
* igt@gem_eio@in-flight-suspend:
- shard-kbl: [PASS][5] -> [FAIL][6] ([fdo#110667])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-kbl3/igt@gem_eio@in-flight-suspend.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-kbl7/igt@gem_eio@in-flight-suspend.html
* igt@gem_eio@wait-1us:
- shard-kbl: [PASS][7] -> [DMESG-WARN][8] ([fdo#110913 ]) +2 similar issues
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-kbl7/igt@gem_eio@wait-1us.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-kbl7/igt@gem_eio@wait-1us.html
* igt@i915_pm_rpm@system-suspend-execbuf:
- shard-apl: [PASS][9] -> [SKIP][10] ([fdo#109271])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-apl7/igt@i915_pm_rpm@system-suspend-execbuf.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-apl7/igt@i915_pm_rpm@system-suspend-execbuf.html
* igt@kms_atomic_transition@plane-all-modeset-transition-fencing:
- shard-kbl: [PASS][11] -> [DMESG-FAIL][12] ([fdo#103558] / [fdo#105602])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-kbl4/igt@kms_atomic_transition@plane-all-modeset-transition-fencing.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-kbl4/igt@kms_atomic_transition@plane-all-modeset-transition-fencing.html
* igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-b:
- shard-kbl: [PASS][13] -> [DMESG-WARN][14] ([fdo#103558] / [fdo#105602] / [fdo#110222]) +1 similar issue
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-kbl3/igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-b.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-kbl4/igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-b.html
* igt@kms_dp_dsc@basic-dsc-enable-edp:
- shard-iclb: [PASS][15] -> [SKIP][16] ([fdo#109349])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-iclb2/igt@kms_dp_dsc@basic-dsc-enable-edp.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-iclb8/igt@kms_dp_dsc@basic-dsc-enable-edp.html
* igt@kms_draw_crc@draw-method-xrgb8888-pwrite-untiled:
- shard-kbl: [PASS][17] -> [INCOMPLETE][18] ([fdo#103665])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-kbl4/igt@kms_draw_crc@draw-method-xrgb8888-pwrite-untiled.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-kbl7/igt@kms_draw_crc@draw-method-xrgb8888-pwrite-untiled.html
* igt@kms_flip@2x-plain-flip-interruptible:
- shard-hsw: [PASS][19] -> [SKIP][20] ([fdo#109271]) +19 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-hsw4/igt@kms_flip@2x-plain-flip-interruptible.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-hsw1/igt@kms_flip@2x-plain-flip-interruptible.html
* igt@kms_flip@dpms-vs-vblank-race:
- shard-glk: [PASS][21] -> [FAIL][22] ([fdo#103060])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-glk6/igt@kms_flip@dpms-vs-vblank-race.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-glk7/igt@kms_flip@dpms-vs-vblank-race.html
* igt@kms_flip@flip-vs-expired-vblank-interruptible:
- shard-glk: [PASS][23] -> [FAIL][24] ([fdo#102887] / [fdo#105363])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-glk4/igt@kms_flip@flip-vs-expired-vblank-interruptible.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-glk4/igt@kms_flip@flip-vs-expired-vblank-interruptible.html
* igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-mmap-gtt:
- shard-kbl: [PASS][25] -> [DMESG-WARN][26] ([fdo#103558] / [fdo#105602]) +24 similar issues
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-kbl6/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-mmap-gtt.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-kbl4/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-mmap-gtt.html
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-shrfb-msflip-blt:
- shard-iclb: [PASS][27] -> [FAIL][28] ([fdo#103167]) +4 similar issues
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-iclb1/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-shrfb-msflip-blt.html
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-iclb4/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-shrfb-msflip-blt.html
* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes:
- shard-apl: [PASS][29] -> [DMESG-WARN][30] ([fdo#108566]) +1 similar issue
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-apl3/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-apl2/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html
* igt@kms_plane_lowres@pipe-a-tiling-x:
- shard-iclb: [PASS][31] -> [FAIL][32] ([fdo#103166])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-iclb3/igt@kms_plane_lowres@pipe-a-tiling-x.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-iclb8/igt@kms_plane_lowres@pipe-a-tiling-x.html
* igt@kms_psr2_su@frontbuffer:
- shard-iclb: [PASS][33] -> [SKIP][34] ([fdo#109642])
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-iclb2/igt@kms_psr2_su@frontbuffer.html
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-iclb8/igt@kms_psr2_su@frontbuffer.html
* igt@kms_psr@psr2_primary_mmap_cpu:
- shard-iclb: [PASS][35] -> [SKIP][36] ([fdo#109441]) +3 similar issues
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-iclb2/igt@kms_psr@psr2_primary_mmap_cpu.html
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-iclb6/igt@kms_psr@psr2_primary_mmap_cpu.html
* igt@kms_rotation_crc@multiplane-rotation-cropping-bottom:
- shard-kbl: [PASS][37] -> [DMESG-FAIL][38] ([fdo#105763])
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-kbl2/igt@kms_rotation_crc@multiplane-rotation-cropping-bottom.html
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-kbl7/igt@kms_rotation_crc@multiplane-rotation-cropping-bottom.html
* igt@kms_vblank@pipe-b-query-forked-hang:
- shard-snb: [PASS][39] -> [DMESG-WARN][40] ([fdo#110913 ]) +2 similar issues
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-snb6/igt@kms_vblank@pipe-b-query-forked-hang.html
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-snb5/igt@kms_vblank@pipe-b-query-forked-hang.html
* igt@kms_vblank@pipe-c-ts-continuation-modeset-rpm:
- shard-apl: [PASS][41] -> [SKIP][42] ([fdo#109271] / [fdo#109278])
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-apl1/igt@kms_vblank@pipe-c-ts-continuation-modeset-rpm.html
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-apl7/igt@kms_vblank@pipe-c-ts-continuation-modeset-rpm.html
#### Possible fixes ####
* igt@gem_persistent_relocs@forked-interruptible-thrashing:
- shard-snb: [DMESG-WARN][43] ([fdo#110789] / [fdo#110913 ]) -> [PASS][44] +2 similar issues
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-snb6/igt@gem_persistent_relocs@forked-interruptible-thrashing.html
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-snb4/igt@gem_persistent_relocs@forked-interruptible-thrashing.html
* igt@gem_userptr_blits@map-fixed-invalidate-busy-gup:
- shard-apl: [DMESG-WARN][45] ([fdo#110913 ]) -> [PASS][46] +3 similar issues
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-apl1/igt@gem_userptr_blits@map-fixed-invalidate-busy-gup.html
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-apl1/igt@gem_userptr_blits@map-fixed-invalidate-busy-gup.html
* igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy:
- shard-kbl: [DMESG-WARN][47] ([fdo#110913 ]) -> [PASS][48] +1 similar issue
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-kbl3/igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy.html
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-kbl7/igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy.html
- shard-snb: [DMESG-WARN][49] ([fdo#110913 ]) -> [PASS][50]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-snb5/igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy.html
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-snb5/igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy.html
* igt@gem_workarounds@suspend-resume:
- shard-apl: [DMESG-WARN][51] ([fdo#108566]) -> [PASS][52] +2 similar issues
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-apl3/igt@gem_workarounds@suspend-resume.html
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-apl5/igt@gem_workarounds@suspend-resume.html
* igt@i915_pm_rpm@system-suspend:
- shard-kbl: [INCOMPLETE][53] ([fdo#103665] / [fdo#107807]) -> [PASS][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-kbl3/igt@i915_pm_rpm@system-suspend.html
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-kbl6/igt@i915_pm_rpm@system-suspend.html
* igt@i915_pm_rps@min-max-config-loaded:
- shard-iclb: [INCOMPLETE][55] ([fdo#107713]) -> [PASS][56]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-iclb7/igt@i915_pm_rps@min-max-config-loaded.html
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-iclb2/igt@i915_pm_rps@min-max-config-loaded.html
* igt@kms_atomic_transition@plane-primary-toggle-with-vblank-wait:
- shard-snb: [SKIP][57] ([fdo#109271]) -> [PASS][58] +1 similar issue
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-snb2/igt@kms_atomic_transition@plane-primary-toggle-with-vblank-wait.html
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-snb2/igt@kms_atomic_transition@plane-primary-toggle-with-vblank-wait.html
* igt@kms_busy@extended-modeset-hang-newfb-render-a:
- shard-snb: [SKIP][59] ([fdo#109271] / [fdo#109278]) -> [PASS][60]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-snb2/igt@kms_busy@extended-modeset-hang-newfb-render-a.html
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-snb5/igt@kms_busy@extended-modeset-hang-newfb-render-a.html
* igt@kms_cursor_legacy@cursor-vs-flip-varying-size:
- shard-hsw: [FAIL][61] ([fdo#103355]) -> [PASS][62]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-hsw5/igt@kms_cursor_legacy@cursor-vs-flip-varying-size.html
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-hsw8/igt@kms_cursor_legacy@cursor-vs-flip-varying-size.html
* igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
- shard-hsw: [SKIP][63] ([fdo#109271]) -> [PASS][64] +17 similar issues
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-hsw1/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible.html
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-hsw6/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible.html
* igt@kms_flip@flip-vs-suspend:
- shard-glk: [INCOMPLETE][65] ([fdo#103359] / [k.org#198133]) -> [PASS][66]
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-glk7/igt@kms_flip@flip-vs-suspend.html
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-glk4/igt@kms_flip@flip-vs-suspend.html
* igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-cur-indfb-onoff:
- shard-glk: [FAIL][67] ([fdo#103167]) -> [PASS][68]
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-glk3/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-cur-indfb-onoff.html
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-glk1/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-cur-indfb-onoff.html
* igt@kms_frontbuffer_tracking@fbc-indfb-scaledprimary:
- shard-iclb: [FAIL][69] ([fdo#103167]) -> [PASS][70] +4 similar issues
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-iclb8/igt@kms_frontbuffer_tracking@fbc-indfb-scaledprimary.html
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-iclb2/igt@kms_frontbuffer_tracking@fbc-indfb-scaledprimary.html
* igt@kms_psr@psr2_sprite_mmap_cpu:
- shard-iclb: [SKIP][71] ([fdo#109441]) -> [PASS][72]
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-iclb8/igt@kms_psr@psr2_sprite_mmap_cpu.html
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-iclb2/igt@kms_psr@psr2_sprite_mmap_cpu.html
* igt@kms_setmode@basic:
- shard-kbl: [FAIL][73] ([fdo#99912]) -> [PASS][74]
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-kbl2/igt@kms_setmode@basic.html
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-kbl3/igt@kms_setmode@basic.html
* igt@kms_sysfs_edid_timing:
- shard-hsw: [FAIL][75] ([fdo#100047]) -> [PASS][76]
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-hsw1/igt@kms_sysfs_edid_timing.html
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-hsw5/igt@kms_sysfs_edid_timing.html
#### Warnings ####
* igt@kms_atomic_transition@6x-modeset-transitions-nonblocking-fencing:
- shard-kbl: [SKIP][77] ([fdo#109271] / [fdo#109278]) -> [SKIP][78] ([fdo#105602] / [fdo#109271] / [fdo#109278]) +1 similar issue
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-kbl7/igt@kms_atomic_transition@6x-modeset-transitions-nonblocking-fencing.html
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-kbl4/igt@kms_atomic_transition@6x-modeset-transitions-nonblocking-fencing.html
* igt@kms_cursor_crc@pipe-a-cursor-512x170-sliding:
- shard-kbl: [SKIP][79] ([fdo#109271]) -> [SKIP][80] ([fdo#105602] / [fdo#109271]) +17 similar issues
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-kbl4/igt@kms_cursor_crc@pipe-a-cursor-512x170-sliding.html
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-kbl4/igt@kms_cursor_crc@pipe-a-cursor-512x170-sliding.html
* igt@kms_plane_alpha_blend@pipe-b-alpha-7efc:
- shard-kbl: [FAIL][81] ([fdo#108145]) -> [DMESG-FAIL][82] ([fdo#103558] / [fdo#105602] / [fdo#108145]) +1 similar issue
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6314/shard-kbl1/igt@kms_plane_alpha_blend@pipe-b-alpha-7efc.html
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/shard-kbl4/igt@kms_plane_alpha_blend@pipe-b-alpha-7efc.html
[fdo#100047]: https://bugs.freedesktop.org/show_bug.cgi?id=100047
[fdo#102887]: https://bugs.freedesktop.org/show_bug.cgi?id=102887
[fdo#103060]: https://bugs.freedesktop.org/show_bug.cgi?id=103060
[fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103355]: https://bugs.freedesktop.org/show_bug.cgi?id=103355
[fdo#103359]: https://bugs.freedesktop.org/show_bug.cgi?id=103359
[fdo#103558]: https://bugs.freedesktop.org/show_bug.cgi?id=103558
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
[fdo#105763]: https://bugs.freedesktop.org/show_bug.cgi?id=105763
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107807]: https://bugs.freedesktop.org/show_bug.cgi?id=107807
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109349]: https://bugs.freedesktop.org/show_bug.cgi?id=109349
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#110222]: https://bugs.freedesktop.org/show_bug.cgi?id=110222
[fdo#110667]: https://bugs.freedesktop.org/show_bug.cgi?id=110667
[fdo#110789]: https://bugs.freedesktop.org/show_bug.cgi?id=110789
[fdo#110913 ]: https://bugs.freedesktop.org/show_bug.cgi?id=110913
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912
[k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133
Participating hosts (10 -> 6)
------------------------------
Missing (4): pig-skl-6260u shard-skl pig-hsw-4770r pig-glk-j5005
Build changes
-------------
* IGT: IGT_5064 -> IGTPW_3183
* Piglit: piglit_4509 -> None
CI_DRM_6314: 1180972dbd2a00f60a4d707772bd7e7ae6732ed5 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_3183: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/
IGT_5064: 22850c1906550fb97b405c019275dcfb34be8cf7 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3183/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [igt-dev] [PATCH v2] lib/i915: gem_engine_topology: get eb flags from engine's class:instance
2019-06-20 16:14 ` Tvrtko Ursulin
@ 2019-06-24 5:45 ` Ramalingam C
2019-06-24 7:26 ` Tvrtko Ursulin
0 siblings, 1 reply; 7+ messages in thread
From: Ramalingam C @ 2019-06-24 5:45 UTC (permalink / raw)
To: Tvrtko Ursulin; +Cc: IGT dev, Andi Shyti
On 2019-06-20 at 17:14:38 +0100, Tvrtko Ursulin wrote:
>
> On 20/06/2019 14:14, Andi Shyti wrote:
> > The execution buffer flag value has now the engine index as it is
> > mapped in the context. Retrieve the mapped index by interrogating
> > the driver starting from the class/instance tuple.
> >
> > A "gem_context_get_eb_flags_ci" helper allows to avoid declaring
> > a "struct i915_engine_class_instance" for the purpose.
> >
> > Return -EINVAL if the engine is not mapped in the given context.
> >
> > Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> > Signed-off-by: Andi Shyti <andi.shyti@intel.com>
> > Cc: Ramalingam C <ramalingam.c@intel.com>
> > ---
> > V1 --> V2 changelog:
> > --------------------
> > - refactor the code to avoid initializing the context just for
> > the purpose of getting the execution buffer flag (thanks
> > Tvrtko)
> >
> > lib/i915/gem_engine_topology.c | 31 +++++++++++++++++++++++++++++++
> > lib/i915/gem_engine_topology.h | 6 ++++++
> > 2 files changed, 37 insertions(+)
> >
> > diff --git a/lib/i915/gem_engine_topology.c b/lib/i915/gem_engine_topology.c
> > index fdd1b951672b..fd5be3491b89 100644
> > --- a/lib/i915/gem_engine_topology.c
> > +++ b/lib/i915/gem_engine_topology.c
> > @@ -270,6 +270,37 @@ int gem_context_lookup_engine(int fd, uint64_t engine, uint32_t ctx_id,
> > return 0;
> > }
> > +int gem_context_get_eb_flags(int fd, uint32_t ctx_id,
> > + struct i915_engine_class_instance *ci)
tvrtko and Andi,
instead of creating the i915_engine_class_instance on the go, can't we have the
intel_execution_engine2 * itself passed to this function? Anyway engine2
pointer will be available in all the time this function is called.
I am using this patch for
s/for_each_physical_engine/__for_each_physical_engine. Shall do the above change and submit?
-Ram
> > +{
> > + DEFINE_CONTEXT_ENGINES_PARAM(engines, param, ctx_id, GEM_MAX_ENGINES);
> > +
> > + /* legacy kernels */
> > + if (gem_topology_get_param(fd, ¶m)) {
> > + const struct intel_execution_engine2 *e;
> > +
> > + __for_each_static_engine(e)
> > + if (e->class == ci->engine_class &&
> > + e->instance == ci->engine_instance)
> > + return e->flags;
> > +
> > + return -EINVAL;
> > + }
> > +
> > + /* context has no engine mapped */
> > + if (!param.size)
> > + return -EINVAL;
> > +
> > + /* engine map lookup */
> > + for (int i = 0; i < param.size; i++)
> > + if (engines.engines[i].engine_class == ci->engine_class &&
> > + engines.engines[i].engine_instance == ci->engine_instance)
> > + return i;
> > +
> > + /* engine is not mapped in the given context */
> > + return -EINVAL;
> > +}
>
> Looks good to me.. ;)
>
> > +
> > void gem_context_set_all_engines(int fd, uint32_t ctx)
> > {
> > DEFINE_CONTEXT_ENGINES_PARAM(engines, param, ctx, GEM_MAX_ENGINES);
> > diff --git a/lib/i915/gem_engine_topology.h b/lib/i915/gem_engine_topology.h
> > index 2415fd1e379b..57b5473bbd5a 100644
> > --- a/lib/i915/gem_engine_topology.h
> > +++ b/lib/i915/gem_engine_topology.h
> > @@ -53,6 +53,12 @@ int gem_context_lookup_engine(int fd, uint64_t engine, uint32_t ctx_id,
> > void gem_context_set_all_engines(int fd, uint32_t ctx);
> > +int gem_context_get_eb_flags(int fd, uint32_t ctx_id,
> > + struct i915_engine_class_instance *ci);
> > +
> > +#define gem_context_get_eb_flags_ci(f, c, ...) \
> > + gem_context_get_eb_flags(f, c, &((struct i915_engine_class_instance){__VA_ARGS__}))
> > +
>
> Hah this is some trick. I assume this allows:
>
> eb.flags = gem_context_get_eb_flags(fd, ctx, ..._RENDER, 0);
>
> ?
>
> What if too few or too many parameters are given? I'm in two minds but can't
> argue it is very to be able to do this in IGT.
>
> > #define __for_each_static_engine(e__) \
> > for ((e__) = intel_execution_engines2; (e__)->name; (e__)++)
> >
>
> Can you extend the series with a patch which converts the problematic
> subtests in perf_pmu to use this helper? Or even merge into this patch, I
> don't mind. Would have some moral grounds to r-b it then. ;)
>
> Regards,
>
> Tvrtko
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [igt-dev] [PATCH v2] lib/i915: gem_engine_topology: get eb flags from engine's class:instance
2019-06-24 5:45 ` Ramalingam C
@ 2019-06-24 7:26 ` Tvrtko Ursulin
2019-06-25 11:34 ` Andi Shyti
0 siblings, 1 reply; 7+ messages in thread
From: Tvrtko Ursulin @ 2019-06-24 7:26 UTC (permalink / raw)
To: Ramalingam C; +Cc: IGT dev, Andi Shyti
On 24/06/2019 06:45, Ramalingam C wrote:
> On 2019-06-20 at 17:14:38 +0100, Tvrtko Ursulin wrote:
>>
>> On 20/06/2019 14:14, Andi Shyti wrote:
>>> The execution buffer flag value has now the engine index as it is
>>> mapped in the context. Retrieve the mapped index by interrogating
>>> the driver starting from the class/instance tuple.
>>>
>>> A "gem_context_get_eb_flags_ci" helper allows to avoid declaring
>>> a "struct i915_engine_class_instance" for the purpose.
>>>
>>> Return -EINVAL if the engine is not mapped in the given context.
>>>
>>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>> Signed-off-by: Andi Shyti <andi.shyti@intel.com>
>>> Cc: Ramalingam C <ramalingam.c@intel.com>
>>> ---
>>> V1 --> V2 changelog:
>>> --------------------
>>> - refactor the code to avoid initializing the context just for
>>> the purpose of getting the execution buffer flag (thanks
>>> Tvrtko)
>>>
>>> lib/i915/gem_engine_topology.c | 31 +++++++++++++++++++++++++++++++
>>> lib/i915/gem_engine_topology.h | 6 ++++++
>>> 2 files changed, 37 insertions(+)
>>>
>>> diff --git a/lib/i915/gem_engine_topology.c b/lib/i915/gem_engine_topology.c
>>> index fdd1b951672b..fd5be3491b89 100644
>>> --- a/lib/i915/gem_engine_topology.c
>>> +++ b/lib/i915/gem_engine_topology.c
>>> @@ -270,6 +270,37 @@ int gem_context_lookup_engine(int fd, uint64_t engine, uint32_t ctx_id,
>>> return 0;
>>> }
>>> +int gem_context_get_eb_flags(int fd, uint32_t ctx_id,
>>> + struct i915_engine_class_instance *ci)
> tvrtko and Andi,
>
> instead of creating the i915_engine_class_instance on the go, can't we have the
> intel_execution_engine2 * itself passed to this function? Anyway engine2
> pointer will be available in all the time this function is called.
I think intel_execution_engine2 is not always available. For instance
perf_pmu/frequency|interrupts it is not.
Maybe change struct intel_execution_engine2 to embed struct
i915_engine_class_instance instead of having separate class and instance
fields? So in tests where you have it you can just pass e2->engine?
Maybe it would require too much churn, not sure.
For the option with less churn we can have two or more flavours of the
helper. One can take class and instance separately, one can take ci and
one struct intel_execution_engine2 if that makes sense.
Regards,
Tvrtko
> I am using this patch for
> s/for_each_physical_engine/__for_each_physical_engine. Shall do the above change and submit?
>
> -Ram
>>> +{
>>> + DEFINE_CONTEXT_ENGINES_PARAM(engines, param, ctx_id, GEM_MAX_ENGINES);
>>> +
>>> + /* legacy kernels */
>>> + if (gem_topology_get_param(fd, ¶m)) {
>>> + const struct intel_execution_engine2 *e;
>>> +
>>> + __for_each_static_engine(e)
>>> + if (e->class == ci->engine_class &&
>>> + e->instance == ci->engine_instance)
>>> + return e->flags;
>>> +
>>> + return -EINVAL;
>>> + }
>>> +
>>> + /* context has no engine mapped */
>>> + if (!param.size)
>>> + return -EINVAL;
>>> +
>>> + /* engine map lookup */
>>> + for (int i = 0; i < param.size; i++)
>>> + if (engines.engines[i].engine_class == ci->engine_class &&
>>> + engines.engines[i].engine_instance == ci->engine_instance)
>>> + return i;
>>> +
>>> + /* engine is not mapped in the given context */
>>> + return -EINVAL;
>>> +}
>>
>> Looks good to me.. ;)
>>
>>> +
>>> void gem_context_set_all_engines(int fd, uint32_t ctx)
>>> {
>>> DEFINE_CONTEXT_ENGINES_PARAM(engines, param, ctx, GEM_MAX_ENGINES);
>>> diff --git a/lib/i915/gem_engine_topology.h b/lib/i915/gem_engine_topology.h
>>> index 2415fd1e379b..57b5473bbd5a 100644
>>> --- a/lib/i915/gem_engine_topology.h
>>> +++ b/lib/i915/gem_engine_topology.h
>>> @@ -53,6 +53,12 @@ int gem_context_lookup_engine(int fd, uint64_t engine, uint32_t ctx_id,
>>> void gem_context_set_all_engines(int fd, uint32_t ctx);
>>> +int gem_context_get_eb_flags(int fd, uint32_t ctx_id,
>>> + struct i915_engine_class_instance *ci);
>>> +
>>> +#define gem_context_get_eb_flags_ci(f, c, ...) \
>>> + gem_context_get_eb_flags(f, c, &((struct i915_engine_class_instance){__VA_ARGS__}))
>>> +
>>
>> Hah this is some trick. I assume this allows:
>>
>> eb.flags = gem_context_get_eb_flags(fd, ctx, ..._RENDER, 0);
>>
>> ?
>>
>> What if too few or too many parameters are given? I'm in two minds but can't
>> argue it is very to be able to do this in IGT.
>>
>>> #define __for_each_static_engine(e__) \
>>> for ((e__) = intel_execution_engines2; (e__)->name; (e__)++)
>>>
>>
>> Can you extend the series with a patch which converts the problematic
>> subtests in perf_pmu to use this helper? Or even merge into this patch, I
>> don't mind. Would have some moral grounds to r-b it then. ;)
>>
>> Regards,
>>
>> Tvrtko
>
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [igt-dev] [PATCH v2] lib/i915: gem_engine_topology: get eb flags from engine's class:instance
2019-06-24 7:26 ` Tvrtko Ursulin
@ 2019-06-25 11:34 ` Andi Shyti
0 siblings, 0 replies; 7+ messages in thread
From: Andi Shyti @ 2019-06-25 11:34 UTC (permalink / raw)
To: Tvrtko Ursulin; +Cc: IGT dev, Andi Shyti
On Mon, Jun 24, 2019 at 08:26:20AM +0100, Tvrtko Ursulin wrote:
>
> On 24/06/2019 06:45, Ramalingam C wrote:
> > On 2019-06-20 at 17:14:38 +0100, Tvrtko Ursulin wrote:
> > >
> > > On 20/06/2019 14:14, Andi Shyti wrote:
> > > > The execution buffer flag value has now the engine index as it is
> > > > mapped in the context. Retrieve the mapped index by interrogating
> > > > the driver starting from the class/instance tuple.
> > > >
> > > > A "gem_context_get_eb_flags_ci" helper allows to avoid declaring
> > > > a "struct i915_engine_class_instance" for the purpose.
> > > >
> > > > Return -EINVAL if the engine is not mapped in the given context.
> > > >
> > > > Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> > > > Signed-off-by: Andi Shyti <andi.shyti@intel.com>
> > > > Cc: Ramalingam C <ramalingam.c@intel.com>
> > > > ---
> > > > V1 --> V2 changelog:
> > > > --------------------
> > > > - refactor the code to avoid initializing the context just for
> > > > the purpose of getting the execution buffer flag (thanks
> > > > Tvrtko)
> > > >
> > > > lib/i915/gem_engine_topology.c | 31 +++++++++++++++++++++++++++++++
> > > > lib/i915/gem_engine_topology.h | 6 ++++++
> > > > 2 files changed, 37 insertions(+)
> > > >
> > > > diff --git a/lib/i915/gem_engine_topology.c b/lib/i915/gem_engine_topology.c
> > > > index fdd1b951672b..fd5be3491b89 100644
> > > > --- a/lib/i915/gem_engine_topology.c
> > > > +++ b/lib/i915/gem_engine_topology.c
> > > > @@ -270,6 +270,37 @@ int gem_context_lookup_engine(int fd, uint64_t engine, uint32_t ctx_id,
> > > > return 0;
> > > > }
> > > > +int gem_context_get_eb_flags(int fd, uint32_t ctx_id,
> > > > + struct i915_engine_class_instance *ci)
> > tvrtko and Andi,
> >
> > instead of creating the i915_engine_class_instance on the go, can't we have the
> > intel_execution_engine2 * itself passed to this function? Anyway engine2
> > pointer will be available in all the time this function is called.
>
> I think intel_execution_engine2 is not always available. For instance
> perf_pmu/frequency|interrupts it is not.
Yes, agree... besides is not nice to ask the caller to always
declare an intel_execution_engine2 structure
> Maybe change struct intel_execution_engine2 to embed struct
> i915_engine_class_instance instead of having separate class and instance
> fields? So in tests where you have it you can just pass e2->engine? Maybe it
> would require too much churn, not sure.
Yes, this would be nice... but it would require a huge changeset.
I'll try to do it.
> For the option with less churn we can have two or more flavours of the
> helper. One can take class and instance separately, one can take ci and one
> struct intel_execution_engine2 if that makes sense.
Yes, I can make some defines of this type in the next version:
int gem_context_get_eb_flags(int fd, uint32_t ctx_id, int class, int instance)
#define gem_context_get_eb_flags_ci(fd, ctx_id, ci) \
gem_context_get_eb_flags(fd, ctx_id, ci->engine_class, ci->engine_instance)
#define gem_context_get_eb_flags_e(fd, ctx_id, e) \
gem_context_get_eb_flags(fd, ctx_id, e->ci->engine_class, e->ci->engine_instance)
Does it add entropy?
Andi
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-06-25 15:10 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-20 13:14 [igt-dev] [PATCH v2] lib/i915: gem_engine_topology: get eb flags from engine's class:instance Andi Shyti
2019-06-20 16:14 ` Tvrtko Ursulin
2019-06-24 5:45 ` Ramalingam C
2019-06-24 7:26 ` Tvrtko Ursulin
2019-06-25 11:34 ` Andi Shyti
2019-06-20 17:19 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-06-20 21:47 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox