Skip to contentSkip to conversation

lib: Remove deprecated interfaces from huc_copy for Gen12+ platforms.

PATCH In review Vikas Srivastava 5 participants 9 messages Nov 16, 2022 – Nov 29, 2022 Library code

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 lib: Remove deprecated interfaces from huc_copy for Gen12+ platforms.

From: "Ye, Tony" <[email protected]>

Stop using relocs and the legacy execbuf flags.

---
 lib/huc_copy.c          | 77 +++++++++++++++++++++++++++++++++++++++++
 lib/huc_copy.h          |  4 +++
 lib/intel_batchbuffer.c |  8 +++--
 3 files changed, 87 insertions(+), 2 deletions(-)
lib/huc_copy.c +77 -0
index 6ec68864b..3b011a305 100644
@@ -26,6 +26,8 @@
 #include "drmtest.h"
 #include "huc_copy.h"
 #include "intel_allocator.h"
+#include "intel_ctx.h"
+#include "i915/gem_engine_topology.h"
 
 static void
 gen9_emit_huc_virtual_addr_state(struct drm_i915_gem_exec_object2 *src,
@@ -123,3 +125,78 @@ gen9_huc_copyfunc(int fd, uint64_t ahnd,
 
 	gem_execbuf(fd, &execbuf);
 }
+
+static void
+gen12_emit_huc_virtual_addr_state(struct drm_i915_gem_exec_object2 *src,
+		struct drm_i915_gem_exec_object2 *dst,
+		uint32_t *buf,
+		int *i)
+{
+	buf[(*i)++] = HUC_VIRTUAL_ADDR_STATE;
+
+	for (int j = 0; j < HUC_VIRTUAL_ADDR_REGION_NUM; j++) {
+		if (j == HUC_VIRTUAL_ADDR_REGION_SRC) {
+			buf[(*i)++] = src->offset;
+		} else if (j == HUC_VIRTUAL_ADDR_REGION_DST) {
+			buf[(*i)++] = dst->offset;
+		} else {
+			buf[(*i)++] = 0;
+		}
+		buf[(*i)++] = 0;
+		buf[(*i)++] = 0;
+	}
+}
+
+void
+gen12_huc_copyfunc(int fd, uint64_t ahnd,
+		  struct drm_i915_gem_exec_object2 *obj, uint64_t *objsize)
+{
+	struct drm_i915_gem_execbuffer2 execbuf;
+	int i = 0;
+	uint32_t buf[63];
+	const intel_ctx_t *ctx;
+
+	/* load huc kernel */
+	buf[i++] = HUC_IMEM_STATE;
+	buf[i++] = 0;
+	buf[i++] = 0;
+	buf[i++] = 0;
+	buf[i++] = 0x3;
+
+	buf[i++] = MFX_WAIT;
+	buf[i++] = MFX_WAIT;
+
+	buf[i++] = HUC_PIPE_MODE_SELECT;
+	buf[i++] = 0;
+	buf[i++] = 0;
+
+	buf[i++] = MFX_WAIT;
+
+	obj[0].offset = 0x200000;
+	obj[0].flags |= EXEC_OBJECT_PINNED;
+	obj[1].offset = 0x400000;
+	obj[1].flags |= EXEC_OBJECT_PINNED;
+	obj[1].flags |= EXEC_OBJECT_WRITE;
+	obj[2].offset = 0x600000;
+	obj[2].flags |= EXEC_OBJECT_PINNED;
+	gen12_emit_huc_virtual_addr_state(&obj[0], &obj[1], buf, &i);
+
+	buf[i++] = HUC_START;
+	buf[i++] = 1;
+
+	buf[i++] = MI_BATCH_BUFFER_END;
+
+	gem_write(fd, obj[2].handle, 0, buf, sizeof(buf));
+
+	memset(&execbuf, 0, sizeof(execbuf));
+	execbuf.buffers_ptr = to_user_pointer(obj);
+	execbuf.buffer_count = 3;
+	execbuf.flags = I915_EXEC_DEFAULT;
+
+	ctx = intel_ctx_create_for_engine(fd, I915_ENGINE_CLASS_VIDEO, 0);
+	execbuf.rsvd1 = ctx->id;
+
+	gem_execbuf(fd, &execbuf);
+
+	intel_ctx_destroy(fd, ctx);
+}
lib/huc_copy.h +4 -0
index 69d140933..e87e62c9c 100644
@@ -46,4 +46,8 @@ void
 gen9_huc_copyfunc(int fd, uint64_t ahnd,
 		  struct drm_i915_gem_exec_object2 *obj, uint64_t *objsize);
 
+void
+gen12_huc_copyfunc(int fd, uint64_t ahnd,
+		   struct drm_i915_gem_exec_object2 *obj, uint64_t *objsize);
+
 #endif /* HUC_COPY_H */
lib/intel_batchbuffer.c +6 -2
index 19a1fbe4d..9a855a7f0 100644
@@ -3066,14 +3066,18 @@ void intel_bb_copy_intel_buf(struct intel_bb *ibb,
  * Returns:
  *
  * The platform-specific huc copy function pointer for the device specified
- * with @devid. Will return NULL when no media spin function is implemented.
+ * with @devid. Will return NULL when no huc copy function is implemented.
  */
 igt_huc_copyfunc_t igt_get_huc_copyfunc(int devid)
 {
 	igt_huc_copyfunc_t copy = NULL;
 
-	if (IS_GEN12(devid) || IS_GEN11(devid) || IS_GEN9(devid))
+	if (AT_LEAST_GEN(devid, 12))
+		copy = gen12_huc_copyfunc;
+	else if (IS_GEN11(devid) || IS_GEN9(devid))
 		copy = gen9_huc_copyfunc;
+	else
+		copy = NULL;
 
 	return copy;
 }
Signature · 1 line
2.25.1
#1 lore raw

[igt-dev] ✓ Fi.CI.BAT: success for lib: Remove deprecated interfaces from huc_copy for Gen12+ platforms. (rev2)

== Series Details ==

== Series Details ==

Series: lib: Remove deprecated interfaces from huc_copy for Gen12+ platforms. (rev2)
URL : https://patchwork.freedesktop.org/series/110955/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12387 -> IGTPW_8115
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/index.html

Participating hosts (38 -> 40)
------------------------------

Additional (3): fi-hsw-4770 bat-kbl-2 bat-jsl-3
Missing (1): bat-dg1-6

Known issues
------------

Here are the changes found in IGTPW_8115 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_softpin@allocator-basic-reserve:
- fi-hsw-4770: NOTRUN -> [SKIP][1] ([fdo#109271]) +10 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/fi-hsw-4770/igt@[email protected]

* igt@i915_pm_backlight@basic-brightness:
- fi-hsw-4770: NOTRUN -> [SKIP][2] ([fdo#109271] / [i915#3012])
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/fi-hsw-4770/igt@[email protected]

* igt@kms_chamelium@dp-crc-fast:
- fi-hsw-4770: NOTRUN -> [SKIP][3] ([fdo#109271] / [fdo#111827]) +8 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/fi-hsw-4770/igt@[email protected]

* igt@kms_psr@sprite_plane_onoff:
- fi-hsw-4770: NOTRUN -> [SKIP][4] ([fdo#109271] / [i915#1072]) +3 similar issues
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/fi-hsw-4770/igt@kms_psr@sprite_plane_onoff.html

#### Possible fixes ####

* igt@fbdev@read:
- {bat-rpls-2}: [SKIP][5] ([i915#2582]) -> [PASS][6] +4 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12387/bat-rpls-2/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/bat-rpls-2/igt@[email protected]

* igt@gem_exec_gttfill@basic:
- fi-pnv-d510: [FAIL][7] ([i915#7229]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12387/fi-pnv-d510/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/fi-pnv-d510/igt@[email protected]

* igt@i915_selftest@live@hugepages:
- {bat-rpls-2}: [DMESG-WARN][9] ([i915#5278]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12387/bat-rpls-2/igt@i915_selftest@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/bat-rpls-2/igt@i915_selftest@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#3003]: https://gitlab.freedesktop.org/drm/intel/issues/3003
[i915#3012]: https://gitlab.freedesktop.org/drm/intel/issues/3012
[i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#5278]: https://gitlab.freedesktop.org/drm/intel/issues/5278
[i915#7229]: https://gitlab.freedesktop.org/drm/intel/issues/7229
[i915#7456]: https://gitlab.freedesktop.org/drm/intel/issues/7456

Build changes
-------------

* CI: CI-20190529 -> None
* IGT: IGT_7061 -> IGTPW_8115

CI-20190529: 20190529
CI_DRM_12387: 79ba9e9b1f528024b320900fa3e5e4e62b8301fb @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_8115: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/index.html
IGT_7061: d16e679b99d43643c3a0bcc34ec4c4f001dbbbb4 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git

Testlist changes
----------------

-igt@device_reset@cold-reset-bound
-igt@device_reset@unbind-cold-reset-rebind

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/index.html

#2 lore raw

[igt-dev] ✓ Fi.CI.IGT: success for lib: Remove deprecated interfaces from huc_copy for Gen12+ platforms. (rev2)

In reply to Vikas Srivastava
== Series Details ==

== Series Details ==

Series: lib: Remove deprecated interfaces from huc_copy for Gen12+ platforms. (rev2)
URL : https://patchwork.freedesktop.org/series/110955/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12387_full -> IGTPW_8115_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/index.html

Participating hosts (9 -> 8)
------------------------------

Additional (2): shard-rkl shard-dg1
Missing (3): pig-skl-6260u pig-kbl-iris pig-glk-j5005

Known issues
------------

Here are the changes found in IGTPW_8115_full that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_create@create-massive:
- shard-tglb: NOTRUN -> [DMESG-WARN][1] ([i915#4991])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-tglb6/igt@[email protected]

* igt@gem_ctx_param@set-priority-not-supported:
- shard-tglb: NOTRUN -> [SKIP][2] ([fdo#109314])
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-tglb3/igt@[email protected]
- shard-iclb: NOTRUN -> [SKIP][3] ([fdo#109314])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-iclb8/igt@[email protected]

* igt@gem_ctx_persistence@engines-hang@rcs0:
- shard-apl: [PASS][4] -> [FAIL][5] ([i915#2410])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12387/shard-apl6/igt@gem_ctx_persistence@[email protected]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-apl2/igt@gem_ctx_persistence@[email protected]

* igt@gem_ctx_persistence@many-contexts:
- shard-tglb: NOTRUN -> [FAIL][6] ([i915#2410])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-tglb3/igt@[email protected]

* igt@gem_exec_fair@basic-deadline:
- shard-glk: [PASS][7] -> [FAIL][8] ([i915#2846])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12387/shard-glk1/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-glk3/igt@[email protected]

* igt@gem_exec_fair@basic-pace@rcs0:
- shard-tglb: [PASS][9] -> [FAIL][10] ([i915#2842]) +1 similar issue
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12387/shard-tglb6/igt@gem_exec_fair@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-tglb2/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-pace@vcs1:
- shard-iclb: NOTRUN -> [FAIL][11] ([i915#2842])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-iclb1/igt@gem_exec_fair@[email protected]

* igt@gem_lmem_swapping@verify-random-ccs:
- shard-apl: NOTRUN -> [SKIP][12] ([fdo#109271] / [i915#4613])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-apl6/igt@[email protected]
- shard-tglb: NOTRUN -> [SKIP][13] ([i915#4613]) +1 similar issue
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-tglb7/igt@[email protected]
- shard-glk: NOTRUN -> [SKIP][14] ([fdo#109271] / [i915#4613]) +1 similar issue
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-glk9/igt@[email protected]
- shard-iclb: NOTRUN -> [SKIP][15] ([i915#4613])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-iclb5/igt@[email protected]

* igt@gem_pxp@create-regular-context-1:
- shard-iclb: NOTRUN -> [SKIP][16] ([i915#4270])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-iclb6/igt@[email protected]
- shard-tglb: NOTRUN -> [SKIP][17] ([i915#4270])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-tglb1/igt@[email protected]

* igt@gem_render_copy@x-tiled-to-vebox-y-tiled:
- shard-iclb: NOTRUN -> [SKIP][18] ([i915#768]) +1 similar issue
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-iclb6/igt@[email protected]

* igt@gem_render_copy@x-tiled-to-vebox-yf-tiled:
- shard-apl: NOTRUN -> [SKIP][19] ([fdo#109271]) +92 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-apl3/igt@[email protected]

* igt@gem_softpin@evict-single-offset:
- shard-tglb: [PASS][20] -> [FAIL][21] ([i915#4171])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12387/shard-tglb3/igt@[email protected]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-tglb3/igt@[email protected]

* igt@gen7_exec_parse@oacontrol-tracking:
- shard-tglb: NOTRUN -> [SKIP][22] ([fdo#109289])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-tglb5/igt@[email protected]
- shard-iclb: NOTRUN -> [SKIP][23] ([fdo#109289])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-iclb3/igt@[email protected]

* igt@gen9_exec_parse@batch-zero-length:
- shard-tglb: NOTRUN -> [SKIP][24] ([i915#2527] / [i915#2856])
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-tglb2/igt@[email protected]
- shard-iclb: NOTRUN -> [SKIP][25] ([i915#2856])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-iclb2/igt@[email protected]

* igt@i915_pm_rc6_residency@rc6-fence:
- shard-iclb: NOTRUN -> [WARN][26] ([i915#2684])
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-iclb2/igt@[email protected]
- shard-tglb: NOTRUN -> [WARN][27] ([i915#2681])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-tglb2/igt@[email protected]

* igt@i915_selftest@live@hangcheck:
- shard-tglb: [PASS][28] -> [DMESG-WARN][29] ([i915#5591])
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12387/shard-tglb8/igt@i915_selftest@[email protected]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-tglb5/igt@i915_selftest@[email protected]

* igt@kms_big_fb@4-tiled-addfb-size-offset-overflow:
- shard-tglb: NOTRUN -> [SKIP][30] ([i915#5286])
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-tglb5/igt@[email protected]
- shard-iclb: NOTRUN -> [SKIP][31] ([i915#5286])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-iclb8/igt@[email protected]

* igt@kms_big_fb@x-tiled-64bpp-rotate-270:
- shard-iclb: NOTRUN -> [SKIP][32] ([fdo#110725] / [fdo#111614]) +1 similar issue
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-iclb3/igt@[email protected]
- shard-tglb: NOTRUN -> [SKIP][33] ([fdo#111614]) +1 similar issue
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-tglb7/igt@[email protected]

* igt@kms_big_fb@yf-tiled-8bpp-rotate-180:
- shard-iclb: NOTRUN -> [SKIP][34] ([fdo#110723])
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-iclb1/igt@[email protected]

* igt@kms_big_fb@yf-tiled-8bpp-rotate-270:
- shard-tglb: NOTRUN -> [SKIP][35] ([fdo#111615]) +1 similar issue
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-tglb1/igt@[email protected]

* igt@kms_ccs@pipe-a-bad-aux-stride-y_tiled_gen12_rc_ccs_cc:
- shard-glk: NOTRUN -> [SKIP][36] ([fdo#109271] / [i915#3886]) +3 similar issues
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-glk1/igt@kms_ccs@pipe-a-bad-aux-stride-y_tiled_gen12_rc_ccs_cc.html

* igt@kms_ccs@pipe-a-bad-pixel-format-4_tiled_dg2_mc_ccs:
- shard-tglb: NOTRUN -> [SKIP][37] ([i915#6095]) +2 similar issues
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-tglb1/igt@kms_ccs@pipe-a-bad-pixel-format-4_tiled_dg2_mc_ccs.html

* igt@kms_ccs@pipe-a-crc-primary-rotation-180-4_tiled_dg2_mc_ccs:
- shard-tglb: NOTRUN -> [SKIP][38] ([i915#3689] / [i915#6095]) +1 similar issue
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-tglb5/igt@kms_ccs@pipe-a-crc-primary-rotation-180-4_tiled_dg2_mc_ccs.html

* igt@kms_ccs@pipe-a-crc-primary-rotation-180-y_tiled_gen12_rc_ccs_cc:
- shard-apl: NOTRUN -> [SKIP][39] ([fdo#109271] / [i915#3886]) +3 similar issues
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-apl8/igt@kms_ccs@pipe-a-crc-primary-rotation-180-y_tiled_gen12_rc_ccs_cc.html

* igt@kms_ccs@pipe-a-random-ccs-data-y_tiled_gen12_mc_ccs:
- shard-tglb: NOTRUN -> [SKIP][40] ([i915#3689] / [i915#3886])
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-tglb5/igt@kms_ccs@pipe-a-random-ccs-data-y_tiled_gen12_mc_ccs.html

* igt@kms_ccs@pipe-c-random-ccs-data-y_tiled_gen12_rc_ccs_cc:
- shard-iclb: NOTRUN -> [SKIP][41] ([fdo#109278] / [i915#3886])
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-iclb2/igt@kms_ccs@pipe-c-random-ccs-data-y_tiled_gen12_rc_ccs_cc.html

* igt@kms_ccs@pipe-d-bad-pixel-format-4_tiled_dg2_mc_ccs:
- shard-tglb: NOTRUN -> [SKIP][42] ([i915#3689]) +1 similar issue
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-tglb1/igt@kms_ccs@pipe-d-bad-pixel-format-4_tiled_dg2_mc_ccs.html

* igt@kms_ccs@pipe-d-crc-primary-rotation-180-4_tiled_dg2_mc_ccs:
- shard-iclb: NOTRUN -> [SKIP][43] ([fdo#109278]) +3 similar issues
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-iclb6/igt@kms_ccs@pipe-d-crc-primary-rotation-180-4_tiled_dg2_mc_ccs.html

* igt@kms_chamelium@dp-hpd-storm:
- shard-snb: NOTRUN -> [SKIP][44] ([fdo#109271] / [fdo#111827])
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-snb7/igt@[email protected]
- shard-iclb: NOTRUN -> [SKIP][45] ([fdo#109284] / [fdo#111827])
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-iclb8/igt@[email protected]

* igt@kms_chamelium@hdmi-audio-edid:
- shard-tglb: NOTRUN -> [SKIP][46] ([fdo#109284] / [fdo#111827]) +1 similar issue
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-tglb5/igt@[email protected]

* igt@kms_chamelium@hdmi-crc-nonplanar-formats:
- shard-glk: NOTRUN -> [SKIP][47] ([fdo#109271] / [fdo#111827]) +1 similar issue
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-glk7/igt@[email protected]

* igt@kms_chamelium@hdmi-hpd-for-each-pipe:
- shard-apl: NOTRUN -> [SKIP][48] ([fdo#109271] / [fdo#111827]) +4 similar issues
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-apl8/igt@[email protected]

* igt@kms_color@ctm-0-25@pipe-b-edp-1:
- shard-iclb: NOTRUN -> [FAIL][49] ([i915#315] / [i915#6946]) +2 similar issues
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-iclb6/igt@kms_color@[email protected]

* igt@kms_color@ctm-0-25@pipe-c-edp-1:
- shard-tglb: NOTRUN -> [FAIL][50] ([i915#315] / [i915#6946]) +3 similar issues
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-tglb1/igt@kms_color@[email protected]

* igt@kms_content_protection@atomic-dpms:
- shard-snb: NOTRUN -> [SKIP][51] ([fdo#109271]) +54 similar issues
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-snb7/igt@[email protected]
- shard-tglb: NOTRUN -> [SKIP][52] ([i915#7118])
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-tglb3/igt@[email protected]
- shard-iclb: NOTRUN -> [SKIP][53] ([i915#7118])
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-iclb8/igt@[email protected]

* igt@kms_content_protection@atomic-dpms@pipe-a-dp-1:
- shard-apl: NOTRUN -> [TIMEOUT][54] ([i915#7173])
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-apl1/igt@kms_content_protection@[email protected]

* igt@kms_cursor_crc@cursor-onscreen-max-size:
- shard-iclb: NOTRUN -> [SKIP][55] ([i915#3555]) +1 similar issue
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-iclb2/igt@[email protected]
- shard-tglb: NOTRUN -> [SKIP][56] ([i915#3555])
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-tglb2/igt@[email protected]

* igt@kms_cursor_legacy@flip-vs-cursor@atomic-transitions-varying-size:
- shard-glk: [PASS][57] -> [FAIL][58] ([i915#2346]) +1 similar issue
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12387/shard-glk7/igt@kms_cursor_legacy@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-glk5/igt@kms_cursor_legacy@[email protected]

* igt@kms_flip@2x-busy-flip:
- shard-tglb: NOTRUN -> [SKIP][59] ([fdo#109274] / [fdo#111825] / [i915#3637])
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-tglb6/igt@[email protected]

* igt@kms_flip@flip-vs-suspend@b-dp1:
- shard-apl: [PASS][60] -> [DMESG-WARN][61] ([i915#180]) +1 similar issue
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12387/shard-apl8/igt@kms_flip@[email protected]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-apl6/igt@kms_flip@[email protected]

* igt@kms_flip_scaled_crc@flip-64bpp-4tile-to-32bpp-4tiledg2rcccs-downscaling@pipe-a-valid-mode:
- shard-iclb: NOTRUN -> [SKIP][62] ([i915#2587] / [i915#2672]) +4 similar issues
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-iclb7/igt@kms_flip_scaled_crc@flip-64bpp-4tile-to-32bpp-4tiledg2rcccs-downscaling@pipe-a-valid-mode.html

* igt@kms_flip_scaled_crc@flip-64bpp-yftile-to-16bpp-yftile-upscaling@pipe-a-valid-mode:
- shard-tglb: NOTRUN -> [SKIP][63] ([i915#2587] / [i915#2672])
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-tglb1/igt@kms_flip_scaled_crc@flip-64bpp-yftile-to-16bpp-yftile-upscaling@pipe-a-valid-mode.html

* igt@kms_flip_scaled_crc@flip-64bpp-yftile-to-32bpp-yftile-upscaling@pipe-a-default-mode:
- shard-iclb: NOTRUN -> [SKIP][64] ([i915#2672]) +3 similar issues
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-iclb3/igt@kms_flip_scaled_crc@flip-64bpp-yftile-to-32bpp-yftile-upscaling@pipe-a-default-mode.html

* igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-spr-indfb-draw-blt:
- shard-tglb: NOTRUN -> [SKIP][65] ([fdo#109280] / [fdo#111825]) +15 similar issues
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-tglb1/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-shrfb-pgflip-blt:
- shard-tglb: NOTRUN -> [SKIP][66] ([i915#6497]) +1 similar issue
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-tglb1/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-shrfb-pgflip-blt.html

* igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-indfb-draw-mmap-wc:
- shard-glk: NOTRUN -> [SKIP][67] ([fdo#109271]) +70 similar issues
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-glk6/igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-indfb-draw-mmap-wc.html

* igt@kms_frontbuffer_tracking@psr-2p-pri-indfb-multidraw:
- shard-iclb: NOTRUN -> [SKIP][68] ([fdo#109280]) +8 similar issues
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-iclb2/igt@[email protected]

* igt@kms_invalid_mode@clock-too-high@edp-1-pipe-d:
- shard-tglb: NOTRUN -> [SKIP][69] ([i915#6403]) +3 similar issues
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-tglb6/igt@kms_invalid_mode@[email protected]

* igt@kms_plane_lowres@tiling-y@pipe-c-edp-1:
- shard-tglb: NOTRUN -> [SKIP][70] ([i915#3536]) +3 similar issues
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-tglb2/igt@kms_plane_lowres@[email protected]

* igt@kms_plane_scaling@planes-upscale-20x20-downscale-factor-0-25@pipe-c-edp-1:
- shard-tglb: NOTRUN -> [SKIP][71] ([i915#5235]) +3 similar issues
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-tglb3/igt@kms_plane_scaling@[email protected]
- shard-iclb: NOTRUN -> [SKIP][72] ([i915#5235]) +2 similar issues
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-iclb8/igt@kms_plane_scaling@[email protected]

* igt@kms_plane_scaling@planes-upscale-20x20-downscale-factor-0-5@pipe-b-edp-1:
- shard-iclb: [PASS][73] -> [SKIP][74] ([i915#5235]) +2 similar issues
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12387/shard-iclb3/igt@kms_plane_scaling@[email protected]
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-iclb2/igt@kms_plane_scaling@[email protected]

* igt@kms_psr2_sf@cursor-plane-move-continuous-sf:
- shard-glk: NOTRUN -> [SKIP][75] ([fdo#109271] / [i915#658]) +1 similar issue
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-glk6/igt@[email protected]

* igt@kms_psr@psr2_cursor_blt:
- shard-iclb: [PASS][76] -> [SKIP][77] ([fdo#109441]) +3 similar issues
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12387/shard-iclb2/igt@kms_psr@psr2_cursor_blt.html
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-iclb3/igt@kms_psr@psr2_cursor_blt.html

* igt@kms_psr@psr2_primary_render:
- shard-tglb: NOTRUN -> [FAIL][78] ([i915#132] / [i915#3467])
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-tglb8/igt@kms_psr@psr2_primary_render.html

* igt@kms_psr_stress_test@invalidate-primary-flip-overlay:
- shard-iclb: [PASS][79] -> [SKIP][80] ([i915#5519])
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12387/shard-iclb1/igt@[email protected]
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-iclb6/igt@[email protected]

* igt@kms_rotation_crc@multiplane-rotation-cropping-top:
- shard-glk: [PASS][81] -> [DMESG-FAIL][82] ([i915#118])
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12387/shard-glk3/igt@[email protected]
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-glk5/igt@[email protected]

* igt@prime_udl:
- shard-tglb: NOTRUN -> [SKIP][83] ([fdo#109291])
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-tglb6/igt@prime_udl.html
- shard-iclb: NOTRUN -> [SKIP][84] ([fdo#109291])
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-iclb7/igt@prime_udl.html

* igt@sysfs_clients@recycle-many:
- shard-apl: NOTRUN -> [SKIP][85] ([fdo#109271] / [i915#2994])
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-apl3/igt@[email protected]

#### Possible fixes ####

* igt@gem_exec_balancer@parallel-contexts:
- shard-iclb: [SKIP][86] ([i915#4525]) -> [PASS][87] +1 similar issue
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12387/shard-iclb3/igt@[email protected]
[87]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-iclb2/igt@[email protected]

* igt@gem_exec_fair@basic-flow@rcs0:
- shard-tglb: [FAIL][88] ([i915#2842]) -> [PASS][89] +1 similar issue
[88]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12387/shard-tglb8/igt@gem_exec_fair@[email protected]
[89]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-tglb8/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-pace-solo@rcs0:
- shard-apl: [FAIL][90] ([i915#2842]) -> [PASS][91]
[90]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12387/shard-apl6/igt@gem_exec_fair@[email protected]
[91]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-apl1/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-pace@rcs0:
- shard-glk: [FAIL][92] ([i915#2842]) -> [PASS][93] +1 similar issue
[92]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12387/shard-glk2/igt@gem_exec_fair@[email protected]
[93]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-glk8/igt@gem_exec_fair@[email protected]

* igt@gem_exec_whisper@basic-fds-forked-all:
- shard-tglb: [INCOMPLETE][94] -> [PASS][95]
[94]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12387/shard-tglb1/igt@[email protected]
[95]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-tglb6/igt@[email protected]

* igt@i915_pm_dc@dc6-psr:
- shard-iclb: [FAIL][96] ([i915#3989] / [i915#454]) -> [PASS][97]
[96]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12387/shard-iclb5/igt@[email protected]
[97]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-iclb7/igt@[email protected]

* igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@bc-hdmi-a1-hdmi-a2:
- shard-glk: [FAIL][98] ([i915#79]) -> [PASS][99] +1 similar issue
[98]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12387/shard-glk7/igt@kms_flip@[email protected]
[99]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-glk9/igt@kms_flip@[email protected]

* igt@kms_flip@flip-vs-suspend@c-dp1:
- shard-apl: [DMESG-WARN][100] ([i915#180]) -> [PASS][101]
[100]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12387/shard-apl8/igt@kms_flip@[email protected]
[101]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-apl6/igt@kms_flip@[email protected]

* igt@kms_psr@psr2_basic:
- shard-iclb: [SKIP][102] ([fdo#109441]) -> [PASS][103] +1 similar issue
[102]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12387/shard-iclb6/igt@kms_psr@psr2_basic.html
[103]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-iclb2/igt@kms_psr@psr2_basic.html

#### Warnings ####

* igt@gem_exec_fair@basic-none@rcs0:
- shard-tglb: [FAIL][104] ([i915#2842]) -> [SKIP][105] ([i915#2848])
[104]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12387/shard-tglb3/igt@gem_exec_fair@[email protected]
[105]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-tglb6/igt@gem_exec_fair@[email protected]

* igt@gem_pread@exhaustion:
- shard-apl: [WARN][106] ([i915#2658]) -> [INCOMPLETE][107] ([i915#7248]) +1 similar issue
[106]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12387/shard-apl2/igt@[email protected]
[107]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-apl1/igt@[email protected]
- shard-glk: [WARN][108] ([i915#2658]) -> [INCOMPLETE][109] ([i915#7248]) +1 similar issue
[108]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12387/shard-glk9/igt@[email protected]
[109]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-glk7/igt@[email protected]

* igt@kms_plane_alpha_blend@alpha-basic@pipe-c-dp-1:
- shard-apl: [FAIL][110] ([i915#4573]) -> [DMESG-FAIL][111] ([IGT#6]) +1 similar issue
[110]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12387/shard-apl7/igt@kms_plane_alpha_blend@[email protected]
[111]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-apl3/igt@kms_plane_alpha_blend@[email protected]

* igt@kms_psr2_sf@cursor-plane-update-sf:
- shard-iclb: [SKIP][112] ([fdo#111068] / [i915#658]) -> [SKIP][113] ([i915#2920])
[112]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12387/shard-iclb8/igt@[email protected]
[113]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-iclb2/igt@[email protected]

* igt@kms_psr2_sf@overlay-plane-move-continuous-exceed-sf:
- shard-iclb: [SKIP][114] ([i915#658]) -> [SKIP][115] ([i915#2920])
[114]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12387/shard-iclb6/igt@[email protected]
[115]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-iclb2/igt@[email protected]

* igt@kms_psr2_sf@overlay-plane-move-continuous-sf:
- shard-iclb: [SKIP][116] ([i915#2920]) -> [SKIP][117] ([i915#658])
[116]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12387/shard-iclb2/igt@[email protected]
[117]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/shard-iclb3/igt@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[IGT#6]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/6
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
[fdo#109283]: https://bugs.freedesktop.org/show_bug.cgi?id=109283
[fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109291]: https://bugs.freedesktop.org/show_bug.cgi?id=109291
[fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[fdo#109302]: https://bugs.freedesktop.org/show_bug.cgi?id=109302
[fdo#109303]: https://bugs.freedesktop.org/show_bug.cgi?id=109303
[fdo#109308]: https://bugs.freedesktop.org/show_bug.cgi?id=109308
[fdo#109309]: https://bugs.freedesktop.org/show_bug.cgi?id=109309
[fdo#109312]: https://bugs.freedesktop.org/show_bug.cgi?id=109312
[fdo#109314]: https://bugs.freedesktop.org/show_bug.cgi?id=109314
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109506]: https://bugs.freedesktop.org/show_bug.cgi?id=109506
[fdo#110542]: https://bugs.freedesktop.org/show_bug.cgi?id=110542
[fdo#110723]: https://bugs.freedesktop.org/show_bug.cgi?id=110723
[fdo#110725]: https://bugs.freedesktop.org/show_bug.cgi?id=110725
[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#111656]: https://bugs.freedesktop.org/show_bug.cgi?id=111656
[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#1155]: https://gitlab.freedesktop.org/drm/intel/issues/1155
[i915#118]: https://gitlab.freedesktop.org/drm/intel/issues/118
[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#1755]: https://gitlab.freedesktop.org/drm/intel/issues/1755
[i915#1769]: https://gitlab.freedesktop.org/drm/intel/issues/1769
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[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#1937]: https://gitlab.freedesktop.org/drm/intel/issues/1937
[i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
[i915#2410]: https://gitlab.freedesktop.org/drm/intel/issues/2410
[i915#2433]: https://gitlab.freedesktop.org/drm/intel/issues/2433
[i915#2434]: https://gitlab.freedesktop.org/drm/intel/issues/2434
[i915#2437]: https://gitlab.freedesktop.org/drm/intel/issues/2437
[i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#2587]: https://gitlab.freedesktop.org/drm/intel/issues/2587
[i915#2658]: https://gitlab.freedesktop.org/drm/intel/issues/2658
[i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
[i915#2681]: https://gitlab.freedesktop.org/drm/intel/issues/2681
[i915#2684]: https://gitlab.freedesktop.org/drm/intel/issues/2684
[i915#2705]: https://gitlab.freedesktop.org/drm/intel/issues/2705
[i915#280]: https://gitlab.freedesktop.org/drm/intel/issues/280
[i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
[i915#2846]: https://gitlab.freedesktop.org/drm/intel/issues/2846
[i915#2848]: https://gitlab.freedesktop.org/drm/intel/issues/2848
[i915#2856]: https://gitlab.freedesktop.org/drm/intel/issues/2856
[i915#2920]: https://gitlab.freedesktop.org/drm/intel/issues/2920
[i915#2994]: https://gitlab.freedesktop.org/drm/intel/issues/2994
[i915#3002]: https://gitlab.freedesktop.org/drm/intel/issues/3002
[i915#3012]: https://gitlab.freedesktop.org/drm/intel/issues/3012
[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#3323]: https://gitlab.freedesktop.org/drm/intel/issues/3323
[i915#3359]: https://gitlab.freedesktop.org/drm/intel/issues/3359
[i915#3458]: https://gitlab.freedesktop.org/drm/intel/issues/3458
[i915#3467]: https://gitlab.freedesktop.org/drm/intel/issues/3467
[i915#3469]: https://gitlab.freedesktop.org/drm/intel/issues/3469
[i915#3528]: https://gitlab.freedesktop.org/drm/intel/issues/3528
[i915#3536]: https://gitlab.freedesktop.org/drm/intel/issues/3536
[i915#3539]: https://gitlab.freedesktop.org/drm/intel/issues/3539
[i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
[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#3639]: https://gitlab.freedesktop.org/drm/intel/issues/3639
[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#3826]: https://gitlab.freedesktop.org/drm/intel/issues/3826
[i915#3840]: https://gitlab.freedesktop.org/drm/intel/issues/3840
[i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
[i915#3936]: https://gitlab.freedesktop.org/drm/intel/issues/3936
[i915#3952]: https://gitlab.freedesktop.org/drm/intel/issues/3952
[i915#3989]: https://gitlab.freedesktop.org/drm/intel/issues/3989
[i915#404]: https://gitlab.freedesktop.org/drm/intel/issues/404
[i915#4070]: https://gitlab.freedesktop.org/drm/intel/issues/4070
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
[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#4171]: https://gitlab.freedesktop.org/drm/intel/issues/4171
[i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
[i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213
[i915#4215]: https://gitlab.freedesktop.org/drm/intel/issues/4215
[i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4391]: https://gitlab.freedesktop.org/drm/intel/issues/4391
[i915#4525]: https://gitlab.freedesktop.org/drm/intel/issues/4525
[i915#4538]: https://gitlab.freedesktop.org/drm/intel/issues/4538
[i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
[i915#4565]: https://gitlab.freedesktop.org/drm/intel/issues/4565
[i915#4573]: https://gitlab.freedesktop.org/drm/intel/issues/4573
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4767]: https://gitlab.freedesktop.org/drm/intel/issues/4767
[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#4854]: https://gitlab.freedesktop.org/drm/intel/issues/4854
[i915#4859]: https://gitlab.freedesktop.org/drm/intel/issues/4859
[i915#4860]: https://gitlab.freedesktop.org/drm/intel/issues/4860
[i915#4873]: https://gitlab.freedesktop.org/drm/intel/issues/4873
[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#4885]: https://gitlab.freedesktop.org/drm/intel/issues/4885
[i915#4936]: https://gitlab.freedesktop.org/drm/intel/issues/4936
[i915#4991]: https://gitlab.freedesktop.org/drm/intel/issues/4991
[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#5461]: https://gitlab.freedesktop.org/drm/intel/issues/5461
[i915#5519]: https://gitlab.freedesktop.org/drm/intel/issues/5519
[i915#5563]: https://gitlab.freedesktop.org/drm/intel/issues/5563
[i915#5591]: https://gitlab.freedesktop.org/drm/intel/issues/5591
[i915#5723]: https://gitlab.freedesktop.org/drm/intel/issues/5723
[i915#5784]: https://gitlab.freedesktop.org/drm/intel/issues/5784
[i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
[i915#6227]: https://gitlab.freedesktop.org/drm/intel/issues/6227
[i915#6230]: https://gitlab.freedesktop.org/drm/intel/issues/6230
[i915#6245]: https://gitlab.freedesktop.org/drm/intel/issues/6245
[i915#6248]: https://gitlab.freedesktop.org/drm/intel/issues/6248
[i915#6251]: https://gitlab.freedesktop.org/drm/intel/issues/6251
[i915#6252]: https://gitlab.freedesktop.org/drm/intel/issues/6252
[i915#6259]: https://gitlab.freedesktop.org/drm/intel/issues/6259
[i915#6334]: https://gitlab.freedesktop.org/drm/intel/issues/6334
[i915#6335]: https://gitlab.freedesktop.org/drm/intel/issues/6335
[i915#6344]: https://gitlab.freedesktop.org/drm/intel/issues/6344
[i915#6403]: https://gitlab.freedesktop.org/drm/intel/issues/6403
[i915#6412]: https://gitlab.freedesktop.org/drm/intel/issues/6412
[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#6590]: https://gitlab.freedesktop.org/drm/intel/issues/6590
[i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
[i915#6768]: https://gitlab.freedesktop.org/drm/intel/issues/6768
[i915#6946]: https://gitlab.freedesktop.org/drm/intel/issues/6946
[i915#7037]: https://gitlab.freedesktop.org/drm/intel/issues/7037
[i915#7116]: https://gitlab.freedesktop.org/drm/intel/issues/7116
[i915#7118]: https://gitlab.freedesktop.org/drm/intel/issues/7118
[i915#7173]: https://gitlab.freedesktop.org/drm/intel/issues/7173
[i915#7178]: https://gitlab.freedesktop.org/drm/intel/issues/7178
[i915#7248]: https://gitlab.freedesktop.org/drm/intel/issues/7248
[i915#7456]: https://gitlab.freedesktop.org/drm/intel/issues/7456
[i915#7468]: https://gitlab.freedesktop.org/drm/intel/issues/7468
[i915#768]: https://gitlab.freedesktop.org/drm/intel/issues/768
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79

Build changes
-------------

* CI: CI-20190529 -> None
* IGT: IGT_7061 -> IGTPW_8115
* Piglit: piglit_4509 -> None

CI-20190529: 20190529
CI_DRM_12387: 79ba9e9b1f528024b320900fa3e5e4e62b8301fb @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_8115: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8115/index.html
IGT_7061: d16e679b99d43643c3a0bcc34ec4c4f001dbbbb4 @ 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_8115/index.html

#3 lore raw
In reply to Vikas Srivastava

Hi,

please change subject of this commit, there are no changes in old huc_copy in this patch. Also remove dot from end of the Subject: line, s/platforms./platforms/

Quoted 3 lines · Vikas Srivastava

From: "Ye, Tony" <[email protected]>

Stop using relocs and the legacy execbuf flags.

You should put here a little more explanation, as I see this it is rather

Add new huc_copy for gen12+ with no-relocs and no legacy flags

and there are no changes in old code (except for adding that AT_LEAST_GEN(12)).

Quoted 30 lines
---
 lib/huc_copy.c          | 77 +++++++++++++++++++++++++++++++++++++++++
 lib/huc_copy.h          |  4 +++
 lib/intel_batchbuffer.c |  8 +++--
 3 files changed, 87 insertions(+), 2 deletions(-)
lib/huc_copy.c +4 -0
index 6ec68864b..3b011a305 100644
@@ -26,6 +26,8 @@
 #include "drmtest.h"
 #include "huc_copy.h"
 #include "intel_allocator.h"
+#include "intel_ctx.h"
+#include "i915/gem_engine_topology.h"
 
 static void
 gen9_emit_huc_virtual_addr_state(struct drm_i915_gem_exec_object2 *src,
@@ -123,3 +125,78 @@ gen9_huc_copyfunc(int fd, uint64_t ahnd,
 
 	gem_execbuf(fd, &execbuf);
 }
+
+static void

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 139

Quoted 10 lines
lib/huc_copy.c +10 -0
+gen12_emit_huc_virtual_addr_state(struct drm_i915_gem_exec_object2 *src,
+		struct drm_i915_gem_exec_object2 *dst,
+		uint32_t *buf,
+		int *i)
+{
+	buf[(*i)++] = HUC_VIRTUAL_ADDR_STATE;
+
+	for (int j = 0; j < HUC_VIRTUAL_ADDR_REGION_NUM; j++) {
+		if (j == HUC_VIRTUAL_ADDR_REGION_SRC) {
+			buf[(*i)++] = src->offset;

Addr is 48-bit and here we copy only lower 32-bit, this may work with relocs but not with pinned addresses.

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 141

Quoted 2 lines
lib/huc_copy.c +2 -0
+		} else if (j == HUC_VIRTUAL_ADDR_REGION_DST) {
+			buf[(*i)++] = dst->offset;

Same here.

Quoted 24 lines
lib/huc_copy.c +24 -0
+		} else {
+			buf[(*i)++] = 0;
+		}
+		buf[(*i)++] = 0;
+		buf[(*i)++] = 0;
+	}
+}
+
+void
+gen12_huc_copyfunc(int fd, uint64_t ahnd,
+		  struct drm_i915_gem_exec_object2 *obj, uint64_t *objsize)
+{
+	struct drm_i915_gem_execbuffer2 execbuf;
+	int i = 0;
+	uint32_t buf[63];
+	const intel_ctx_t *ctx;
+
+	/* load huc kernel */
+	buf[i++] = HUC_IMEM_STATE;
+	buf[i++] = 0;
+	buf[i++] = 0;
+	buf[i++] = 0;
+	buf[i++] = 0x3;
+

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 175

Quoted 10 lines
lib/huc_copy.c +10 -0
+	buf[i++] = MFX_WAIT;
+	buf[i++] = MFX_WAIT;
+
+	buf[i++] = HUC_PIPE_MODE_SELECT;
+	buf[i++] = 0;
+	buf[i++] = 0;
+
+	buf[i++] = MFX_WAIT;
+
+	obj[0].offset = 0x200000;

----------------------- ^
Use ahnd as in gen9_huc_copy (without reloc code).

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 176

Quoted 1 line
lib/huc_copy.c +1 -0
+	obj[0].flags |= EXEC_OBJECT_PINNED;

Add also:
| EXEC_OBJECT_SUPPORTS_48B_ADDRESS

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 177

Quoted 1 line
lib/huc_copy.c +1 -0
+	obj[1].offset = 0x400000;

Same here.

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 179

Quoted 2 lines
lib/huc_copy.c +2 -0
+	obj[1].flags |= EXEC_OBJECT_PINNED;
+	obj[1].flags |= EXEC_OBJECT_WRITE;

Add also
| EXEC_OBJECT_SUPPORTS_48B_ADDRESS

and maybe make it one bit-or like:

	obj[1].flags |= EXEC_OBJECT_PINNED | EXEC_OBJECT_WRITE |
			EXEC_OBJECT_SUPPORTS_48B_ADDRESS;

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 180

Quoted 1 line
lib/huc_copy.c +1 -0
+	obj[2].offset = 0x600000;

Same here.

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 181

Quoted 1 line
lib/huc_copy.c +1 -0
+	obj[2].flags |= EXEC_OBJECT_PINNED;

Same here (48-bit).

Regards,
Kamil

Quoted 62 lines
lib/huc_copy.c +21 -0
+	gen12_emit_huc_virtual_addr_state(&obj[0], &obj[1], buf, &i);
+
+	buf[i++] = HUC_START;
+	buf[i++] = 1;
+
+	buf[i++] = MI_BATCH_BUFFER_END;
+
+	gem_write(fd, obj[2].handle, 0, buf, sizeof(buf));
+
+	memset(&execbuf, 0, sizeof(execbuf));
+	execbuf.buffers_ptr = to_user_pointer(obj);
+	execbuf.buffer_count = 3;
+	execbuf.flags = I915_EXEC_DEFAULT;
+
+	ctx = intel_ctx_create_for_engine(fd, I915_ENGINE_CLASS_VIDEO, 0);
+	execbuf.rsvd1 = ctx->id;
+
+	gem_execbuf(fd, &execbuf);
+
+	intel_ctx_destroy(fd, ctx);
+}
lib/huc_copy.h +4 -0
index 69d140933..e87e62c9c 100644
@@ -46,4 +46,8 @@ void
 gen9_huc_copyfunc(int fd, uint64_t ahnd,
 		  struct drm_i915_gem_exec_object2 *obj, uint64_t *objsize);
 
+void
+gen12_huc_copyfunc(int fd, uint64_t ahnd,
+		   struct drm_i915_gem_exec_object2 *obj, uint64_t *objsize);
+
 #endif /* HUC_COPY_H */
lib/intel_batchbuffer.c +6 -2
index 19a1fbe4d..9a855a7f0 100644
@@ -3066,14 +3066,18 @@ void intel_bb_copy_intel_buf(struct intel_bb *ibb,
  * Returns:
  *
  * The platform-specific huc copy function pointer for the device specified
- * with @devid. Will return NULL when no media spin function is implemented.
+ * with @devid. Will return NULL when no huc copy function is implemented.
  */
 igt_huc_copyfunc_t igt_get_huc_copyfunc(int devid)
 {
 	igt_huc_copyfunc_t copy = NULL;
 
-	if (IS_GEN12(devid) || IS_GEN11(devid) || IS_GEN9(devid))
+	if (AT_LEAST_GEN(devid, 12))
+		copy = gen12_huc_copyfunc;
+	else if (IS_GEN11(devid) || IS_GEN9(devid))
 		copy = gen9_huc_copyfunc;
+	else
+		copy = NULL;
 
 	return copy;
 }
Signature · 1 line
2.25.1
#4 lore raw
Quoted 9 lines · Kamil Konieczny

Hi,

please change subject of this commit, there are no changes in old huc_copy in this patch. Also remove dot from end of the Subject: line, s/platforms./platforms/

Quoted 2 lines · Vikas Srivastava

From: "Ye, Tony" <[email protected]>

Quoted 8 lines
Quoted 1 line

Stop using relocs and the legacy execbuf flags.

You should put here a little more explanation, as I see this it is rather

Add new huc_copy for gen12+ with no-relocs and no legacy flags

and there are no changes in old code (except for adding that AT_LEAST_GEN(12)).

The patch is to switch to softpin from relocations in the huc_copy test on Gen12+. The old platforms stay with relocations. See the change in the igt_get_huc_copyfunc function.

Quoted 26 lines
Quoted 26 lines
---
  lib/huc_copy.c          | 77 +++++++++++++++++++++++++++++++++++++++++
  lib/huc_copy.h          |  4 +++
  lib/intel_batchbuffer.c |  8 +++--
  3 files changed, 87 insertions(+), 2 deletions(-)
lib/huc_copy.c +2 -0
index 6ec68864b..3b011a305 100644
@@ -26,6 +26,8 @@
  #include "drmtest.h"
  #include "huc_copy.h"
  #include "intel_allocator.h"
+#include "intel_ctx.h"
+#include "i915/gem_engine_topology.h"
 
  static void
  gen9_emit_huc_virtual_addr_state(struct drm_i915_gem_exec_object2 *src,
@@ -123,3 +125,78 @@ gen9_huc_copyfunc(int fd, uint64_t ahnd,
 
Quoted 16 lines
Quoted 4 lines
lib/huc_copy.c +2 -0
  	gem_execbuf(fd, &execbuf);
  }
+
+static void

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 139

Quoted 10 lines
lib/huc_copy.c +10 -0
+gen12_emit_huc_virtual_addr_state(struct drm_i915_gem_exec_object2 *src,
+		struct drm_i915_gem_exec_object2 *dst,
+		uint32_t *buf,
+		int *i)
+{
+	buf[(*i)++] = HUC_VIRTUAL_ADDR_STATE;
+
+	for (int j = 0; j < HUC_VIRTUAL_ADDR_REGION_NUM; j++) {
+		if (j == HUC_VIRTUAL_ADDR_REGION_SRC) {
+			buf[(*i)++] = src->offset;

Addr is 48-bit and here we copy only lower 32-bit, this may work with relocs but not with pinned addresses.

The test only uses 3 addresses: 2M, 4M, 6M. So 48b flag is not set and we only copy the lower 32 bits.

Quoted 33 lines

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 141

Quoted 3 lines
lib/huc_copy.c +2 -0
+		} else if (j == HUC_VIRTUAL_ADDR_REGION_DST) {
+			buf[(*i)++] = dst->offset;

Same here.

Quoted 28 lines
lib/huc_copy.c +28 -0
+		} else {
+			buf[(*i)++] = 0;
+		}
+		buf[(*i)++] = 0;
+		buf[(*i)++] = 0;
+	}
+}
+
+void
+gen12_huc_copyfunc(int fd, uint64_t ahnd,
+		  struct drm_i915_gem_exec_object2 *obj, uint64_t *objsize)
+{
+	struct drm_i915_gem_execbuffer2 execbuf;
+	int i = 0;
+	uint32_t buf[63];
+	const intel_ctx_t *ctx;
+
+	/* load huc kernel */
+	buf[i++] = HUC_IMEM_STATE;
+	buf[i++] = 0;
+	buf[i++] = 0;
+	buf[i++] = 0;
+	buf[i++] = 0x3;
+
+	buf[i++] = MFX_WAIT;
+	buf[i++] = MFX_WAIT;
+
+	buf[i++] = HUC_PIPE_MODE_SELECT;
Quoted 8 lines

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 175

Quoted 6 lines
lib/huc_copy.c +6 -0
+	buf[i++] = 0;
+	buf[i++] = 0;
+
+	buf[i++] = MFX_WAIT;
+
+	obj[0].offset = 0x200000;

----------------------- ^
Use ahnd as in gen9_huc_copy (without reloc code).

The code here is simply assigning a graphics virtual address to the source buffer object.

Quoted 3 lines

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 176

Quoted 1 line
lib/huc_copy.c +1 -0
+	obj[0].flags |= EXEC_OBJECT_PINNED;

Add also:
| EXEC_OBJECT_SUPPORTS_48B_ADDRESS

As explained above,  we don't need 48b address.

Quoted 71 lines

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 177

Quoted 2 lines
lib/huc_copy.c +1 -0
+	obj[1].offset = 0x400000;

Same here.

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 179

Quoted 2 lines
lib/huc_copy.c +2 -0
+	obj[1].flags |= EXEC_OBJECT_PINNED;
+	obj[1].flags |= EXEC_OBJECT_WRITE;

Add also
| EXEC_OBJECT_SUPPORTS_48B_ADDRESS

and maybe make it one bit-or like:

	obj[1].flags |= EXEC_OBJECT_PINNED | EXEC_OBJECT_WRITE |
			EXEC_OBJECT_SUPPORTS_48B_ADDRESS;

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 180

Quoted 1 line
lib/huc_copy.c +1 -0
+	obj[2].offset = 0x600000;

Same here.

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 181

Quoted 1 line
lib/huc_copy.c +1 -0
+	obj[2].flags |= EXEC_OBJECT_PINNED;

Same here (48-bit).

Regards,
Kamil

Quoted 49 lines
lib/huc_copy.c +21 -0
+	gen12_emit_huc_virtual_addr_state(&obj[0], &obj[1], buf, &i);
+
+	buf[i++] = HUC_START;
+	buf[i++] = 1;
+
+	buf[i++] = MI_BATCH_BUFFER_END;
+
+	gem_write(fd, obj[2].handle, 0, buf, sizeof(buf));
+
+	memset(&execbuf, 0, sizeof(execbuf));
+	execbuf.buffers_ptr = to_user_pointer(obj);
+	execbuf.buffer_count = 3;
+	execbuf.flags = I915_EXEC_DEFAULT;
+
+	ctx = intel_ctx_create_for_engine(fd, I915_ENGINE_CLASS_VIDEO, 0);
+	execbuf.rsvd1 = ctx->id;
+
+	gem_execbuf(fd, &execbuf);
+
+	intel_ctx_destroy(fd, ctx);
+}
lib/huc_copy.h +4 -0
index 69d140933..e87e62c9c 100644
@@ -46,4 +46,8 @@ void
  gen9_huc_copyfunc(int fd, uint64_t ahnd,
  		  struct drm_i915_gem_exec_object2 *obj, uint64_t *objsize);
 
+void
+gen12_huc_copyfunc(int fd, uint64_t ahnd,
+		   struct drm_i915_gem_exec_object2 *obj, uint64_t *objsize);
+
  #endif /* HUC_COPY_H */
lib/intel_batchbuffer.c +1 -1
index 19a1fbe4d..9a855a7f0 100644
@@ -3066,14 +3066,18 @@ void intel_bb_copy_intel_buf(struct intel_bb *ibb,
   * Returns:
   *
   * The platform-specific huc copy function pointer for the device specified
- * with @devid. Will return NULL when no media spin function is implemented.
+ * with @devid. Will return NULL when no huc copy function is implemented.
   */
  igt_huc_copyfunc_t igt_get_huc_copyfunc(int devid)
  {
  	igt_huc_copyfunc_t copy = NULL;
 
Quoted 3 lines

lib/intel_batchbuffer.c void intel_bb_copy_intel_buf(struct intel_bb *ibb, · line 3076

Quoted 3 lines
lib/intel_batchbuffer.c +2 -1
-	if (IS_GEN12(devid) || IS_GEN11(devid) || IS_GEN9(devid))
+	if (AT_LEAST_GEN(devid, 12))
+		copy = gen12_huc_copyfunc;

As mentioned above, we switch to softpin on Gen12+ and stay with old func on earlier platforms.

Thanks,
Tony

Quoted 10 lines
Quoted 10 lines
lib/intel_batchbuffer.c +3 -0
+	else if (IS_GEN11(devid) || IS_GEN9(devid))
  		copy = gen9_huc_copyfunc;
+	else
+		copy = NULL;
 
  	return copy;
  }
Signature · 1 line
2.25.1
#5 lore raw

Hi Tony,

Quoted 15 lines · Tony
Quoted 13 lines · Kamil Konieczny

Hi,

please change subject of this commit, there are no changes in old huc_copy in this patch. Also remove dot from end of the Subject: line, s/platforms./platforms/

Quoted 3 lines · Vikas Srivastava

From: "Ye, Tony" <[email protected]>

Stop using relocs and the legacy execbuf flags.

You should put here a little more explanation, as I see this it is rather

Quoted 8 lines
Quoted 4 lines

Add new huc_copy for gen12+ with no-relocs and no legacy flags

and there are no changes in old code (except for adding that AT_LEAST_GEN(12)).

The patch is to switch to softpin from relocations in the huc_copy test on Gen12+. The old platforms stay with relocations. See the change in the igt_get_huc_copyfunc function.

Thank you for explanation, it was not clear from commit message, so maybe Vikas will add more explanations here.

Quoted 44 lines
Quoted 34 lines
Quoted 34 lines
---
  lib/huc_copy.c          | 77 +++++++++++++++++++++++++++++++++++++++++
  lib/huc_copy.h          |  4 +++
  lib/intel_batchbuffer.c |  8 +++--
  3 files changed, 87 insertions(+), 2 deletions(-)
lib/huc_copy.c +8 -0
index 6ec68864b..3b011a305 100644
@@ -26,6 +26,8 @@
  #include "drmtest.h"
  #include "huc_copy.h"
  #include "intel_allocator.h"
+#include "intel_ctx.h"
+#include "i915/gem_engine_topology.h"
  static void
  gen9_emit_huc_virtual_addr_state(struct drm_i915_gem_exec_object2 *src,
@@ -123,3 +125,78 @@ gen9_huc_copyfunc(int fd, uint64_t ahnd,
  	gem_execbuf(fd, &execbuf);
  }
+
+static void
+gen12_emit_huc_virtual_addr_state(struct drm_i915_gem_exec_object2 *src,
+		struct drm_i915_gem_exec_object2 *dst,
+		uint32_t *buf,
+		int *i)
Quoted 8 lines

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 139

Quoted 6 lines
lib/huc_copy.c +6 -0
+{
+	buf[(*i)++] = HUC_VIRTUAL_ADDR_STATE;
+
+	for (int j = 0; j < HUC_VIRTUAL_ADDR_REGION_NUM; j++) {
+		if (j == HUC_VIRTUAL_ADDR_REGION_SRC) {
+			buf[(*i)++] = src->offset;

Addr is 48-bit and here we copy only lower 32-bit, this may work with relocs but not with pinned addresses.

Quoted 2 lines

The test only uses 3 addresses: 2M, 4M, 6M. So 48b flag is not set and we only copy the lower 32 bits.

I see, so here we do some simplification.
imho here we should add some asserts to be sure it is 32-bit or even more, addr + size <= 32-bit.

Quoted 45 lines
Quoted 35 lines

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 141

Quoted 5 lines
lib/huc_copy.c +2 -0
+		} else if (j == HUC_VIRTUAL_ADDR_REGION_DST) {
+			buf[(*i)++] = dst->offset;

Same here.

Quoted 28 lines
lib/huc_copy.c +28 -0
+		} else {
+			buf[(*i)++] = 0;
+		}
+		buf[(*i)++] = 0;
+		buf[(*i)++] = 0;
+	}
+}
+
+void
+gen12_huc_copyfunc(int fd, uint64_t ahnd,
+		  struct drm_i915_gem_exec_object2 *obj, uint64_t *objsize)
+{
+	struct drm_i915_gem_execbuffer2 execbuf;
+	int i = 0;
+	uint32_t buf[63];
+	const intel_ctx_t *ctx;
+
+	/* load huc kernel */
+	buf[i++] = HUC_IMEM_STATE;
+	buf[i++] = 0;
+	buf[i++] = 0;
+	buf[i++] = 0;
+	buf[i++] = 0x3;
+
+	buf[i++] = MFX_WAIT;
+	buf[i++] = MFX_WAIT;
+
+	buf[i++] = HUC_PIPE_MODE_SELECT;
Quoted 8 lines

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 175

Quoted 6 lines
lib/huc_copy.c +6 -0
+	buf[i++] = 0;
+	buf[i++] = 0;
+
+	buf[i++] = MFX_WAIT;
+
+	obj[0].offset = 0x200000;

----------------------- ^
Use ahnd as in gen9_huc_copy (without reloc code).

Quoted 4 lines

The code here is simply assigning a graphics virtual address to the source buffer object.

Why not just copy code from gen9 into gen12 with some modifications ?

Quoted 53 lines
Quoted 3 lines

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 176

Quoted 1 line
lib/huc_copy.c +1 -0
+	obj[0].flags |= EXEC_OBJECT_PINNED;

Add also:
| EXEC_OBJECT_SUPPORTS_48B_ADDRESS

As explained above,  we don't need 48b address.

Quoted 46 lines

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 177

Quoted 2 lines
lib/huc_copy.c +1 -0
+	obj[1].offset = 0x400000;

Same here.

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 179

Quoted 2 lines
lib/huc_copy.c +2 -0
+	obj[1].flags |= EXEC_OBJECT_PINNED;
+	obj[1].flags |= EXEC_OBJECT_WRITE;

Add also
| EXEC_OBJECT_SUPPORTS_48B_ADDRESS

and maybe make it one bit-or like:

	obj[1].flags |= EXEC_OBJECT_PINNED | EXEC_OBJECT_WRITE |
			EXEC_OBJECT_SUPPORTS_48B_ADDRESS;

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 180

Quoted 1 line
lib/huc_copy.c +1 -0
+	obj[2].offset = 0x600000;

Same here.

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 181

Quoted 1 line
lib/huc_copy.c +1 -0
+	obj[2].flags |= EXEC_OBJECT_PINNED;

Same here (48-bit).

Regards,
Kamil

Quoted 24 lines
lib/huc_copy.c +21 -0
+	gen12_emit_huc_virtual_addr_state(&obj[0], &obj[1], buf, &i);
+
+	buf[i++] = HUC_START;
+	buf[i++] = 1;
+
+	buf[i++] = MI_BATCH_BUFFER_END;
+
+	gem_write(fd, obj[2].handle, 0, buf, sizeof(buf));
+
+	memset(&execbuf, 0, sizeof(execbuf));
+	execbuf.buffers_ptr = to_user_pointer(obj);
+	execbuf.buffer_count = 3;
+	execbuf.flags = I915_EXEC_DEFAULT;
+
+	ctx = intel_ctx_create_for_engine(fd, I915_ENGINE_CLASS_VIDEO, 0);
+	execbuf.rsvd1 = ctx->id;
+
+	gem_execbuf(fd, &execbuf);
+
+	intel_ctx_destroy(fd, ctx);
+}
lib/huc_copy.h +0 -1
index 69d140933..e87e62c9c 100644
--- a/lib/huc_copy.h
Quoted 8 lines
Quoted 8 lines

lib/huc_copy.h void · line 51

Quoted 8 lines

+++ b/lib/huc_copy.h

lib/huc_copy.h +4 -0
@@ -46,4 +46,8 @@ void
  gen9_huc_copyfunc(int fd, uint64_t ahnd,
  		  struct drm_i915_gem_exec_object2 *obj, uint64_t *objsize);
+void
+gen12_huc_copyfunc(int fd, uint64_t ahnd,
+		   struct drm_i915_gem_exec_object2 *obj, uint64_t *objsize);
+

I spotted one more problem, the objsize[0] (and indexes 1, 2) are not used here, if we want to use 2M addresses with size 2M we should also assert objsize[i] <= 2M for i=0,1
For now tests uses only 4K but this is library function so we should play safe.

Regards,
Kamil

Quoted 35 lines
Quoted 10 lines
Quoted 10 lines
lib/huc_copy.h +0 -0
  #endif /* HUC_COPY_H */
lib/intel_batchbuffer.c +0 -1
index 19a1fbe4d..9a855a7f0 100644
@@ -3066,14 +3066,18 @@ void intel_bb_copy_intel_buf(struct intel_bb *ibb,
   * Returns:
   *
   * The platform-specific huc copy function pointer for the device specified
- * with @devid. Will return NULL when no media spin function is implemented.
Quoted 8 lines

lib/intel_batchbuffer.c void intel_bb_copy_intel_buf(struct intel_bb *ibb, · line 3076

Quoted 8 lines
lib/intel_batchbuffer.c +3 -1
+ * with @devid. Will return NULL when no huc copy function is implemented.
   */
  igt_huc_copyfunc_t igt_get_huc_copyfunc(int devid)
  {
  	igt_huc_copyfunc_t copy = NULL;
-	if (IS_GEN12(devid) || IS_GEN11(devid) || IS_GEN9(devid))
+	if (AT_LEAST_GEN(devid, 12))
+		copy = gen12_huc_copyfunc;

As mentioned above, we switch to softpin on Gen12+ and stay with old func on earlier platforms.

Thanks,
Tony

Quoted 9 lines
Quoted 9 lines
lib/intel_batchbuffer.c +3 -0
+	else if (IS_GEN11(devid) || IS_GEN9(devid))
  		copy = gen9_huc_copyfunc;
+	else
+		copy = NULL;
  	return copy;
  }
Signature · 1 line
2.25.1
#6 lore raw
In reply to Ye, Tony
Quoted 114 lines · Tony
Quoted 9 lines · Kamil Konieczny

Hi,

please change subject of this commit, there are no changes in old huc_copy in this patch. Also remove dot from end of the Subject: line, s/platforms./platforms/

Quoted 2 lines · Vikas Srivastava

From: "Ye, Tony" <[email protected]>

Quoted 8 lines
Quoted 1 line

Stop using relocs and the legacy execbuf flags.

You should put here a little more explanation, as I see this it is rather

Add new huc_copy for gen12+ with no-relocs and no legacy flags

and there are no changes in old code (except for adding that AT_LEAST_GEN(12)).

The patch is to switch to softpin from relocations in the huc_copy test on Gen12+. The old platforms stay with relocations. See the change in the igt_get_huc_copyfunc function.

Quoted 32 lines
Quoted 32 lines
---
  lib/huc_copy.c          | 77 +++++++++++++++++++++++++++++++++++++++++
  lib/huc_copy.h          |  4 +++
  lib/intel_batchbuffer.c |  8 +++--
  3 files changed, 87 insertions(+), 2 deletions(-)
lib/huc_copy.c +8 -0
index 6ec68864b..3b011a305 100644
@@ -26,6 +26,8 @@
  #include "drmtest.h"
  #include "huc_copy.h"
  #include "intel_allocator.h"
+#include "intel_ctx.h"
+#include "i915/gem_engine_topology.h"
  static void
  gen9_emit_huc_virtual_addr_state(struct drm_i915_gem_exec_object2 *src,
@@ -123,3 +125,78 @@ gen9_huc_copyfunc(int fd, uint64_t ahnd,
  	gem_execbuf(fd, &execbuf);
  }
+
+static void
+gen12_emit_huc_virtual_addr_state(struct drm_i915_gem_exec_object2 *src,
+		struct drm_i915_gem_exec_object2 *dst,
+		uint32_t *buf,
+		int *i)
Quoted 8 lines

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 139

Quoted 6 lines
lib/huc_copy.c +6 -0
+{
+	buf[(*i)++] = HUC_VIRTUAL_ADDR_STATE;
+
+	for (int j = 0; j < HUC_VIRTUAL_ADDR_REGION_NUM; j++) {
+		if (j == HUC_VIRTUAL_ADDR_REGION_SRC) {
+			buf[(*i)++] = src->offset;

Addr is 48-bit and here we copy only lower 32-bit, this may work with relocs but not with pinned addresses.

The test only uses 3 addresses: 2M, 4M, 6M. So 48b flag is not set and we only copy the lower 32 bits.

Quoted 33 lines

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 141

Quoted 3 lines
lib/huc_copy.c +2 -0
+		} else if (j == HUC_VIRTUAL_ADDR_REGION_DST) {
+			buf[(*i)++] = dst->offset;

Same here.

Quoted 28 lines
lib/huc_copy.c +28 -0
+		} else {
+			buf[(*i)++] = 0;
+		}
+		buf[(*i)++] = 0;
+		buf[(*i)++] = 0;
+	}
+}
+
+void
+gen12_huc_copyfunc(int fd, uint64_t ahnd,
+		  struct drm_i915_gem_exec_object2 *obj, uint64_t *objsize)
+{
+	struct drm_i915_gem_execbuffer2 execbuf;
+	int i = 0;
+	uint32_t buf[63];
+	const intel_ctx_t *ctx;
+
+	/* load huc kernel */
+	buf[i++] = HUC_IMEM_STATE;
+	buf[i++] = 0;
+	buf[i++] = 0;
+	buf[i++] = 0;
+	buf[i++] = 0x3;
+
+	buf[i++] = MFX_WAIT;
+	buf[i++] = MFX_WAIT;
+
+	buf[i++] = HUC_PIPE_MODE_SELECT;
Quoted 8 lines

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 175

Quoted 6 lines
lib/huc_copy.c +6 -0
+	buf[i++] = 0;
+	buf[i++] = 0;
+
+	buf[i++] = MFX_WAIT;
+
+	obj[0].offset = 0x200000;

----------------------- ^
Use ahnd as in gen9_huc_copy (without reloc code).

Quoted 2 lines

The code here is simply assigning a graphics virtual address to the source buffer object.

You shouldn't hardcode offsets here. You provide copyfunc implementation so it should honour environment (allocator requirement).

Fix is simple, just use:

obj[0].offset = get_offset(ahnd, bo_handle, bo_size, 0);

--
Zbigniew

Quoted 98 lines
Quoted 5 lines

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 176

Quoted 3 lines
lib/huc_copy.c +1 -0
+	obj[0].flags |= EXEC_OBJECT_PINNED;

Add also:
| EXEC_OBJECT_SUPPORTS_48B_ADDRESS

As explained above,  we don't need 48b address.

Quoted 64 lines

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 177

Quoted 2 lines
lib/huc_copy.c +1 -0
+	obj[1].offset = 0x400000;

Same here.

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 179

Quoted 2 lines
lib/huc_copy.c +2 -0
+	obj[1].flags |= EXEC_OBJECT_PINNED;
+	obj[1].flags |= EXEC_OBJECT_WRITE;

Add also
| EXEC_OBJECT_SUPPORTS_48B_ADDRESS

and maybe make it one bit-or like:

	obj[1].flags |= EXEC_OBJECT_PINNED | EXEC_OBJECT_WRITE |
			EXEC_OBJECT_SUPPORTS_48B_ADDRESS;

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 180

Quoted 1 line
lib/huc_copy.c +1 -0
+	obj[2].offset = 0x600000;

Same here.

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 181

Quoted 1 line
lib/huc_copy.c +1 -0
+	obj[2].flags |= EXEC_OBJECT_PINNED;

Same here (48-bit).

Regards,
Kamil

Quoted 42 lines
lib/huc_copy.c +21 -0
+	gen12_emit_huc_virtual_addr_state(&obj[0], &obj[1], buf, &i);
+
+	buf[i++] = HUC_START;
+	buf[i++] = 1;
+
+	buf[i++] = MI_BATCH_BUFFER_END;
+
+	gem_write(fd, obj[2].handle, 0, buf, sizeof(buf));
+
+	memset(&execbuf, 0, sizeof(execbuf));
+	execbuf.buffers_ptr = to_user_pointer(obj);
+	execbuf.buffer_count = 3;
+	execbuf.flags = I915_EXEC_DEFAULT;
+
+	ctx = intel_ctx_create_for_engine(fd, I915_ENGINE_CLASS_VIDEO, 0);
+	execbuf.rsvd1 = ctx->id;
+
+	gem_execbuf(fd, &execbuf);
+
+	intel_ctx_destroy(fd, ctx);
+}
lib/huc_copy.h +4 -0
index 69d140933..e87e62c9c 100644
@@ -46,4 +46,8 @@ void
  gen9_huc_copyfunc(int fd, uint64_t ahnd,
  		  struct drm_i915_gem_exec_object2 *obj, uint64_t *objsize);
+void
+gen12_huc_copyfunc(int fd, uint64_t ahnd,
+		   struct drm_i915_gem_exec_object2 *obj, uint64_t *objsize);
+
  #endif /* HUC_COPY_H */
lib/intel_batchbuffer.c +0 -1
index 19a1fbe4d..9a855a7f0 100644
@@ -3066,14 +3066,18 @@ void intel_bb_copy_intel_buf(struct intel_bb *ibb,
   * Returns:
   *
   * The platform-specific huc copy function pointer for the device specified
- * with @devid. Will return NULL when no media spin function is implemented.
Quoted 8 lines

lib/intel_batchbuffer.c void intel_bb_copy_intel_buf(struct intel_bb *ibb, · line 3076

Quoted 8 lines
lib/intel_batchbuffer.c +3 -1
+ * with @devid. Will return NULL when no huc copy function is implemented.
   */
  igt_huc_copyfunc_t igt_get_huc_copyfunc(int devid)
  {
  	igt_huc_copyfunc_t copy = NULL;
-	if (IS_GEN12(devid) || IS_GEN11(devid) || IS_GEN9(devid))
+	if (AT_LEAST_GEN(devid, 12))
+		copy = gen12_huc_copyfunc;

As mentioned above, we switch to softpin on Gen12+ and stay with old func on earlier platforms.

Thanks,
Tony

Quoted 9 lines
Quoted 9 lines
lib/intel_batchbuffer.c +3 -0
+	else if (IS_GEN11(devid) || IS_GEN9(devid))
  		copy = gen9_huc_copyfunc;
+	else
+		copy = NULL;
  	return copy;
  }
Signature · 1 line
2.25.1
#7 lore raw
In reply to Vikas Srivastava

Hi,

Quoted 88 lines · Vikas Srivastava

From: "Ye, Tony" <[email protected]>

Stop using relocs and the legacy execbuf flags.

---
 lib/huc_copy.c          | 77 +++++++++++++++++++++++++++++++++++++++++
 lib/huc_copy.h          |  4 +++
 lib/intel_batchbuffer.c |  8 +++--
 3 files changed, 87 insertions(+), 2 deletions(-)
lib/huc_copy.c +59 -0
index 6ec68864b..3b011a305 100644
@@ -26,6 +26,8 @@
 #include "drmtest.h"
 #include "huc_copy.h"
 #include "intel_allocator.h"
+#include "intel_ctx.h"
+#include "i915/gem_engine_topology.h"
 
 static void
 gen9_emit_huc_virtual_addr_state(struct drm_i915_gem_exec_object2 *src,
@@ -123,3 +125,78 @@ gen9_huc_copyfunc(int fd, uint64_t ahnd,
 
 	gem_execbuf(fd, &execbuf);
 }
+
+static void
+gen12_emit_huc_virtual_addr_state(struct drm_i915_gem_exec_object2 *src,
+		struct drm_i915_gem_exec_object2 *dst,
+		uint32_t *buf,
+		int *i)
+{
+	buf[(*i)++] = HUC_VIRTUAL_ADDR_STATE;
+
+	for (int j = 0; j < HUC_VIRTUAL_ADDR_REGION_NUM; j++) {
+		if (j == HUC_VIRTUAL_ADDR_REGION_SRC) {
+			buf[(*i)++] = src->offset;
+		} else if (j == HUC_VIRTUAL_ADDR_REGION_DST) {
+			buf[(*i)++] = dst->offset;
+		} else {
+			buf[(*i)++] = 0;
+		}
+		buf[(*i)++] = 0;
+		buf[(*i)++] = 0;
+	}
+}
+
+void
+gen12_huc_copyfunc(int fd, uint64_t ahnd,
+		  struct drm_i915_gem_exec_object2 *obj, uint64_t *objsize)
+{
+	struct drm_i915_gem_execbuffer2 execbuf;
+	int i = 0;
+	uint32_t buf[63];
+	const intel_ctx_t *ctx;
+
+	/* load huc kernel */
+	buf[i++] = HUC_IMEM_STATE;
+	buf[i++] = 0;
+	buf[i++] = 0;
+	buf[i++] = 0;
+	buf[i++] = 0x3;
+
+	buf[i++] = MFX_WAIT;
+	buf[i++] = MFX_WAIT;
+
+	buf[i++] = HUC_PIPE_MODE_SELECT;
+	buf[i++] = 0;
+	buf[i++] = 0;
+
+	buf[i++] = MFX_WAIT;
+
+	obj[0].offset = 0x200000;
+	obj[0].flags |= EXEC_OBJECT_PINNED;
+	obj[1].offset = 0x400000;
+	obj[1].flags |= EXEC_OBJECT_PINNED;
+	obj[1].flags |= EXEC_OBJECT_WRITE;
+	obj[2].offset = 0x600000;
+	obj[2].flags |= EXEC_OBJECT_PINNED;
+	gen12_emit_huc_virtual_addr_state(&obj[0], &obj[1], buf, &i);
+
+	buf[i++] = HUC_START;

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 194

Quoted 10 lines
lib/huc_copy.c +10 -0
+	buf[i++] = 1;
+
+	buf[i++] = MI_BATCH_BUFFER_END;
+
+	gem_write(fd, obj[2].handle, 0, buf, sizeof(buf));
+
+	memset(&execbuf, 0, sizeof(execbuf));
+	execbuf.buffers_ptr = to_user_pointer(obj);
+	execbuf.buffer_count = 3;
+	execbuf.flags = I915_EXEC_DEFAULT;

Add here one more flag: I915_EXEC_NO_RELOC

	execbuf.flags = I915_EXEC_DEFAULT | I915_EXEC_NO_RELOC;

It will help in transition to no-reloc (and will be ignored when relocations will be disbaled in driver).

Regrads,
Kamil

Quoted 49 lines
lib/huc_copy.c +8 -0
+
+	ctx = intel_ctx_create_for_engine(fd, I915_ENGINE_CLASS_VIDEO, 0);
+	execbuf.rsvd1 = ctx->id;
+
+	gem_execbuf(fd, &execbuf);
+
+	intel_ctx_destroy(fd, ctx);
+}
lib/huc_copy.h +4 -0
index 69d140933..e87e62c9c 100644
@@ -46,4 +46,8 @@ void
 gen9_huc_copyfunc(int fd, uint64_t ahnd,
 		  struct drm_i915_gem_exec_object2 *obj, uint64_t *objsize);
 
+void
+gen12_huc_copyfunc(int fd, uint64_t ahnd,
+		   struct drm_i915_gem_exec_object2 *obj, uint64_t *objsize);
+
 #endif /* HUC_COPY_H */
lib/intel_batchbuffer.c +6 -2
index 19a1fbe4d..9a855a7f0 100644
@@ -3066,14 +3066,18 @@ void intel_bb_copy_intel_buf(struct intel_bb *ibb,
  * Returns:
  *
  * The platform-specific huc copy function pointer for the device specified
- * with @devid. Will return NULL when no media spin function is implemented.
+ * with @devid. Will return NULL when no huc copy function is implemented.
  */
 igt_huc_copyfunc_t igt_get_huc_copyfunc(int devid)
 {
 	igt_huc_copyfunc_t copy = NULL;
 
-	if (IS_GEN12(devid) || IS_GEN11(devid) || IS_GEN9(devid))
+	if (AT_LEAST_GEN(devid, 12))
+		copy = gen12_huc_copyfunc;
+	else if (IS_GEN11(devid) || IS_GEN9(devid))
 		copy = gen9_huc_copyfunc;
+	else
+		copy = NULL;
 
 	return copy;
 }
Signature · 1 line
2.25.1
#8 lore raw
In reply to Vikas Srivastava

Hi,

few more nits, see below.

Quoted 28 lines · Vikas Srivastava

From: "Ye, Tony" <[email protected]>

Stop using relocs and the legacy execbuf flags.

---
 lib/huc_copy.c          | 77 +++++++++++++++++++++++++++++++++++++++++
 lib/huc_copy.h          |  4 +++
 lib/intel_batchbuffer.c |  8 +++--
 3 files changed, 87 insertions(+), 2 deletions(-)
lib/huc_copy.c +2 -0
index 6ec68864b..3b011a305 100644
@@ -26,6 +26,8 @@
 #include "drmtest.h"
 #include "huc_copy.h"
 #include "intel_allocator.h"
+#include "intel_ctx.h"
+#include "i915/gem_engine_topology.h"
 
 static void
 gen9_emit_huc_virtual_addr_state(struct drm_i915_gem_exec_object2 *src,

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 130

Quoted 6 lines
lib/huc_copy.c +3 -0
@@ -123,3 +125,78 @@ gen9_huc_copyfunc(int fd, uint64_t ahnd,
 
 	gem_execbuf(fd, &execbuf);
 }
+
+static void
+gen12_emit_huc_virtual_addr_state(struct drm_i915_gem_exec_object2 *src,

------------------------------------ ^

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 131

Quoted 1 line
lib/huc_copy.c +1 -0
+		struct drm_i915_gem_exec_object2 *dst,

--------------- ^
Align to above.

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 132

Quoted 1 line
lib/huc_copy.c +1 -0
+		uint32_t *buf,

Same here.

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 133

Quoted 1 line
lib/huc_copy.c +1 -0
+		int *i)

Same here.

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 139

Quoted 6 lines
lib/huc_copy.c +6 -0
+{
+	buf[(*i)++] = HUC_VIRTUAL_ADDR_STATE;
+
+	for (int j = 0; j < HUC_VIRTUAL_ADDR_REGION_NUM; j++) {
+		if (j == HUC_VIRTUAL_ADDR_REGION_SRC) {
+			buf[(*i)++] = src->offset;

Add here:

			buf[(*i)++] = upper_32_bits(src->offset);

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 141

Quoted 2 lines
lib/huc_copy.c +2 -0
+		} else if (j == HUC_VIRTUAL_ADDR_REGION_DST) {
+			buf[(*i)++] = dst->offset;

Same here.

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 143

Quoted 2 lines
lib/huc_copy.c +2 -0
+		} else {
+			buf[(*i)++] = 0;

Add

			buf[(*i)++] = 0;

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 144

Quoted 1 line
lib/huc_copy.c +1 -0
+		}

Put newline.

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 145

Quoted 1 line
lib/huc_copy.c +1 -0
+		buf[(*i)++] = 0;

--------------- ^
Remove this.

lib/huc_copy.c gen9_huc_copyfunc(int fd, uint64_t ahnd, · line 146

Quoted 1 line
lib/huc_copy.c +1 -0
+		buf[(*i)++] = 0;

btw here are encoded mocs bits starting from bit 1, do we need this on MTL ? At least for src/dst addresses.

+Cc Zbigniew

Regards,
Kamil

Quoted 97 lines
lib/huc_copy.c +56 -0
+	}
+}
+
+void
+gen12_huc_copyfunc(int fd, uint64_t ahnd,
+		  struct drm_i915_gem_exec_object2 *obj, uint64_t *objsize)
+{
+	struct drm_i915_gem_execbuffer2 execbuf;
+	int i = 0;
+	uint32_t buf[63];
+	const intel_ctx_t *ctx;
+
+	/* load huc kernel */
+	buf[i++] = HUC_IMEM_STATE;
+	buf[i++] = 0;
+	buf[i++] = 0;
+	buf[i++] = 0;
+	buf[i++] = 0x3;
+
+	buf[i++] = MFX_WAIT;
+	buf[i++] = MFX_WAIT;
+
+	buf[i++] = HUC_PIPE_MODE_SELECT;
+	buf[i++] = 0;
+	buf[i++] = 0;
+
+	buf[i++] = MFX_WAIT;
+
+	obj[0].offset = 0x200000;
+	obj[0].flags |= EXEC_OBJECT_PINNED;
+	obj[1].offset = 0x400000;
+	obj[1].flags |= EXEC_OBJECT_PINNED;
+	obj[1].flags |= EXEC_OBJECT_WRITE;
+	obj[2].offset = 0x600000;
+	obj[2].flags |= EXEC_OBJECT_PINNED;
+	gen12_emit_huc_virtual_addr_state(&obj[0], &obj[1], buf, &i);
+
+	buf[i++] = HUC_START;
+	buf[i++] = 1;
+
+	buf[i++] = MI_BATCH_BUFFER_END;
+
+	gem_write(fd, obj[2].handle, 0, buf, sizeof(buf));
+
+	memset(&execbuf, 0, sizeof(execbuf));
+	execbuf.buffers_ptr = to_user_pointer(obj);
+	execbuf.buffer_count = 3;
+	execbuf.flags = I915_EXEC_DEFAULT;
+
+	ctx = intel_ctx_create_for_engine(fd, I915_ENGINE_CLASS_VIDEO, 0);
+	execbuf.rsvd1 = ctx->id;
+
+	gem_execbuf(fd, &execbuf);
+
+	intel_ctx_destroy(fd, ctx);
+}
lib/huc_copy.h +4 -0
index 69d140933..e87e62c9c 100644
@@ -46,4 +46,8 @@ void
 gen9_huc_copyfunc(int fd, uint64_t ahnd,
 		  struct drm_i915_gem_exec_object2 *obj, uint64_t *objsize);
 
+void
+gen12_huc_copyfunc(int fd, uint64_t ahnd,
+		   struct drm_i915_gem_exec_object2 *obj, uint64_t *objsize);
+
 #endif /* HUC_COPY_H */
lib/intel_batchbuffer.c +6 -2
index 19a1fbe4d..9a855a7f0 100644
@@ -3066,14 +3066,18 @@ void intel_bb_copy_intel_buf(struct intel_bb *ibb,
  * Returns:
  *
  * The platform-specific huc copy function pointer for the device specified
- * with @devid. Will return NULL when no media spin function is implemented.
+ * with @devid. Will return NULL when no huc copy function is implemented.
  */
 igt_huc_copyfunc_t igt_get_huc_copyfunc(int devid)
 {
 	igt_huc_copyfunc_t copy = NULL;
 
-	if (IS_GEN12(devid) || IS_GEN11(devid) || IS_GEN9(devid))
+	if (AT_LEAST_GEN(devid, 12))
+		copy = gen12_huc_copyfunc;
+	else if (IS_GEN11(devid) || IS_GEN9(devid))
 		copy = gen9_huc_copyfunc;
+	else
+		copy = NULL;
 
 	return copy;
 }
Signature · 1 line
2.25.1