* [igt-dev] [PATCH i-g-t 1/2] lib/i915/gem_engine_topology: list engines specific to gt
@ 2023-03-13 17:59 Vikas Srivastava
2023-03-13 17:59 ` [igt-dev] [PATCH i-g-t 2/2] lib/intel_ctx: Create intel_ctx with physical engines in a single gt Vikas Srivastava
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Vikas Srivastava @ 2023-03-13 17:59 UTC (permalink / raw)
To: igt-dev
From: Riana Tauro <riana.tauro@intel.com>
Add a function that returns all engines belonging to a gt
Currently the function is specific to MTL and returns gt id
based on engine
Signed-off-by: Riana Tauro <riana.tauro@intel.com>
Signed-off-by: Vikas Srivastava <vikas.srivastava@intel.com>
---
lib/i915/gem_engine_topology.c | 73 ++++++++++++++++++++++++++++++++++
lib/i915/gem_engine_topology.h | 6 +++
2 files changed, 79 insertions(+)
diff --git a/lib/i915/gem_engine_topology.c b/lib/i915/gem_engine_topology.c
index ca3333c252..6c8929ec59 100644
--- a/lib/i915/gem_engine_topology.c
+++ b/lib/i915/gem_engine_topology.c
@@ -350,6 +350,79 @@ struct intel_execution_engine2 gem_eb_flags_to_engine(unsigned int flags)
return e2__;
}
+/*
+ * MTL has two GT's, one containing render/compute/copy and the other
+ * containing media engines. Return gt id based on engine.
+ */
+static int
+mtl_engine_to_gt_map(const struct i915_engine_class_instance *e)
+{
+ switch (e->engine_class) {
+ case I915_ENGINE_CLASS_RENDER:
+ case I915_ENGINE_CLASS_COMPUTE:
+ case I915_ENGINE_CLASS_COPY:
+ return 0;
+ case I915_ENGINE_CLASS_VIDEO:
+ case I915_ENGINE_CLASS_VIDEO_ENHANCE:
+ return 1;
+ default:
+ igt_assert_f(0, "Unsupported engine class %d\n", e->engine_class);
+ }
+}
+
+static int gem_engine_to_gt_map(int i915, const struct i915_engine_class_instance *engine)
+{
+ igt_require(IS_METEORLAKE(intel_get_drm_devid(i915)));
+ return mtl_engine_to_gt_map(engine);
+}
+
+/**
+ * gem_list_engines:
+ * @i915: i915 drm file descriptor
+ * @gt_mask: gt mask
+ * @class_mask: engine class mask
+ * @out: returned engine count
+ *
+ * Returns: the list of all physical engines belonging to the gt.
+ * Caller must free memory after use
+ */
+struct i915_engine_class_instance *
+gem_list_engines(int i915,
+ uint32_t gt_mask,
+ uint32_t class_mask,
+ unsigned int *out)
+{
+ struct i915_engine_class_instance *engines;
+ struct drm_i915_query_engine_info *info;
+ const int size = 256 << 10; /* enough for 8 classes of 256 engines */
+ unsigned int max = 0, count = 0;
+
+ info = calloc(1, size);
+ igt_assert(!__gem_query_engines(i915, info, size));
+
+ max = info->num_engines;
+ engines = (struct i915_engine_class_instance *)info;
+ for (unsigned int i = 0; i < max; i++) {
+ const struct i915_engine_class_instance *e =
+ &info->engines[i].engine;
+
+ if (!((class_mask >> e->engine_class) & 1))
+ continue;
+ if (!((gt_mask >> gem_engine_to_gt_map(i915, e)) & 1))
+ continue;
+
+ engines[count++] = *e;
+ }
+
+ if (!count) {
+ free(engines);
+ engines = NULL;
+ }
+
+ *out = count;
+ return engines;
+}
+
bool gem_engine_is_equal(const struct intel_execution_engine2 *e1,
const struct intel_execution_engine2 *e2)
{
diff --git a/lib/i915/gem_engine_topology.h b/lib/i915/gem_engine_topology.h
index 987f2bf944..89642c3172 100644
--- a/lib/i915/gem_engine_topology.h
+++ b/lib/i915/gem_engine_topology.h
@@ -61,6 +61,12 @@ intel_get_current_physical_engine(struct intel_engine_data *ed);
void intel_next_engine(struct intel_engine_data *ed);
+struct i915_engine_class_instance *
+gem_list_engines(int i915,
+ uint32_t gt_mask,
+ uint32_t class_mask,
+ unsigned int *count);
+
bool gem_engine_is_equal(const struct intel_execution_engine2 *e1,
const struct intel_execution_engine2 *e2);
--
2.25.1
^ permalink raw reply related [flat|nested] 8+ messages in thread* [igt-dev] [PATCH i-g-t 2/2] lib/intel_ctx: Create intel_ctx with physical engines in a single gt 2023-03-13 17:59 [igt-dev] [PATCH i-g-t 1/2] lib/i915/gem_engine_topology: list engines specific to gt Vikas Srivastava @ 2023-03-13 17:59 ` Vikas Srivastava 2023-03-16 17:21 ` Kamil Konieczny 2023-03-13 18:44 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib/i915/gem_engine_topology: list engines specific to gt Patchwork ` (2 subsequent siblings) 3 siblings, 1 reply; 8+ messages in thread From: Vikas Srivastava @ 2023-03-13 17:59 UTC (permalink / raw) To: igt-dev From: Ashutosh Dixit <ashutosh.dixit@intel.com> Introduce intel_ctx_create_for_gt for creating an intel_ctx_t containing all physical engines belonging to a single gt. Cc: Zbigniew Kempczynski <zbigniew.kempczynski@intel.com> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Riana Tauro <riana.tauro@intel.com> Signed-off-by: Vikas Srivastava <vikas.srivastava@intel.com> --- lib/intel_ctx.c | 42 ++++++++++++++++++++++++++++++++++++++++++ lib/intel_ctx.h | 2 ++ 2 files changed, 44 insertions(+) diff --git a/lib/intel_ctx.c b/lib/intel_ctx.c index e19a54a896..ded9c0f1e4 100644 --- a/lib/intel_ctx.c +++ b/lib/intel_ctx.c @@ -61,6 +61,28 @@ intel_ctx_cfg_t intel_ctx_cfg_all_physical(int fd) return cfg; } +/** + * intel_ctx_cfg_for_gt: + * @fd: open i915 drm file descriptor + * @gt: gt id + * + * Returns an intel_ctx_cfg_t containing all physical engines belonging to @gt + */ +intel_ctx_cfg_t intel_ctx_cfg_for_gt(int fd, int gt) +{ + struct i915_engine_class_instance *ci; + intel_ctx_cfg_t cfg = {}; + unsigned int count; + + ci = gem_list_engines(fd, 1u << gt, ~0u, &count); + igt_assert(ci); + memcpy(&cfg.engines, ci, count * sizeof(*ci)); + cfg.num_engines = count; + free(ci); + + return cfg; +} + /** * intel_ctx_cfg_for_engine: * @class: engine class @@ -295,6 +317,26 @@ const intel_ctx_t *intel_ctx_create_all_physical(int fd) return intel_ctx_create(fd, &cfg); } +/** + * intel_ctx_create_for_gt: + * @fd: open i915 drm file descriptor + * @gt: gt id + * + * Creates an intel_ctx_t containing all physical engines belonging to @gt + */ +const intel_ctx_t *intel_ctx_create_for_gt(int fd, int gt) +{ + intel_ctx_cfg_t cfg; + + igt_require(gem_has_contexts(fd) || !gt); + + if (!gem_has_contexts(fd)) + return intel_ctx_0(fd); + + cfg = intel_ctx_cfg_for_gt(fd, gt); + return intel_ctx_create(fd, &cfg); +} + /** * intel_ctx_cfg_engine_class: * @cfg: an intel_ctx_cfg_t diff --git a/lib/intel_ctx.h b/lib/intel_ctx.h index 89c65fcd39..3cfeaae81e 100644 --- a/lib/intel_ctx.h +++ b/lib/intel_ctx.h @@ -54,6 +54,7 @@ typedef struct intel_ctx_cfg { intel_ctx_cfg_t intel_ctx_cfg_for_engine(unsigned int class, unsigned int inst); intel_ctx_cfg_t intel_ctx_cfg_all_physical(int fd); +intel_ctx_cfg_t intel_ctx_cfg_for_gt(int fd, int gt); int intel_ctx_cfg_engine_class(const intel_ctx_cfg_t *cfg, unsigned int engine); /** @@ -75,6 +76,7 @@ const intel_ctx_t *intel_ctx_0(int fd); const intel_ctx_t *intel_ctx_create_for_engine(int fd, unsigned int class, unsigned int inst); const intel_ctx_t *intel_ctx_create_all_physical(int fd); +const intel_ctx_t *intel_ctx_create_for_gt(int fd, int gt); void intel_ctx_destroy(int fd, const intel_ctx_t *ctx); unsigned int intel_ctx_engine_class(const intel_ctx_t *ctx, unsigned int engine); -- 2.25.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 2/2] lib/intel_ctx: Create intel_ctx with physical engines in a single gt 2023-03-13 17:59 ` [igt-dev] [PATCH i-g-t 2/2] lib/intel_ctx: Create intel_ctx with physical engines in a single gt Vikas Srivastava @ 2023-03-16 17:21 ` Kamil Konieczny 0 siblings, 0 replies; 8+ messages in thread From: Kamil Konieczny @ 2023-03-16 17:21 UTC (permalink / raw) To: igt-dev Hi Vikas, On 2023-03-13 at 23:29:28 +0530, Vikas Srivastava wrote: > From: Ashutosh Dixit <ashutosh.dixit@intel.com> > > Introduce intel_ctx_create_for_gt for creating an intel_ctx_t containing > all physical engines belonging to a single gt. > > Cc: Zbigniew Kempczynski <zbigniew.kempczynski@intel.com> I do not see Zbigniew in headers, please do send your patch to people on Cc list. > Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> > Signed-off-by: Riana Tauro <riana.tauro@intel.com> imho you should also cc Ashutosh and Riana. > Signed-off-by: Vikas Srivastava <vikas.srivastava@intel.com> > --- > lib/intel_ctx.c | 42 ++++++++++++++++++++++++++++++++++++++++++ > lib/intel_ctx.h | 2 ++ > 2 files changed, 44 insertions(+) > > diff --git a/lib/intel_ctx.c b/lib/intel_ctx.c > index e19a54a896..ded9c0f1e4 100644 > --- a/lib/intel_ctx.c > +++ b/lib/intel_ctx.c > @@ -61,6 +61,28 @@ intel_ctx_cfg_t intel_ctx_cfg_all_physical(int fd) > return cfg; > } > > +/** > + * intel_ctx_cfg_for_gt: > + * @fd: open i915 drm file descriptor > + * @gt: gt id > + * > + * Returns an intel_ctx_cfg_t containing all physical engines belonging to @gt > + */ > +intel_ctx_cfg_t intel_ctx_cfg_for_gt(int fd, int gt) > +{ > + struct i915_engine_class_instance *ci; > + intel_ctx_cfg_t cfg = {}; > + unsigned int count; > + > + ci = gem_list_engines(fd, 1u << gt, ~0u, &count); > + igt_assert(ci); > + memcpy(&cfg.engines, ci, count * sizeof(*ci)); > + cfg.num_engines = count; > + free(ci); > + > + return cfg; > +} > + > /** > * intel_ctx_cfg_for_engine: > * @class: engine class > @@ -295,6 +317,26 @@ const intel_ctx_t *intel_ctx_create_all_physical(int fd) > return intel_ctx_create(fd, &cfg); > } > > +/** > + * intel_ctx_create_for_gt: > + * @fd: open i915 drm file descriptor > + * @gt: gt id > + * > + * Creates an intel_ctx_t containing all physical engines belonging to @gt > + */ > +const intel_ctx_t *intel_ctx_create_for_gt(int fd, int gt) > +{ > + intel_ctx_cfg_t cfg; > + > + igt_require(gem_has_contexts(fd) || !gt); ------- ^ It would fail here for !gem_has_contexts(fd) && gt != 0 Does it really happen on new platforms ? imho we should avoid igt_require in lib, it should be checked in test itself so please remove it from here. > + > + if (!gem_has_contexts(fd)) It check has_contexts here - in case contexts are not supported it return default one, so it is argument againts above igt_require. Regards, Kamil > + return intel_ctx_0(fd); > + > + cfg = intel_ctx_cfg_for_gt(fd, gt); > + return intel_ctx_create(fd, &cfg); > +} > + > /** > * intel_ctx_cfg_engine_class: > * @cfg: an intel_ctx_cfg_t > diff --git a/lib/intel_ctx.h b/lib/intel_ctx.h > index 89c65fcd39..3cfeaae81e 100644 > --- a/lib/intel_ctx.h > +++ b/lib/intel_ctx.h > @@ -54,6 +54,7 @@ typedef struct intel_ctx_cfg { > > intel_ctx_cfg_t intel_ctx_cfg_for_engine(unsigned int class, unsigned int inst); > intel_ctx_cfg_t intel_ctx_cfg_all_physical(int fd); > +intel_ctx_cfg_t intel_ctx_cfg_for_gt(int fd, int gt); > int intel_ctx_cfg_engine_class(const intel_ctx_cfg_t *cfg, unsigned int engine); > > /** > @@ -75,6 +76,7 @@ const intel_ctx_t *intel_ctx_0(int fd); > const intel_ctx_t *intel_ctx_create_for_engine(int fd, unsigned int class, > unsigned int inst); > const intel_ctx_t *intel_ctx_create_all_physical(int fd); > +const intel_ctx_t *intel_ctx_create_for_gt(int fd, int gt); > void intel_ctx_destroy(int fd, const intel_ctx_t *ctx); > > unsigned int intel_ctx_engine_class(const intel_ctx_t *ctx, unsigned int engine); > -- > 2.25.1 > ^ permalink raw reply [flat|nested] 8+ messages in thread
* [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib/i915/gem_engine_topology: list engines specific to gt 2023-03-13 17:59 [igt-dev] [PATCH i-g-t 1/2] lib/i915/gem_engine_topology: list engines specific to gt Vikas Srivastava 2023-03-13 17:59 ` [igt-dev] [PATCH i-g-t 2/2] lib/intel_ctx: Create intel_ctx with physical engines in a single gt Vikas Srivastava @ 2023-03-13 18:44 ` Patchwork 2023-03-14 18:53 ` [igt-dev] [PATCH i-g-t 1/2] " Kamil Konieczny 2023-03-14 23:06 ` [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/2] " Patchwork 3 siblings, 0 replies; 8+ messages in thread From: Patchwork @ 2023-03-13 18:44 UTC (permalink / raw) To: Vikas Srivastava; +Cc: igt-dev [-- Attachment #1: Type: text/plain, Size: 5057 bytes --] == Series Details == Series: series starting with [i-g-t,1/2] lib/i915/gem_engine_topology: list engines specific to gt URL : https://patchwork.freedesktop.org/series/115075/ State : success == Summary == CI Bug Log - changes from CI_DRM_12853 -> IGTPW_8598 ==================================================== Summary ------- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/index.html Participating hosts (39 -> 38) ------------------------------ Missing (1): bat-atsm-1 Known issues ------------ Here are the changes found in IGTPW_8598 that come from known issues: ### IGT changes ### #### Issues hit #### * igt@i915_selftest@live@execlists: - fi-bsw-n3050: [PASS][1] -> [ABORT][2] ([i915#7911]) [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/fi-bsw-n3050/igt@i915_selftest@live@execlists.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/fi-bsw-n3050/igt@i915_selftest@live@execlists.html * igt@i915_selftest@live@gt_heartbeat: - fi-apl-guc: [PASS][3] -> [DMESG-FAIL][4] ([i915#5334]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html * igt@i915_selftest@live@slpc: - bat-rpls-2: NOTRUN -> [DMESG-FAIL][5] ([i915#6367] / [i915#7913] / [i915#7996]) [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/bat-rpls-2/igt@i915_selftest@live@slpc.html - bat-rpls-1: [PASS][6] -> [DMESG-FAIL][7] ([i915#6367]) [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/bat-rpls-1/igt@i915_selftest@live@slpc.html [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/bat-rpls-1/igt@i915_selftest@live@slpc.html * igt@kms_chamelium_hpd@common-hpd-after-suspend: - bat-rpls-2: NOTRUN -> [SKIP][8] ([i915#7828]) [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/bat-rpls-2/igt@kms_chamelium_hpd@common-hpd-after-suspend.html * igt@kms_pipe_crc_basic@suspend-read-crc: - bat-rpls-2: NOTRUN -> [SKIP][9] ([i915#1845]) [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/bat-rpls-2/igt@kms_pipe_crc_basic@suspend-read-crc.html #### Possible fixes #### * igt@i915_selftest@live@dmabuf: - fi-bsw-nick: [DMESG-FAIL][10] ([i915#7562] / [i915#7913]) -> [PASS][11] [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/fi-bsw-nick/igt@i915_selftest@live@dmabuf.html [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/fi-bsw-nick/igt@i915_selftest@live@dmabuf.html * igt@i915_selftest@live@gt_heartbeat: - fi-kbl-soraka: [DMESG-FAIL][12] ([i915#5334] / [i915#7872]) -> [PASS][13] [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/fi-kbl-soraka/igt@i915_selftest@live@gt_heartbeat.html [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/fi-kbl-soraka/igt@i915_selftest@live@gt_heartbeat.html * igt@i915_selftest@live@hangcheck: - fi-skl-guc: [DMESG-WARN][14] ([i915#8073]) -> [PASS][15] [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/fi-skl-guc/igt@i915_selftest@live@hangcheck.html [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/fi-skl-guc/igt@i915_selftest@live@hangcheck.html * igt@i915_selftest@live@requests: - bat-rpls-2: [ABORT][16] ([i915#4983] / [i915#7694] / [i915#7913]) -> [PASS][17] [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/bat-rpls-2/igt@i915_selftest@live@requests.html [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/bat-rpls-2/igt@i915_selftest@live@requests.html [i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845 [i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983 [i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334 [i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367 [i915#7562]: https://gitlab.freedesktop.org/drm/intel/issues/7562 [i915#7694]: https://gitlab.freedesktop.org/drm/intel/issues/7694 [i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828 [i915#7872]: https://gitlab.freedesktop.org/drm/intel/issues/7872 [i915#7911]: https://gitlab.freedesktop.org/drm/intel/issues/7911 [i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913 [i915#7996]: https://gitlab.freedesktop.org/drm/intel/issues/7996 [i915#8073]: https://gitlab.freedesktop.org/drm/intel/issues/8073 Build changes ------------- * CI: CI-20190529 -> None * IGT: IGT_7192 -> IGTPW_8598 CI-20190529: 20190529 CI_DRM_12853: 7cfe22e6f72f5328dded16b38e215ff290e8d7f8 @ git://anongit.freedesktop.org/gfx-ci/linux IGTPW_8598: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/index.html IGT_7192: 18beb515ff127e64302a491ed321125b5116aa23 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/index.html [-- Attachment #2: Type: text/html, Size: 6148 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 1/2] lib/i915/gem_engine_topology: list engines specific to gt 2023-03-13 17:59 [igt-dev] [PATCH i-g-t 1/2] lib/i915/gem_engine_topology: list engines specific to gt Vikas Srivastava 2023-03-13 17:59 ` [igt-dev] [PATCH i-g-t 2/2] lib/intel_ctx: Create intel_ctx with physical engines in a single gt Vikas Srivastava 2023-03-13 18:44 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib/i915/gem_engine_topology: list engines specific to gt Patchwork @ 2023-03-14 18:53 ` Kamil Konieczny 2023-03-14 23:06 ` [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/2] " Patchwork 3 siblings, 0 replies; 8+ messages in thread From: Kamil Konieczny @ 2023-03-14 18:53 UTC (permalink / raw) To: igt-dev On 2023-03-13 at 23:29:27 +0530, Vikas Srivastava wrote: > From: Riana Tauro <riana.tauro@intel.com> > > Add a function that returns all engines belonging to a gt > Currently the function is specific to MTL and returns gt id > based on engine > > Signed-off-by: Riana Tauro <riana.tauro@intel.com> > Signed-off-by: Vikas Srivastava <vikas.srivastava@intel.com> lgtm, Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com> -- Kamil > --- > lib/i915/gem_engine_topology.c | 73 ++++++++++++++++++++++++++++++++++ > lib/i915/gem_engine_topology.h | 6 +++ > 2 files changed, 79 insertions(+) > > diff --git a/lib/i915/gem_engine_topology.c b/lib/i915/gem_engine_topology.c > index ca3333c252..6c8929ec59 100644 > --- a/lib/i915/gem_engine_topology.c > +++ b/lib/i915/gem_engine_topology.c > @@ -350,6 +350,79 @@ struct intel_execution_engine2 gem_eb_flags_to_engine(unsigned int flags) > return e2__; > } > > +/* > + * MTL has two GT's, one containing render/compute/copy and the other > + * containing media engines. Return gt id based on engine. > + */ > +static int > +mtl_engine_to_gt_map(const struct i915_engine_class_instance *e) > +{ > + switch (e->engine_class) { > + case I915_ENGINE_CLASS_RENDER: > + case I915_ENGINE_CLASS_COMPUTE: > + case I915_ENGINE_CLASS_COPY: > + return 0; > + case I915_ENGINE_CLASS_VIDEO: > + case I915_ENGINE_CLASS_VIDEO_ENHANCE: > + return 1; > + default: > + igt_assert_f(0, "Unsupported engine class %d\n", e->engine_class); > + } > +} > + > +static int gem_engine_to_gt_map(int i915, const struct i915_engine_class_instance *engine) > +{ > + igt_require(IS_METEORLAKE(intel_get_drm_devid(i915))); > + return mtl_engine_to_gt_map(engine); > +} > + > +/** > + * gem_list_engines: > + * @i915: i915 drm file descriptor > + * @gt_mask: gt mask > + * @class_mask: engine class mask > + * @out: returned engine count > + * > + * Returns: the list of all physical engines belonging to the gt. > + * Caller must free memory after use > + */ > +struct i915_engine_class_instance * > +gem_list_engines(int i915, > + uint32_t gt_mask, > + uint32_t class_mask, > + unsigned int *out) > +{ > + struct i915_engine_class_instance *engines; > + struct drm_i915_query_engine_info *info; > + const int size = 256 << 10; /* enough for 8 classes of 256 engines */ > + unsigned int max = 0, count = 0; > + > + info = calloc(1, size); > + igt_assert(!__gem_query_engines(i915, info, size)); > + > + max = info->num_engines; > + engines = (struct i915_engine_class_instance *)info; > + for (unsigned int i = 0; i < max; i++) { > + const struct i915_engine_class_instance *e = > + &info->engines[i].engine; > + > + if (!((class_mask >> e->engine_class) & 1)) > + continue; > + if (!((gt_mask >> gem_engine_to_gt_map(i915, e)) & 1)) > + continue; > + > + engines[count++] = *e; > + } > + > + if (!count) { > + free(engines); > + engines = NULL; > + } > + > + *out = count; > + return engines; > +} > + > bool gem_engine_is_equal(const struct intel_execution_engine2 *e1, > const struct intel_execution_engine2 *e2) > { > diff --git a/lib/i915/gem_engine_topology.h b/lib/i915/gem_engine_topology.h > index 987f2bf944..89642c3172 100644 > --- a/lib/i915/gem_engine_topology.h > +++ b/lib/i915/gem_engine_topology.h > @@ -61,6 +61,12 @@ intel_get_current_physical_engine(struct intel_engine_data *ed); > > void intel_next_engine(struct intel_engine_data *ed); > > +struct i915_engine_class_instance * > +gem_list_engines(int i915, > + uint32_t gt_mask, > + uint32_t class_mask, > + unsigned int *count); > + > bool gem_engine_is_equal(const struct intel_execution_engine2 *e1, > const struct intel_execution_engine2 *e2); > > -- > 2.25.1 > ^ permalink raw reply [flat|nested] 8+ messages in thread
* [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/2] lib/i915/gem_engine_topology: list engines specific to gt 2023-03-13 17:59 [igt-dev] [PATCH i-g-t 1/2] lib/i915/gem_engine_topology: list engines specific to gt Vikas Srivastava ` (2 preceding siblings ...) 2023-03-14 18:53 ` [igt-dev] [PATCH i-g-t 1/2] " Kamil Konieczny @ 2023-03-14 23:06 ` Patchwork 3 siblings, 0 replies; 8+ messages in thread From: Patchwork @ 2023-03-14 23:06 UTC (permalink / raw) To: Vikas Srivastava; +Cc: igt-dev [-- Attachment #1: Type: text/plain, Size: 25326 bytes --] == Series Details == Series: series starting with [i-g-t,1/2] lib/i915/gem_engine_topology: list engines specific to gt URL : https://patchwork.freedesktop.org/series/115075/ State : success == Summary == CI Bug Log - changes from CI_DRM_12853_full -> IGTPW_8598_full ==================================================== Summary ------- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/index.html Participating hosts (8 -> 8) ------------------------------ No changes in participating hosts Possible new issues ------------------- Here are the unknown changes that may have been introduced in IGTPW_8598_full: ### IGT changes ### #### Suppressed #### The following results come from untrusted machines, tests, or statuses. They do not affect the overall result. * igt@kms_flip@flip-vs-suspend-interruptible@d-hdmi-a1: - {shard-tglu}: NOTRUN -> [DMESG-WARN][1] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/shard-tglu-3/igt@kms_flip@flip-vs-suspend-interruptible@d-hdmi-a1.html Known issues ------------ Here are the changes found in IGTPW_8598_full that come from known issues: ### IGT changes ### #### Issues hit #### * igt@gem_exec_fair@basic-none-solo@rcs0: - shard-apl: [PASS][2] -> [FAIL][3] ([i915#2842]) [2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/shard-apl2/igt@gem_exec_fair@basic-none-solo@rcs0.html [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/shard-apl2/igt@gem_exec_fair@basic-none-solo@rcs0.html * igt@gem_exec_fair@basic-pace@rcs0: - shard-glk: [PASS][4] -> [FAIL][5] ([i915#2842]) +1 similar issue [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/shard-glk1/igt@gem_exec_fair@basic-pace@rcs0.html [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/shard-glk7/igt@gem_exec_fair@basic-pace@rcs0.html * igt@gen9_exec_parse@allowed-all: - shard-glk: [PASS][6] -> [ABORT][7] ([i915#5566]) [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/shard-glk8/igt@gen9_exec_parse@allowed-all.html [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/shard-glk2/igt@gen9_exec_parse@allowed-all.html * igt@kms_cursor_crc@cursor-offscreen-32x32: - shard-snb: NOTRUN -> [SKIP][8] ([fdo#109271]) +34 similar issues [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/shard-snb2/igt@kms_cursor_crc@cursor-offscreen-32x32.html * igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions: - shard-glk: [PASS][9] -> [FAIL][10] ([i915#2346]) +1 similar issue [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/shard-glk6/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/shard-glk6/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html * igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size: - shard-apl: [PASS][11] -> [FAIL][12] ([i915#2346]) [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/shard-apl3/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/shard-apl6/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html #### Possible fixes #### * igt@api_intel_bb@object-reloc-keep-cache: - {shard-rkl}: [SKIP][13] ([i915#3281]) -> [PASS][14] +4 similar issues [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/shard-rkl-6/igt@api_intel_bb@object-reloc-keep-cache.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/shard-rkl-5/igt@api_intel_bb@object-reloc-keep-cache.html * igt@dumb_buffer@create-clear: - {shard-tglu}: [INCOMPLETE][15] -> [PASS][16] [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/shard-tglu-4/igt@dumb_buffer@create-clear.html [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/shard-tglu-8/igt@dumb_buffer@create-clear.html * igt@fbdev@read: - {shard-rkl}: [SKIP][17] ([i915#2582]) -> [PASS][18] [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/shard-rkl-5/igt@fbdev@read.html [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/shard-rkl-3/igt@fbdev@read.html * igt@gem_ctx_exec@basic-nohangcheck: - {shard-rkl}: [FAIL][19] ([i915#6268]) -> [PASS][20] [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/shard-rkl-3/igt@gem_ctx_exec@basic-nohangcheck.html [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/shard-rkl-4/igt@gem_ctx_exec@basic-nohangcheck.html * igt@gem_exec_endless@dispatch@bcs0: - {shard-rkl}: [SKIP][21] ([i915#6247]) -> [PASS][22] [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/shard-rkl-5/igt@gem_exec_endless@dispatch@bcs0.html [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/shard-rkl-3/igt@gem_exec_endless@dispatch@bcs0.html * igt@gem_exec_fair@basic-deadline: - {shard-rkl}: [FAIL][23] ([i915#2846]) -> [PASS][24] [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/shard-rkl-6/igt@gem_exec_fair@basic-deadline.html [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/shard-rkl-1/igt@gem_exec_fair@basic-deadline.html * igt@gem_exec_fair@basic-none-rrul@rcs0: - shard-glk: [FAIL][25] ([i915#2842]) -> [PASS][26] [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/shard-glk3/igt@gem_exec_fair@basic-none-rrul@rcs0.html [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/shard-glk7/igt@gem_exec_fair@basic-none-rrul@rcs0.html * igt@gem_exec_fair@basic-pace@vecs0: - {shard-rkl}: [FAIL][27] ([i915#2842]) -> [PASS][28] +1 similar issue [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/shard-rkl-4/igt@gem_exec_fair@basic-pace@vecs0.html [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/shard-rkl-4/igt@gem_exec_fair@basic-pace@vecs0.html * igt@gem_lmem_swapping@smem-oom@lmem0: - {shard-dg1}: [DMESG-WARN][29] ([i915#4936]) -> [PASS][30] [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/shard-dg1-14/igt@gem_lmem_swapping@smem-oom@lmem0.html [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/shard-dg1-17/igt@gem_lmem_swapping@smem-oom@lmem0.html * igt@gem_mmap_gtt@fault-concurrent-y: - shard-snb: [ABORT][31] ([i915#5161]) -> [PASS][32] [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/shard-snb4/igt@gem_mmap_gtt@fault-concurrent-y.html [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/shard-snb5/igt@gem_mmap_gtt@fault-concurrent-y.html * igt@gem_partial_pwrite_pread@writes-after-reads-uncached: - {shard-rkl}: [SKIP][33] ([i915#3282]) -> [PASS][34] +3 similar issues [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/shard-rkl-1/igt@gem_partial_pwrite_pread@writes-after-reads-uncached.html [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/shard-rkl-5/igt@gem_partial_pwrite_pread@writes-after-reads-uncached.html * igt@gem_workarounds@suspend-resume-fd: - {shard-rkl}: [FAIL][35] ([fdo#103375]) -> [PASS][36] [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/shard-rkl-3/igt@gem_workarounds@suspend-resume-fd.html [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/shard-rkl-3/igt@gem_workarounds@suspend-resume-fd.html * igt@gen9_exec_parse@batch-zero-length: - {shard-rkl}: [SKIP][37] ([i915#2527]) -> [PASS][38] [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/shard-rkl-3/igt@gen9_exec_parse@batch-zero-length.html [38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/shard-rkl-5/igt@gen9_exec_parse@batch-zero-length.html * igt@i915_pm_rpm@drm-resources-equal: - {shard-tglu}: [SKIP][39] ([i915#3547]) -> [PASS][40] [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/shard-tglu-9/igt@i915_pm_rpm@drm-resources-equal.html [40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/shard-tglu-5/igt@i915_pm_rpm@drm-resources-equal.html * igt@i915_pm_rpm@modeset-lpsp-stress-no-wait: - {shard-tglu}: [SKIP][41] ([i915#1397]) -> [PASS][42] [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/shard-tglu-9/igt@i915_pm_rpm@modeset-lpsp-stress-no-wait.html [42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/shard-tglu-1/igt@i915_pm_rpm@modeset-lpsp-stress-no-wait.html * igt@i915_pm_rpm@modeset-non-lpsp-stress: - {shard-dg1}: [SKIP][43] ([i915#1397]) -> [PASS][44] [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/shard-dg1-14/igt@i915_pm_rpm@modeset-non-lpsp-stress.html [44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/shard-dg1-17/igt@i915_pm_rpm@modeset-non-lpsp-stress.html * igt@kms_cursor_legacy@cursor-vs-flip-atomic: - {shard-tglu}: [SKIP][45] ([i915#1845]) -> [PASS][46] +6 similar issues [45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/shard-tglu-6/igt@kms_cursor_legacy@cursor-vs-flip-atomic.html [46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/shard-tglu-4/igt@kms_cursor_legacy@cursor-vs-flip-atomic.html * igt@kms_fbcon_fbt@fbc-suspend: - {shard-tglu}: [ABORT][47] ([i915#5122]) -> [PASS][48] [47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/shard-tglu-4/igt@kms_fbcon_fbt@fbc-suspend.html [48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/shard-tglu-2/igt@kms_fbcon_fbt@fbc-suspend.html * igt@kms_flip@2x-plain-flip-ts-check-interruptible@ac-hdmi-a1-hdmi-a2: - shard-glk: [FAIL][49] ([i915#2122]) -> [PASS][50] [49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/shard-glk7/igt@kms_flip@2x-plain-flip-ts-check-interruptible@ac-hdmi-a1-hdmi-a2.html [50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/shard-glk7/igt@kms_flip@2x-plain-flip-ts-check-interruptible@ac-hdmi-a1-hdmi-a2.html * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-mmap-gtt: - {shard-tglu}: [SKIP][51] ([i915#1849]) -> [PASS][52] +11 similar issues [51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/shard-tglu-6/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-mmap-gtt.html [52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/shard-tglu-2/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-mmap-gtt.html * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-render: - {shard-rkl}: [SKIP][53] ([i915#1849] / [i915#4098]) -> [PASS][54] +12 similar issues [53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/shard-rkl-5/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-render.html [54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/shard-rkl-6/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-render.html * igt@kms_plane@pixel-format-source-clamping@pipe-b-planes: - {shard-tglu}: [SKIP][55] ([i915#1849] / [i915#3558]) -> [PASS][56] +1 similar issue [55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/shard-tglu-6/igt@kms_plane@pixel-format-source-clamping@pipe-b-planes.html [56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/shard-tglu-3/igt@kms_plane@pixel-format-source-clamping@pipe-b-planes.html * igt@kms_plane@plane-position-covered@pipe-a-planes: - {shard-rkl}: [SKIP][57] ([i915#1849]) -> [PASS][58] +2 similar issues [57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/shard-rkl-3/igt@kms_plane@plane-position-covered@pipe-a-planes.html [58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/shard-rkl-6/igt@kms_plane@plane-position-covered@pipe-a-planes.html * igt@kms_psr@cursor_mmap_cpu: - {shard-rkl}: [SKIP][59] ([i915#1072]) -> [PASS][60] +1 similar issue [59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/shard-rkl-5/igt@kms_psr@cursor_mmap_cpu.html [60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/shard-rkl-6/igt@kms_psr@cursor_mmap_cpu.html * igt@kms_rotation_crc@exhaust-fences: - {shard-rkl}: [SKIP][61] ([i915#1845] / [i915#4098]) -> [PASS][62] +15 similar issues [61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/shard-rkl-1/igt@kms_rotation_crc@exhaust-fences.html [62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/shard-rkl-6/igt@kms_rotation_crc@exhaust-fences.html * igt@kms_universal_plane@universal-plane-pipe-c-sanity: - {shard-tglu}: [SKIP][63] ([fdo#109274]) -> [PASS][64] +3 similar issues [63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/shard-tglu-9/igt@kms_universal_plane@universal-plane-pipe-c-sanity.html [64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/shard-tglu-2/igt@kms_universal_plane@universal-plane-pipe-c-sanity.html * igt@kms_vblank@pipe-d-wait-busy: - {shard-tglu}: [SKIP][65] ([i915#1845] / [i915#7651]) -> [PASS][66] +37 similar issues [65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/shard-tglu-6/igt@kms_vblank@pipe-d-wait-busy.html [66]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/shard-tglu-8/igt@kms_vblank@pipe-d-wait-busy.html * igt@perf@gen12-mi-rpc: - {shard-rkl}: [SKIP][67] ([fdo#109289]) -> [PASS][68] [67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/shard-rkl-5/igt@perf@gen12-mi-rpc.html [68]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/shard-rkl-4/igt@perf@gen12-mi-rpc.html * igt@perf@polling-small-buf: - {shard-tglu}: [FAIL][69] ([i915#1722]) -> [PASS][70] [69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/shard-tglu-9/igt@perf@polling-small-buf.html [70]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/shard-tglu-1/igt@perf@polling-small-buf.html * igt@prime_vgem@basic-write: - {shard-rkl}: [SKIP][71] ([fdo#109295] / [i915#3291] / [i915#3708]) -> [PASS][72] [71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12853/shard-rkl-4/igt@prime_vgem@basic-write.html [72]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/shard-rkl-5/igt@prime_vgem@basic-write.html {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [IGT#2]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/2 [fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375 [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274 [fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280 [fdo#109283]: https://bugs.freedesktop.org/show_bug.cgi?id=109283 [fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289 [fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295 [fdo#109312]: https://bugs.freedesktop.org/show_bug.cgi?id=109312 [fdo#109313]: https://bugs.freedesktop.org/show_bug.cgi?id=109313 [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315 [fdo#109506]: https://bugs.freedesktop.org/show_bug.cgi?id=109506 [fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189 [fdo#110723]: https://bugs.freedesktop.org/show_bug.cgi?id=110723 [fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068 [fdo#111614]: https://bugs.freedesktop.org/show_bug.cgi?id=111614 [fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615 [fdo#111644]: https://bugs.freedesktop.org/show_bug.cgi?id=111644 [fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825 [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827 [fdo#112054]: https://bugs.freedesktop.org/show_bug.cgi?id=112054 [fdo#112283]: https://bugs.freedesktop.org/show_bug.cgi?id=112283 [i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072 [i915#1257]: https://gitlab.freedesktop.org/drm/intel/issues/1257 [i915#132]: https://gitlab.freedesktop.org/drm/intel/issues/132 [i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397 [i915#1722]: https://gitlab.freedesktop.org/drm/intel/issues/1722 [i915#1825]: https://gitlab.freedesktop.org/drm/intel/issues/1825 [i915#1839]: https://gitlab.freedesktop.org/drm/intel/issues/1839 [i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845 [i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849 [i915#2122]: https://gitlab.freedesktop.org/drm/intel/issues/2122 [i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346 [i915#2433]: https://gitlab.freedesktop.org/drm/intel/issues/2433 [i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527 [i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575 [i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582 [i915#2587]: https://gitlab.freedesktop.org/drm/intel/issues/2587 [i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672 [i915#2705]: https://gitlab.freedesktop.org/drm/intel/issues/2705 [i915#280]: https://gitlab.freedesktop.org/drm/intel/issues/280 [i915#284]: https://gitlab.freedesktop.org/drm/intel/issues/284 [i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842 [i915#2846]: https://gitlab.freedesktop.org/drm/intel/issues/2846 [i915#2856]: https://gitlab.freedesktop.org/drm/intel/issues/2856 [i915#2920]: https://gitlab.freedesktop.org/drm/intel/issues/2920 [i915#3116]: https://gitlab.freedesktop.org/drm/intel/issues/3116 [i915#315]: https://gitlab.freedesktop.org/drm/intel/issues/315 [i915#3281]: https://gitlab.freedesktop.org/drm/intel/issues/3281 [i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282 [i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291 [i915#3297]: https://gitlab.freedesktop.org/drm/intel/issues/3297 [i915#3299]: https://gitlab.freedesktop.org/drm/intel/issues/3299 [i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301 [i915#3318]: https://gitlab.freedesktop.org/drm/intel/issues/3318 [i915#3359]: https://gitlab.freedesktop.org/drm/intel/issues/3359 [i915#3361]: https://gitlab.freedesktop.org/drm/intel/issues/3361 [i915#3458]: https://gitlab.freedesktop.org/drm/intel/issues/3458 [i915#3469]: https://gitlab.freedesktop.org/drm/intel/issues/3469 [i915#3528]: https://gitlab.freedesktop.org/drm/intel/issues/3528 [i915#3539]: https://gitlab.freedesktop.org/drm/intel/issues/3539 [i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546 [i915#3547]: https://gitlab.freedesktop.org/drm/intel/issues/3547 [i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555 [i915#3558]: https://gitlab.freedesktop.org/drm/intel/issues/3558 [i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637 [i915#3638]: https://gitlab.freedesktop.org/drm/intel/issues/3638 [i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689 [i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708 [i915#3734]: https://gitlab.freedesktop.org/drm/intel/issues/3734 [i915#3742]: https://gitlab.freedesktop.org/drm/intel/issues/3742 [i915#3825]: https://gitlab.freedesktop.org/drm/intel/issues/3825 [i915#3840]: https://gitlab.freedesktop.org/drm/intel/issues/3840 [i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886 [i915#3955]: https://gitlab.freedesktop.org/drm/intel/issues/3955 [i915#4070]: https://gitlab.freedesktop.org/drm/intel/issues/4070 [i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077 [i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079 [i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083 [i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098 [i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103 [i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212 [i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213 [i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270 [i915#433]: https://gitlab.freedesktop.org/drm/intel/issues/433 [i915#4387]: https://gitlab.freedesktop.org/drm/intel/issues/4387 [i915#4525]: https://gitlab.freedesktop.org/drm/intel/issues/4525 [i915#4538]: https://gitlab.freedesktop.org/drm/intel/issues/4538 [i915#4565]: https://gitlab.freedesktop.org/drm/intel/issues/4565 [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613 [i915#4771]: https://gitlab.freedesktop.org/drm/intel/issues/4771 [i915#4812]: https://gitlab.freedesktop.org/drm/intel/issues/4812 [i915#4833]: https://gitlab.freedesktop.org/drm/intel/issues/4833 [i915#4852]: https://gitlab.freedesktop.org/drm/intel/issues/4852 [i915#4859]: https://gitlab.freedesktop.org/drm/intel/issues/4859 [i915#4860]: https://gitlab.freedesktop.org/drm/intel/issues/4860 [i915#4879]: https://gitlab.freedesktop.org/drm/intel/issues/4879 [i915#4880]: https://gitlab.freedesktop.org/drm/intel/issues/4880 [i915#4881]: https://gitlab.freedesktop.org/drm/intel/issues/4881 [i915#4884]: https://gitlab.freedesktop.org/drm/intel/issues/4884 [i915#4936]: https://gitlab.freedesktop.org/drm/intel/issues/4936 [i915#4958]: https://gitlab.freedesktop.org/drm/intel/issues/4958 [i915#5115]: https://gitlab.freedesktop.org/drm/intel/issues/5115 [i915#5122]: https://gitlab.freedesktop.org/drm/intel/issues/5122 [i915#5161]: https://gitlab.freedesktop.org/drm/intel/issues/5161 [i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176 [i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235 [i915#5286]: https://gitlab.freedesktop.org/drm/intel/issues/5286 [i915#5288]: https://gitlab.freedesktop.org/drm/intel/issues/5288 [i915#5289]: https://gitlab.freedesktop.org/drm/intel/issues/5289 [i915#5325]: https://gitlab.freedesktop.org/drm/intel/issues/5325 [i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533 [i915#5439]: https://gitlab.freedesktop.org/drm/intel/issues/5439 [i915#5563]: https://gitlab.freedesktop.org/drm/intel/issues/5563 [i915#5566]: https://gitlab.freedesktop.org/drm/intel/issues/5566 [i915#5723]: https://gitlab.freedesktop.org/drm/intel/issues/5723 [i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095 [i915#6230]: https://gitlab.freedesktop.org/drm/intel/issues/6230 [i915#6245]: https://gitlab.freedesktop.org/drm/intel/issues/6245 [i915#6247]: https://gitlab.freedesktop.org/drm/intel/issues/6247 [i915#6252]: https://gitlab.freedesktop.org/drm/intel/issues/6252 [i915#6259]: https://gitlab.freedesktop.org/drm/intel/issues/6259 [i915#6268]: https://gitlab.freedesktop.org/drm/intel/issues/6268 [i915#6301]: https://gitlab.freedesktop.org/drm/intel/issues/6301 [i915#6433]: https://gitlab.freedesktop.org/drm/intel/issues/6433 [i915#6493]: https://gitlab.freedesktop.org/drm/intel/issues/6493 [i915#6497]: https://gitlab.freedesktop.org/drm/intel/issues/6497 [i915#6524]: https://gitlab.freedesktop.org/drm/intel/issues/6524 [i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658 [i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621 [i915#6768]: https://gitlab.freedesktop.org/drm/intel/issues/6768 [i915#6944]: https://gitlab.freedesktop.org/drm/intel/issues/6944 [i915#6946]: https://gitlab.freedesktop.org/drm/intel/issues/6946 [i915#6953]: https://gitlab.freedesktop.org/drm/intel/issues/6953 [i915#7037]: https://gitlab.freedesktop.org/drm/intel/issues/7037 [i915#7052]: https://gitlab.freedesktop.org/drm/intel/issues/7052 [i915#7116]: https://gitlab.freedesktop.org/drm/intel/issues/7116 [i915#7118]: https://gitlab.freedesktop.org/drm/intel/issues/7118 [i915#7128]: https://gitlab.freedesktop.org/drm/intel/issues/7128 [i915#7178]: https://gitlab.freedesktop.org/drm/intel/issues/7178 [i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561 [i915#7651]: https://gitlab.freedesktop.org/drm/intel/issues/7651 [i915#7697]: https://gitlab.freedesktop.org/drm/intel/issues/7697 [i915#7701]: https://gitlab.freedesktop.org/drm/intel/issues/7701 [i915#7711]: https://gitlab.freedesktop.org/drm/intel/issues/7711 [i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828 [i915#7949]: https://gitlab.freedesktop.org/drm/intel/issues/7949 [i915#7957]: https://gitlab.freedesktop.org/drm/intel/issues/7957 [i915#7975]: https://gitlab.freedesktop.org/drm/intel/issues/7975 [i915#8152]: https://gitlab.freedesktop.org/drm/intel/issues/8152 [i915#8228]: https://gitlab.freedesktop.org/drm/intel/issues/8228 [i915#8273]: https://gitlab.freedesktop.org/drm/intel/issues/8273 [i915#8282]: https://gitlab.freedesktop.org/drm/intel/issues/8282 Build changes ------------- * CI: CI-20190529 -> None * IGT: IGT_7192 -> IGTPW_8598 * Piglit: piglit_4509 -> None CI-20190529: 20190529 CI_DRM_12853: 7cfe22e6f72f5328dded16b38e215ff290e8d7f8 @ git://anongit.freedesktop.org/gfx-ci/linux IGTPW_8598: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/index.html IGT_7192: 18beb515ff127e64302a491ed321125b5116aa23 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8598/index.html [-- Attachment #2: Type: text/html, Size: 19246 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* [igt-dev] [PATCH i-g-t 0/2] List engines belonging to a gt @ 2023-04-05 6:58 Vikas Srivastava 2023-04-05 6:58 ` [igt-dev] [PATCH i-g-t 1/2] lib/i915/gem_engine_topology: list engines specific to gt Vikas Srivastava 0 siblings, 1 reply; 8+ messages in thread From: Vikas Srivastava @ 2023-04-05 6:58 UTC (permalink / raw) To: igt-dev Add a function that returns all engines belonging to a gt. Create a intel_ctx_t with physical engines belonging to a gt Signed-off-by: Vikas Srivastava <vikas.srivastava@intel.com> Signed-off-by: Riana Tauro <riana.tauro@intel.com> Ashutosh Dixit (1): lib/intel_ctx: Create intel_ctx with physical engines in a single gt Riana Tauro (1): lib/i915/gem_engine_topology: list engines specific to gt lib/i915/gem_engine_topology.c | 73 ++++++++++++++++++++++++++++++++++ lib/i915/gem_engine_topology.h | 6 +++ lib/intel_ctx.c | 42 +++++++++++++++++++ lib/intel_ctx.h | 2 + 4 files changed, 123 insertions(+) -- 2.25.1 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [igt-dev] [PATCH i-g-t 1/2] lib/i915/gem_engine_topology: list engines specific to gt 2023-04-05 6:58 [igt-dev] [PATCH i-g-t 0/2] List engines belonging to a gt Vikas Srivastava @ 2023-04-05 6:58 ` Vikas Srivastava 2023-04-07 11:03 ` Kamil Konieczny 0 siblings, 1 reply; 8+ messages in thread From: Vikas Srivastava @ 2023-04-05 6:58 UTC (permalink / raw) To: igt-dev From: Riana Tauro <riana.tauro@intel.com> Add a function that returns all engines belonging to a gt Currently the function is specific to MTL and returns gt id based on engine Signed-off-by: Riana Tauro <riana.tauro@intel.com> Cc: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Vikas Srivastava <vikas.srivastava@intel.com> --- lib/i915/gem_engine_topology.c | 73 ++++++++++++++++++++++++++++++++++ lib/i915/gem_engine_topology.h | 6 +++ 2 files changed, 79 insertions(+) diff --git a/lib/i915/gem_engine_topology.c b/lib/i915/gem_engine_topology.c index ca3333c252..6c8929ec59 100644 --- a/lib/i915/gem_engine_topology.c +++ b/lib/i915/gem_engine_topology.c @@ -350,6 +350,79 @@ struct intel_execution_engine2 gem_eb_flags_to_engine(unsigned int flags) return e2__; } +/* + * MTL has two GT's, one containing render/compute/copy and the other + * containing media engines. Return gt id based on engine. + */ +static int +mtl_engine_to_gt_map(const struct i915_engine_class_instance *e) +{ + switch (e->engine_class) { + case I915_ENGINE_CLASS_RENDER: + case I915_ENGINE_CLASS_COMPUTE: + case I915_ENGINE_CLASS_COPY: + return 0; + case I915_ENGINE_CLASS_VIDEO: + case I915_ENGINE_CLASS_VIDEO_ENHANCE: + return 1; + default: + igt_assert_f(0, "Unsupported engine class %d\n", e->engine_class); + } +} + +static int gem_engine_to_gt_map(int i915, const struct i915_engine_class_instance *engine) +{ + igt_require(IS_METEORLAKE(intel_get_drm_devid(i915))); + return mtl_engine_to_gt_map(engine); +} + +/** + * gem_list_engines: + * @i915: i915 drm file descriptor + * @gt_mask: gt mask + * @class_mask: engine class mask + * @out: returned engine count + * + * Returns: the list of all physical engines belonging to the gt. + * Caller must free memory after use + */ +struct i915_engine_class_instance * +gem_list_engines(int i915, + uint32_t gt_mask, + uint32_t class_mask, + unsigned int *out) +{ + struct i915_engine_class_instance *engines; + struct drm_i915_query_engine_info *info; + const int size = 256 << 10; /* enough for 8 classes of 256 engines */ + unsigned int max = 0, count = 0; + + info = calloc(1, size); + igt_assert(!__gem_query_engines(i915, info, size)); + + max = info->num_engines; + engines = (struct i915_engine_class_instance *)info; + for (unsigned int i = 0; i < max; i++) { + const struct i915_engine_class_instance *e = + &info->engines[i].engine; + + if (!((class_mask >> e->engine_class) & 1)) + continue; + if (!((gt_mask >> gem_engine_to_gt_map(i915, e)) & 1)) + continue; + + engines[count++] = *e; + } + + if (!count) { + free(engines); + engines = NULL; + } + + *out = count; + return engines; +} + bool gem_engine_is_equal(const struct intel_execution_engine2 *e1, const struct intel_execution_engine2 *e2) { diff --git a/lib/i915/gem_engine_topology.h b/lib/i915/gem_engine_topology.h index 987f2bf944..89642c3172 100644 --- a/lib/i915/gem_engine_topology.h +++ b/lib/i915/gem_engine_topology.h @@ -61,6 +61,12 @@ intel_get_current_physical_engine(struct intel_engine_data *ed); void intel_next_engine(struct intel_engine_data *ed); +struct i915_engine_class_instance * +gem_list_engines(int i915, + uint32_t gt_mask, + uint32_t class_mask, + unsigned int *count); + bool gem_engine_is_equal(const struct intel_execution_engine2 *e1, const struct intel_execution_engine2 *e2); -- 2.25.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 1/2] lib/i915/gem_engine_topology: list engines specific to gt 2023-04-05 6:58 ` [igt-dev] [PATCH i-g-t 1/2] lib/i915/gem_engine_topology: list engines specific to gt Vikas Srivastava @ 2023-04-07 11:03 ` Kamil Konieczny 0 siblings, 0 replies; 8+ messages in thread From: Kamil Konieczny @ 2023-04-07 11:03 UTC (permalink / raw) To: igt-dev Hi, On 2023-04-05 at 12:28:31 +0530, Vikas Srivastava wrote: > From: Riana Tauro <riana.tauro@intel.com> > > Add a function that returns all engines belonging to a gt > Currently the function is specific to MTL and returns gt id > based on engine > > Signed-off-by: Riana Tauro <riana.tauro@intel.com> > Cc: Ashutosh Dixit <ashutosh.dixit@intel.com> > Signed-off-by: Vikas Srivastava <vikas.srivastava@intel.com> > --- > lib/i915/gem_engine_topology.c | 73 ++++++++++++++++++++++++++++++++++ > lib/i915/gem_engine_topology.h | 6 +++ > 2 files changed, 79 insertions(+) > > diff --git a/lib/i915/gem_engine_topology.c b/lib/i915/gem_engine_topology.c > index ca3333c252..6c8929ec59 100644 > --- a/lib/i915/gem_engine_topology.c > +++ b/lib/i915/gem_engine_topology.c > @@ -350,6 +350,79 @@ struct intel_execution_engine2 gem_eb_flags_to_engine(unsigned int flags) > return e2__; > } > > +/* > + * MTL has two GT's, one containing render/compute/copy and the other > + * containing media engines. Return gt id based on engine. > + */ > +static int > +mtl_engine_to_gt_map(const struct i915_engine_class_instance *e) > +{ > + switch (e->engine_class) { > + case I915_ENGINE_CLASS_RENDER: > + case I915_ENGINE_CLASS_COMPUTE: > + case I915_ENGINE_CLASS_COPY: > + return 0; > + case I915_ENGINE_CLASS_VIDEO: > + case I915_ENGINE_CLASS_VIDEO_ENHANCE: > + return 1; > + default: > + igt_assert_f(0, "Unsupported engine class %d\n", e->engine_class); > + } > +} > + > +static int gem_engine_to_gt_map(int i915, const struct i915_engine_class_instance *engine) > +{ > + igt_require(IS_METEORLAKE(intel_get_drm_devid(i915))); This will make it work only for MTL so imho it needs to be improved later and also keep in mind that this should work for multi-gpu case, for example MTL with Arc 750 card(s). Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com> -- Kamil > + return mtl_engine_to_gt_map(engine); > +} > + > +/** > + * gem_list_engines: > + * @i915: i915 drm file descriptor > + * @gt_mask: gt mask > + * @class_mask: engine class mask > + * @out: returned engine count > + * > + * Returns: the list of all physical engines belonging to the gt. > + * Caller must free memory after use > + */ > +struct i915_engine_class_instance * > +gem_list_engines(int i915, > + uint32_t gt_mask, > + uint32_t class_mask, > + unsigned int *out) > +{ > + struct i915_engine_class_instance *engines; > + struct drm_i915_query_engine_info *info; > + const int size = 256 << 10; /* enough for 8 classes of 256 engines */ > + unsigned int max = 0, count = 0; > + > + info = calloc(1, size); > + igt_assert(!__gem_query_engines(i915, info, size)); > + > + max = info->num_engines; > + engines = (struct i915_engine_class_instance *)info; > + for (unsigned int i = 0; i < max; i++) { > + const struct i915_engine_class_instance *e = > + &info->engines[i].engine; > + > + if (!((class_mask >> e->engine_class) & 1)) > + continue; > + if (!((gt_mask >> gem_engine_to_gt_map(i915, e)) & 1)) > + continue; > + > + engines[count++] = *e; > + } > + > + if (!count) { > + free(engines); > + engines = NULL; > + } > + > + *out = count; > + return engines; > +} > + > bool gem_engine_is_equal(const struct intel_execution_engine2 *e1, > const struct intel_execution_engine2 *e2) > { > diff --git a/lib/i915/gem_engine_topology.h b/lib/i915/gem_engine_topology.h > index 987f2bf944..89642c3172 100644 > --- a/lib/i915/gem_engine_topology.h > +++ b/lib/i915/gem_engine_topology.h > @@ -61,6 +61,12 @@ intel_get_current_physical_engine(struct intel_engine_data *ed); > > void intel_next_engine(struct intel_engine_data *ed); > > +struct i915_engine_class_instance * > +gem_list_engines(int i915, > + uint32_t gt_mask, > + uint32_t class_mask, > + unsigned int *count); > + > bool gem_engine_is_equal(const struct intel_execution_engine2 *e1, > const struct intel_execution_engine2 *e2); > > -- > 2.25.1 > ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-04-07 11:03 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-03-13 17:59 [igt-dev] [PATCH i-g-t 1/2] lib/i915/gem_engine_topology: list engines specific to gt Vikas Srivastava 2023-03-13 17:59 ` [igt-dev] [PATCH i-g-t 2/2] lib/intel_ctx: Create intel_ctx with physical engines in a single gt Vikas Srivastava 2023-03-16 17:21 ` Kamil Konieczny 2023-03-13 18:44 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib/i915/gem_engine_topology: list engines specific to gt Patchwork 2023-03-14 18:53 ` [igt-dev] [PATCH i-g-t 1/2] " Kamil Konieczny 2023-03-14 23:06 ` [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/2] " Patchwork -- strict thread matches above, loose matches on Subject: below -- 2023-04-05 6:58 [igt-dev] [PATCH i-g-t 0/2] List engines belonging to a gt Vikas Srivastava 2023-04-05 6:58 ` [igt-dev] [PATCH i-g-t 1/2] lib/i915/gem_engine_topology: list engines specific to gt Vikas Srivastava 2023-04-07 11:03 ` Kamil Konieczny
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox