tests/i915: Added XY_FAST_COPY_BLT support for gem_blits
PATCH 1/1 tests/i915: Added XY_FAST_COPY_BLT support for gem_blits
From: Arjun Melkaveri <[email protected]>
Test case uses legacy command which is not supported starting from PVC. Modified test to use XY_FAST_COPY_BLT.
--- lib/intel_batchbuffer.c | 33 ++++++++++++--- lib/intel_batchbuffer.h | 6 +++ tests/i915/gem_blits.c | 94 ++++++++++++++++++++++++++--------------- 3 files changed, 94 insertions(+), 39 deletions(-)
lib/intel_batchbuffer.c +28 -5
@@ -605,8 +605,19 @@ static uint32_t fast_copy_pitch(unsigned int stride, unsigned int tiling)return stride; } -static uint32_t fast_copy_dword0 (unsigned int src_tiling, -unsigned int dst_tiling) +/** +* fast_copy_dword0: +* @src_tiling: The tile format supported by source +* @dst_tiling: The tile format supported by destination +* +* Set the source and destination tile format types bits for fast copy. +* +* Returns: +* The dwords that will conatin the set bit for source and destination tiling. +*/ + +uint32_t fast_copy_dword0 (unsigned int src_tiling, +unsigned int dst_tiling) {uint32_t dword0 =0 ;
@@ -649,9 +660,21 @@ static uint32_t fast_copy_dword0(unsigned int src_tiling,return dword0; } -static uint32_t fast_copy_dword1 (unsigned int src_tiling, -unsigned int dst_tiling, -int bpp) +/** +* fast_copy_dword1: +* @src_tiling: The tile format supported by source +* @dst_tiling: The tile format supported by destination +* @bpp: Fast copy color depth parameter + +* Set the source and destination tile format types and color depth bits for fast copy. +* +* Returns: +* The dword1 that will conatin the set bit for color depth and source ,destination tiling. +*/ + +uint32_t fast_copy_dword1 (unsigned int src_tiling, +unsigned int dst_tiling, +int bpp) {uint32_t dword1 =0 ;
lib/intel_batchbuffer.h +6 -0
@@ -271,6 +271,12 @@ unsigned int igt_buf_intel_ccs_width(unsigned int gen,unsigned int igt_buf_intel_ccs_height (unsigned int gen,const struct igt_buf *buf); +uint32_t fast_copy_dword0 (unsigned int src_tiling, +unsigned int dst_tiling); +uint32_t fast_copy_dword1 (unsigned int src_tiling, +unsigned int dst_tiling, +int bpp); + void igt_blitter_src_copy(int fd, uint64_t ahnd, uint32_t ctx,
tests/i915/gem_blits.c +60 -34
149 lines not on this page · raw message
Signature · 1 line
2.25.1
Patchwork
CI[igt-dev] ✓ Fi.CI.BAT: success for tests/i915: Added XY_FAST_COPY_BLT support for gem_blits (rev2)
== Series Details ==
== Series Details ==
Series: tests/i915: Added XY_FAST_COPY_BLT support for gem_blits (rev2)
URL : https://patchwork.freedesktop.org/series/111078/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_12434 -> IGTPW_8155
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/index.html
Participating hosts (36 -> 38)
------------------------------
Additional (4): fi-cml-u2 fi-bdw-gvtdvm fi-cfl-guc bat-dg1-6
Missing (2): fi-ctg-p8600 fi-rkl-11600
Known issues
------------
Here are the changes found in IGTPW_8155 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@debugfs_test@basic-hwmon:
- fi-cml-u2: NOTRUN -> [SKIP][1] ([i915#7456])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/fi-cml-u2/igt@[email protected]
* igt@gem_huc_copy@huc-copy:
- fi-cml-u2: NOTRUN -> [SKIP][2] ([i915#2190])
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/fi-cml-u2/igt@[email protected]
* igt@gem_lmem_swapping@verify-random:
- fi-cfl-guc: NOTRUN -> [SKIP][3] ([fdo#109271] / [i915#4613]) +3 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/fi-cfl-guc/igt@[email protected]
- fi-cml-u2: NOTRUN -> [SKIP][4] ([i915#4613]) +3 similar issues
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/fi-cml-u2/igt@[email protected]
* igt@gem_mmap@basic:
- bat-dg1-6: NOTRUN -> [SKIP][5] ([i915#4083])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/bat-dg1-6/igt@[email protected]
* igt@gem_render_tiled_blits@basic:
- bat-dg1-6: NOTRUN -> [SKIP][6] ([i915#4079]) +1 similar issue
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/bat-dg1-6/igt@[email protected]
* igt@gem_tiled_fence_blits@basic:
- bat-dg1-6: NOTRUN -> [SKIP][7] ([i915#4077]) +2 similar issues
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/bat-dg1-6/igt@[email protected]
* igt@i915_pm_backlight@basic-brightness:
- bat-dg1-6: NOTRUN -> [SKIP][8] ([i915#7561])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/bat-dg1-6/igt@[email protected]
* igt@i915_pm_rps@basic-api:
- bat-dg1-6: NOTRUN -> [SKIP][9] ([i915#6621])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/bat-dg1-6/igt@[email protected]
* igt@i915_suspend@basic-s2idle-without-i915:
- fi-bdw-gvtdvm: NOTRUN -> [INCOMPLETE][10] ([i915#146])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/fi-bdw-gvtdvm/igt@[email protected]
* igt@kms_addfb_basic@basic-y-tiled-legacy:
- bat-dg1-6: NOTRUN -> [SKIP][11] ([i915#4215])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/bat-dg1-6/igt@[email protected]
* igt@kms_addfb_basic@tile-pitch-mismatch:
- bat-dg1-6: NOTRUN -> [SKIP][12] ([i915#4212]) +7 similar issues
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/bat-dg1-6/igt@[email protected]
* igt@kms_chamelium@common-hpd-after-suspend:
- bat-adlp-4: NOTRUN -> [SKIP][13] ([fdo#111827])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/bat-adlp-4/igt@[email protected]
* igt@kms_chamelium@dp-crc-fast:
- fi-cfl-guc: NOTRUN -> [SKIP][14] ([fdo#109271] / [fdo#111827]) +8 similar issues
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/fi-cfl-guc/igt@[email protected]
* igt@kms_chamelium@hdmi-crc-fast:
- bat-dg1-6: NOTRUN -> [SKIP][15] ([fdo#111827]) +8 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/bat-dg1-6/igt@[email protected]
* igt@kms_chamelium@hdmi-hpd-fast:
- fi-bdw-gvtdvm: NOTRUN -> [SKIP][16] ([fdo#109271] / [fdo#111827]) +7 similar issues
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/fi-bdw-gvtdvm/igt@[email protected]
* igt@kms_chamelium@vga-hpd-fast:
- fi-cml-u2: NOTRUN -> [SKIP][17] ([fdo#109284] / [fdo#111827]) +8 similar issues
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/fi-cml-u2/igt@[email protected]
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor:
- fi-cml-u2: NOTRUN -> [SKIP][18] ([i915#4213])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/fi-cml-u2/igt@[email protected]
- bat-dg1-6: NOTRUN -> [SKIP][19] ([i915#4103] / [i915#4213])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/bat-dg1-6/igt@[email protected]
* igt@kms_flip@basic-plain-flip:
- fi-bdw-gvtdvm: NOTRUN -> [SKIP][20] ([fdo#109271]) +38 similar issues
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/fi-bdw-gvtdvm/igt@[email protected]
* igt@kms_force_connector_basic@force-load-detect:
- fi-cml-u2: NOTRUN -> [SKIP][21] ([fdo#109285])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/fi-cml-u2/igt@[email protected]
- bat-dg1-6: NOTRUN -> [SKIP][22] ([fdo#109285])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/bat-dg1-6/igt@[email protected]
* igt@kms_frontbuffer_tracking@basic:
- fi-cml-u2: NOTRUN -> [DMESG-WARN][23] ([i915#6020])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/fi-cml-u2/igt@[email protected]
* igt@kms_pipe_crc_basic@suspend-read-crc:
- bat-adlp-4: NOTRUN -> [SKIP][24] ([i915#3546])
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/bat-adlp-4/igt@[email protected]
* igt@kms_psr@sprite_plane_onoff:
- bat-dg1-6: NOTRUN -> [SKIP][25] ([i915#1072] / [i915#4078]) +3 similar issues
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/bat-dg1-6/igt@kms_psr@sprite_plane_onoff.html
* igt@kms_setmode@basic-clone-single-crtc:
- bat-dg1-6: NOTRUN -> [SKIP][26] ([i915#3555])
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/bat-dg1-6/igt@[email protected]
- fi-cml-u2: NOTRUN -> [SKIP][27] ([i915#3555])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/fi-cml-u2/igt@[email protected]
* igt@prime_vgem@basic-gtt:
- bat-dg1-6: NOTRUN -> [SKIP][28] ([i915#3708] / [i915#4077]) +1 similar issue
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/bat-dg1-6/igt@[email protected]
* igt@prime_vgem@basic-read:
- bat-dg1-6: NOTRUN -> [SKIP][29] ([i915#3708]) +3 similar issues
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/bat-dg1-6/igt@[email protected]
* igt@prime_vgem@basic-userptr:
- fi-cfl-guc: NOTRUN -> [SKIP][30] ([fdo#109271]) +9 similar issues
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/fi-cfl-guc/igt@[email protected]
- fi-cml-u2: NOTRUN -> [SKIP][31] ([fdo#109295] / [i915#3301])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/fi-cml-u2/igt@[email protected]
- bat-dg1-6: NOTRUN -> [SKIP][32] ([i915#3708] / [i915#4873])
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/bat-dg1-6/igt@[email protected]
#### Possible fixes ####
* igt@fbdev@read:
- {bat-rpls-2}: [SKIP][33] ([i915#2582]) -> [PASS][34] +4 similar issues
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12434/bat-rpls-2/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/bat-rpls-2/igt@[email protected]
* igt@gem_exec_suspend@basic-s0@smem:
- {bat-rplp-1}: [DMESG-WARN][35] ([i915#2867]) -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12434/bat-rplp-1/igt@gem_exec_suspend@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/bat-rplp-1/igt@gem_exec_suspend@[email protected]
- {fi-ehl-2}: [DMESG-WARN][37] ([i915#5122]) -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12434/fi-ehl-2/igt@gem_exec_suspend@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/fi-ehl-2/igt@gem_exec_suspend@[email protected]
* igt@i915_selftest@live@gt_pm:
- {bat-adln-1}: [DMESG-FAIL][39] ([i915#4258]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12434/bat-adln-1/igt@i915_selftest@live@gt_pm.html
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/bat-adln-1/igt@i915_selftest@live@gt_pm.html
* igt@i915_selftest@live@migrate:
- bat-adlp-4: [INCOMPLETE][41] ([i915#7308] / [i915#7348]) -> [PASS][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12434/bat-adlp-4/igt@i915_selftest@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/bat-adlp-4/igt@i915_selftest@[email protected]
* igt@i915_selftest@live@requests:
- {bat-rpls-1}: [INCOMPLETE][43] ([i915#4983] / [i915#6257]) -> [PASS][44]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12434/bat-rpls-1/igt@i915_selftest@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/bat-rpls-1/igt@i915_selftest@[email protected]
* igt@kms_frontbuffer_tracking@basic:
- {bat-rpls-2}: [SKIP][45] ([i915#1849]) -> [PASS][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12434/bat-rpls-2/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/bat-rpls-2/igt@[email protected]
* igt@prime_vgem@basic-fence-flip:
- {bat-rpls-2}: [SKIP][47] ([fdo#109295] / [i915#1845] / [i915#3708]) -> [PASS][48]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12434/bat-rpls-2/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/bat-rpls-2/igt@[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#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
[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#146]: https://gitlab.freedesktop.org/drm/intel/issues/146
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#2867]: https://gitlab.freedesktop.org/drm/intel/issues/2867
[i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
[i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[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#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#4215]: https://gitlab.freedesktop.org/drm/intel/issues/4215
[i915#4258]: https://gitlab.freedesktop.org/drm/intel/issues/4258
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4873]: https://gitlab.freedesktop.org/drm/intel/issues/4873
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#5122]: https://gitlab.freedesktop.org/drm/intel/issues/5122
[i915#6020]: https://gitlab.freedesktop.org/drm/intel/issues/6020
[i915#6257]: https://gitlab.freedesktop.org/drm/intel/issues/6257
[i915#6434]: https://gitlab.freedesktop.org/drm/intel/issues/6434
[i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
[i915#7308]: https://gitlab.freedesktop.org/drm/intel/issues/7308
[i915#7348]: https://gitlab.freedesktop.org/drm/intel/issues/7348
[i915#7456]: https://gitlab.freedesktop.org/drm/intel/issues/7456
[i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_7072 -> IGTPW_8155
CI-20190529: 20190529
CI_DRM_12434: 985931f189852e505af573997ddbf63bfbe2570b @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_8155: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/index.html
IGT_7072: 69ba7163475925cdc69aebbdfa0e87453ae165c7 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8155/index.html
Hi Vikas,
please change subject to
tests/i915/gem_blits: Added XY_FAST_COPY_BLT support for gen12+
and resend.
See also below, I have one question.
Quoted 124 lines · Vikas Srivastava
From: Arjun Melkaveri <[email protected]>
Test case uses legacy command which is not supported starting from PVC. Modified test to use
XY_FAST_COPY_BLT.Signed-off-by Arjun Melkaveri <[email protected]>Signed-off-by Vikas Srivastava <[email protected]>--- lib/intel_batchbuffer.c | 33 ++++++++++++--- lib/intel_batchbuffer.h | 6 +++ tests/i915/gem_blits.c | 94 ++++++++++++++++++++++++++--------------- 3 files changed, 94 insertions(+), 39 deletions(-)lib/intel_batchbuffer.c +28
-5@@ -605,8 +605,19 @@ static uint32_t fast_copy_pitch(unsigned int stride, unsigned int tiling)return stride; } -static uint32_t fast_copy_dword0 (unsigned int src_tiling, -unsigned int dst_tiling) +/** +* fast_copy_dword0: +* @src_tiling: The tile format supported by source +* @dst_tiling: The tile format supported by destination +* +* Set the source and destination tile format types bits for fast copy. +* +* Returns: +* The dwords that will conatin the set bit for source and destination tiling. +*/ + +uint32_t fast_copy_dword0 (unsigned int src_tiling, +unsigned int dst_tiling) {uint32_t dword0 =0 ;@@ -649,9 +660,21 @@ static uint32_t fast_copy_dword0(unsigned int src_tiling,return dword0; } -static uint32_t fast_copy_dword1 (unsigned int src_tiling, -unsigned int dst_tiling, -int bpp) +/** +* fast_copy_dword1: +* @src_tiling: The tile format supported by source +* @dst_tiling: The tile format supported by destination +* @bpp: Fast copy color depth parameter + +* Set the source and destination tile format types and color depth bits for fast copy. +* +* Returns: +* The dword1 that will conatin the set bit for color depth and source ,destination tiling. +*/ + +uint32_t fast_copy_dword1 (unsigned int src_tiling, +unsigned int dst_tiling, +int bpp) {uint32_t dword1 =0 ;lib/intel_batchbuffer.h +6
-0@@ -271,6 +271,12 @@ unsigned int igt_buf_intel_ccs_width(unsigned int gen,unsigned int igt_buf_intel_ccs_height (unsigned int gen,const struct igt_buf *buf); +uint32_t fast_copy_dword0 (unsigned int src_tiling, +unsigned int dst_tiling); +uint32_t fast_copy_dword1 (unsigned int src_tiling, +unsigned int dst_tiling, +int bpp); + void igt_blitter_src_copy(int fd, uint64_t ahnd, uint32_t ctx,tests/i915/gem_blits.c +4
-9@@ -22,6 +22,7 @@* */ +#include "intel_batchbuffer.h" #include "i915/gem.h" #include "i915/gem_create.h" #include "igt.h" @@ -33,6 +34,8 @@#define BCS_SRC_Y (1 << 0)#define BCS_DST_Y (1 << 1) +static uint32_t devid; +struct device {int fd;int gen;@@ -147,8 +150,7 @@ static void buffer_set_tiling(const struct device *device,struct drm_i915_gem_relocation_entry reloc[2 ];struct drm_i915_gem_execbuffer2 execbuf;const bool has_64b_reloc = device->gen >=8 ; -uint32_t stride, size, pitch; -uint32_t *batch; +uint32_t stride, size, pitch, *batch, dword1;int i;if (buffer->tiling == tiling)@@ -209,19 +211,28 @@ static void buffer_set_tiling(const struct device *device, batch[i++] = mask; } - batch[i] = (XY_SRC_COPY_BLT_CMD | -XY_SRC_COPY_BLT_WRITE_ALPHA | -XY_SRC_COPY_BLT_WRITE_RGB ); -if (device->gen >=4 && buffer->tiling) - batch[i] |=XY_SRC_COPY_BLT_SRC_TILED ; -if (device->gen >=4 && tiling) - batch[i] |=XY_SRC_COPY_BLT_DST_TILED ;
tests/i915/gem_blits.c static void buffer_set_tiling(const struct device *device, · line 220
Quoted 10 lines
tests/i915/gem_blits.c +4
-3- batch[i++] |=6 +2 * has_64b_reloc; - pitch = stride;if (device->gen >=4 && tiling) pitch /=4 ; - batch[i++] =3 <<24 |0xcc <<16 | pitch; + +if (intel_graphics_ver (devid) >=IP_VER (12 ,60 )) { + batch[i++] =fast_copy_dword0 (buffer->tiling, tiling); +/* PVC requires tile4 bit to be set for YMAJOR mode */
There is comment here but I do not see any checks for PVC ?
tests/i915/gem_blits.c static void buffer_set_tiling(const struct device *device, · line 223
Quoted 3 lines
tests/i915/gem_blits.c +3
-0+ dword1 =fast_copy_dword1 ( + (buffer->tiling) ? I915_TILING_Yf :I915_TILING_NONE , + (tiling) ? I915_TILING_Yf :I915_TILING_NONE ,32 );
Is it valid for other gen12+ platforms ?
Maybe lib function should get also devid so it will provide it for user and above line should be put in lib.
Regards,
Kamil
Quoted 109 lines
tests/i915/gem_blits.c +49
-22+ batch[i++] = dword1 | pitch; + }else { + batch[i] = (XY_SRC_COPY_BLT_CMD | +XY_SRC_COPY_BLT_WRITE_ALPHA | +XY_SRC_COPY_BLT_WRITE_RGB ); +if (device->gen >=4 && buffer->tiling) + batch[i] |=XY_SRC_COPY_BLT_SRC_TILED ; +if (device->gen >=4 && tiling) + batch[i] |=XY_SRC_COPY_BLT_DST_TILED ; + batch[i++] |=6 +2 * has_64b_reloc; + batch[i++] =3 <<24 |0xcc <<16 | pitch; + } batch[i++] =0 ; batch[i++] = buffer->height <<16 | buffer->width; reloc[0 ].target_handle = obj[0 ].handle;@@ -298,8 +309,7 @@ static bool blit_to_linear(const struct device *device,struct drm_i915_gem_relocation_entry reloc[2 ];struct drm_i915_gem_execbuffer2 execbuf;const bool has_64b_reloc = device->gen >=8 ; -uint32_t *batch; -uint32_t pitch; +uint32_t *batch, pitch, dword1;int i =0 ;igt_assert (buffer->tiling);@@ -354,14 +364,22 @@ static bool blit_to_linear(const struct device *device, batch[i++] = mask; } - batch[i] = (XY_SRC_COPY_BLT_CMD | -XY_SRC_COPY_BLT_WRITE_ALPHA | -XY_SRC_COPY_BLT_WRITE_RGB ); -if (device->gen >=4 && buffer->tiling) - batch[i] |=XY_SRC_COPY_BLT_SRC_TILED ; - batch[i++] |=6 +2 * has_64b_reloc; - - batch[i++] =3 <<24 |0xcc <<16 | buffer->stride; +if (intel_graphics_ver (devid) >=IP_VER (12 ,60 )) { + batch[i++] =fast_copy_dword0 (buffer->tiling,0 ); +/* PVC requires tile4 bit to be set for YMAJOR mode */ + dword1 =fast_copy_dword1 ( + (buffer->tiling) ? I915_TILING_Yf :I915_TILING_NONE , +0 ,32 ); + batch[i++] = dword1 | buffer->stride; + }else { + batch[i] = (XY_SRC_COPY_BLT_CMD | +XY_SRC_COPY_BLT_WRITE_ALPHA | +XY_SRC_COPY_BLT_WRITE_RGB ); +if (device->gen >=4 && buffer->tiling) + batch[i] |=XY_SRC_COPY_BLT_SRC_TILED ; + batch[i++] |=6 +2 * has_64b_reloc; + batch[i++] =3 <<24 |0xcc <<16 | buffer->stride; + } batch[i++] =0 ; batch[i++] = buffer->height <<16 | buffer->width; reloc[0 ].target_handle = obj[0 ].handle;@@ -600,8 +618,7 @@ blit(const struct device *device,struct drm_i915_gem_relocation_entry reloc[2 ];struct drm_i915_gem_execbuffer2 execbuf;const bool has_64b_reloc = device->gen >=8 ; -uint32_t *batch; -uint32_t pitch; +uint32_t *batch, dword1, pitch;int i =0 ;if (src_x <0 ) {@@ -689,20 +706,29 @@ blit(const struct device *device, batch[i++] = mask; } - batch[i] = (XY_SRC_COPY_BLT_CMD | -XY_SRC_COPY_BLT_WRITE_ALPHA | -XY_SRC_COPY_BLT_WRITE_RGB ); -if (device->gen >=4 && src->tiling) - batch[i] |=XY_SRC_COPY_BLT_SRC_TILED ; -if (device->gen >=4 && dst->tiling) - batch[i] |=XY_SRC_COPY_BLT_DST_TILED ; - batch[i++] |=6 +2 * has_64b_reloc; - pitch = dst->stride;if (device->gen >=4 && dst->tiling) pitch /=4 ; - batch[i++] =3 <<24 |0xcc <<16 | pitch; +if (intel_graphics_ver (devid) >=IP_VER (12 ,60 )) { + batch[i++] =fast_copy_dword0 (src->tiling, dst->tiling); +/* PVC requires tile4 bit to be set for YMAJOR mode */ + dword1 =fast_copy_dword1 ( + (src->tiling) ? I915_TILING_Yf :I915_TILING_NONE , + (dst->tiling) ? I915_TILING_Yf :I915_TILING_NONE , +32 ); + batch[i++] = dword1 | pitch; + }else { + batch[i] = (XY_SRC_COPY_BLT_CMD | +XY_SRC_COPY_BLT_WRITE_ALPHA | +XY_SRC_COPY_BLT_WRITE_RGB ); +if (device->gen >=4 && src->tiling) + batch[i] |=XY_SRC_COPY_BLT_SRC_TILED ; +if (device->gen >=4 && dst->tiling) + batch[i] |=XY_SRC_COPY_BLT_DST_TILED ; + batch[i++] |=6 +2 * has_64b_reloc; + batch[i++] =3 <<24 |0xcc <<16 | pitch; + } batch[i++] = dst_y <<16 | dst_x; batch[i++] = (height + dst_y) <<16 | (width + dst_x); reloc[0 ].target_handle = obj[0 ].handle;Signature · 1 line
2.25.1
Hi Kamil,
Below Changes valid for other gen12+ platforms as well so extra pvc specific check not needed I think .
Below are details :
TileX support detail links :-
Bspec :- https://gfxspecs.intel.com/Predator/Home/Index/47982 HSD :- https://hsdes.intel.com/appstore/article/#/1408713480
tests/i915/gem_blits.c static void buffer_set_tiling(const struct device *device, · line 223
Quoted 8 lines
tests/i915/gem_blits.c +6
-0+if (intel_graphics_ver (devid) >=IP_VER (12 ,60 )) { + batch[i++] =fast_copy_dword0 (buffer->tiling, tiling); +/* PVC requires tile4 bit to be set for YMAJOR mode */ + dword1 =fast_copy_dword1 ( + (buffer->tiling) ? I915_TILING_Yf :I915_TILING_NONE , + (tiling) ? I915_TILING_Yf :I915_TILING_NONE ,32 );
I will resend the patch after changing the subject line .
Regards,
Vikas
-----Original Message-----
From: Kamil Konieczny <[email protected]>
Sent: Monday, December 5, 2022 8:30 PM
To: [email protected]
Cc: [email protected]; Srivastava, Vikas <[email protected]>; Dandamudi, Priyanka <[email protected]>
Subject: Re: [PATCH i-g-t] tests/i915: Added XY_FAST_COPY_BLT support for gem_blits
Hi Vikas,
please change subject to
tests/i915/gem_blits: Added XY_FAST_COPY_BLT support for gen12+
and resend.
See also below, I have one question.
Quoted 124 lines · Vikas Srivastava
From: Arjun Melkaveri <[email protected]>
Test case uses legacy command which is not supported starting from PVC. Modified test to use
XY_FAST_COPY_BLT.Signed-off-by Arjun Melkaveri <[email protected]>Signed-off-by Vikas Srivastava <[email protected]>---
lib/intel_batchbuffer.c| 33 ++++++++++++---lib/intel_batchbuffer.h
| 6 +++tests/i915/gem_blits.c| 94
++++++++++++++++++++++++++---------------3 files changed, 94 insertions(+), 39 deletions(-)lib/intel_batchbuffer.c index renamed from lib/intel_batchbuffer.c +0
-0
19a1fbe4d..6a61cbd2f100644lib/intel_batchbuffer.c +28
-5@@ -605,8 +605,19 @@ static uint32_t fast_copy_pitch(unsigned int stride, unsigned int tiling)return stride; } -static uint32_t fast_copy_dword0 (unsigned int src_tiling, -unsigned int dst_tiling) +/** +* fast_copy_dword0: +* @src_tiling: The tile format supported by source +* @dst_tiling: The tile format supported by destination +* +* Set the source and destination tile format types bits for fast copy. +* +* Returns: +* The dwords that will conatin the set bit for source and destination tiling. +*/ + +uint32_t fast_copy_dword0 (unsigned int src_tiling, +unsigned int dst_tiling) {uint32_t dword0 =0 ;@@ -649,9 +660,21 @@ static uint32_t fast_copy_dword0(unsigned int src_tiling,return dword0; } -static uint32_t fast_copy_dword1 (unsigned int src_tiling, -unsigned int dst_tiling, -int bpp) +/** +* fast_copy_dword1: +* @src_tiling: The tile format supported by source +* @dst_tiling: The tile format supported by destination +* @bpp: Fast copy color depth parameter + +* Set the source and destination tile format types and color depth bits for fast copy. +* +* Returns: +* The dword1 that will conatin the set bit for color depth and source ,destination tiling. +*/ + +uint32_t fast_copy_dword1 (unsigned int src_tiling, +unsigned int dst_tiling, +int bpp) {uint32_t dword1 =0 ;lib/intel_batchbuffer.h index renamed from lib/intel_batchbuffer.h +0
-0
2c19c39b1..5ce719951100644lib/intel_batchbuffer.h +6
-0@@ -271,6 +271,12 @@ unsigned int igt_buf_intel_ccs_width(unsigned int gen, unsigned int igt_buf_intel_ccs_height(unsigned int gen,const struct igt_buf *buf); +uint32_t fast_copy_dword0 (unsigned int src_tiling, +unsigned int dst_tiling); +uint32_t fast_copy_dword1 (unsigned int src_tiling, +unsigned int dst_tiling, +int bpp); + void igt_blitter_src_copy(int fd, uint64_t ahnd, uint32_t ctx,tests/i915/gem_blits.c index renamed from tests/i915/gem_blits.c +0
-0
24e83b9f5..63dea350c100644tests/i915/gem_blits.c +4
-9@@ -22,6 +22,7 @@* */ +#include "intel_batchbuffer.h" #include "i915/gem.h" #include "i915/gem_create.h" #include "igt.h" @@ -33,6 +34,8 @@#define BCS_SRC_Y (1 << 0)#define BCS_DST_Y (1 << 1) +static uint32_t devid; +struct device {int fd;int gen;@@ -147,8 +150,7 @@ static void buffer_set_tiling(const struct device *device,struct drm_i915_gem_relocation_entry reloc[2 ];struct drm_i915_gem_execbuffer2 execbuf;const bool has_64b_reloc = device->gen >=8 ; -uint32_t stride, size, pitch; -uint32_t *batch; +uint32_t stride, size, pitch, *batch, dword1;int i;if (buffer->tiling == tiling)@@ -209,19 +211,28 @@ static void buffer_set_tiling(const struct device *device, batch[i++] = mask; } - batch[i] = (XY_SRC_COPY_BLT_CMD | -XY_SRC_COPY_BLT_WRITE_ALPHA | -XY_SRC_COPY_BLT_WRITE_RGB ); -if (device->gen >=4 && buffer->tiling) - batch[i] |=XY_SRC_COPY_BLT_SRC_TILED ; -if (device->gen >=4 && tiling) - batch[i] |=XY_SRC_COPY_BLT_DST_TILED ;
tests/i915/gem_blits.c static void buffer_set_tiling(const struct device *device, · line 220
Quoted 10 lines
tests/i915/gem_blits.c +4
-3- batch[i++] |=6 +2 * has_64b_reloc; - pitch = stride;if (device->gen >=4 && tiling) pitch /=4 ; - batch[i++] =3 <<24 |0xcc <<16 | pitch; + +if (intel_graphics_ver (devid) >=IP_VER (12 ,60 )) { + batch[i++] =fast_copy_dword0 (buffer->tiling, tiling); +/* PVC requires tile4 bit to be set for YMAJOR mode */
There is comment here but I do not see any checks for PVC ?
tests/i915/gem_blits.c static void buffer_set_tiling(const struct device *device, · line 223
Quoted 3 lines
tests/i915/gem_blits.c +3
-0+ dword1 =fast_copy_dword1 ( + (buffer->tiling) ? I915_TILING_Yf :I915_TILING_NONE , + (tiling) ? I915_TILING_Yf :I915_TILING_NONE ,32 );
Is it valid for other gen12+ platforms ?
Maybe lib function should get also devid so it will provide it for user and above line should be put in lib.
Regards,
Kamil
Quoted 109 lines
tests/i915/gem_blits.c +12
-0+ batch[i++] = dword1 | pitch; + }else { + batch[i] = (XY_SRC_COPY_BLT_CMD | +XY_SRC_COPY_BLT_WRITE_ALPHA | +XY_SRC_COPY_BLT_WRITE_RGB ); +if (device->gen >=4 && buffer->tiling) + batch[i] |=XY_SRC_COPY_BLT_SRC_TILED ; +if (device->gen >=4 && tiling) + batch[i] |=XY_SRC_COPY_BLT_DST_TILED ; + batch[i++] |=6 +2 * has_64b_reloc; + batch[i++] =3 <<24 |0xcc <<16 | pitch; + } batch[i++] =0 ; batch[i++] = buffer->height <<16 | buffer->width; reloc[0].target_handle = obj[0].handle; @@ -298,8 +309,7 @@ staticbool blit_to_linear(const struct device *device,
tests/i915/gem_blits.c +17
-10struct drm_i915_gem_relocation_entry reloc[2 ];struct drm_i915_gem_execbuffer2 execbuf;const bool has_64b_reloc = device->gen >=8 ; -uint32_t *batch; -uint32_t pitch; +uint32_t *batch, pitch, dword1;int i =0 ;igt_assert (buffer->tiling);@@ -354,14 +364,22 @@ static bool blit_to_linear(const struct device *device, batch[i++] = mask; } - batch[i] = (XY_SRC_COPY_BLT_CMD | -XY_SRC_COPY_BLT_WRITE_ALPHA | -XY_SRC_COPY_BLT_WRITE_RGB ); -if (device->gen >=4 && buffer->tiling) - batch[i] |=XY_SRC_COPY_BLT_SRC_TILED ; - batch[i++] |=6 +2 * has_64b_reloc; - - batch[i++] =3 <<24 |0xcc <<16 | buffer->stride; +if (intel_graphics_ver (devid) >=IP_VER (12 ,60 )) { + batch[i++] =fast_copy_dword0 (buffer->tiling,0 ); +/* PVC requires tile4 bit to be set for YMAJOR mode */ + dword1 =fast_copy_dword1 ( + (buffer->tiling) ? I915_TILING_Yf :I915_TILING_NONE , +0 ,32 ); + batch[i++] = dword1 | buffer->stride; + }else { + batch[i] = (XY_SRC_COPY_BLT_CMD | +XY_SRC_COPY_BLT_WRITE_ALPHA | +XY_SRC_COPY_BLT_WRITE_RGB ); +if (device->gen >=4 && buffer->tiling) + batch[i] |=XY_SRC_COPY_BLT_SRC_TILED ; + batch[i++] |=6 +2 * has_64b_reloc; + batch[i++] =3 <<24 |0xcc <<16 | buffer->stride; + } batch[i++] =0 ; batch[i++] = buffer->height <<16 | buffer->width; reloc[0].target_handle = obj[0].handle; @@ -600,8 +618,7 @@blit(const struct device *device,
tests/i915/gem_blits.c +20
-13struct drm_i915_gem_relocation_entry reloc[2 ];struct drm_i915_gem_execbuffer2 execbuf;const bool has_64b_reloc = device->gen >=8 ; -uint32_t *batch; -uint32_t pitch; +uint32_t *batch, dword1, pitch;int i =0 ;if (src_x <0 ) {@@ -689,20 +706,29 @@ blit(const struct device *device, batch[i++] = mask; } - batch[i] = (XY_SRC_COPY_BLT_CMD | -XY_SRC_COPY_BLT_WRITE_ALPHA | -XY_SRC_COPY_BLT_WRITE_RGB ); -if (device->gen >=4 && src->tiling) - batch[i] |=XY_SRC_COPY_BLT_SRC_TILED ; -if (device->gen >=4 && dst->tiling) - batch[i] |=XY_SRC_COPY_BLT_DST_TILED ; - batch[i++] |=6 +2 * has_64b_reloc; - pitch = dst->stride;if (device->gen >=4 && dst->tiling) pitch /=4 ; - batch[i++] =3 <<24 |0xcc <<16 | pitch; +if (intel_graphics_ver (devid) >=IP_VER (12 ,60 )) { + batch[i++] =fast_copy_dword0 (src->tiling, dst->tiling); +/* PVC requires tile4 bit to be set for YMAJOR mode */ + dword1 =fast_copy_dword1 ( + (src->tiling) ? I915_TILING_Yf :I915_TILING_NONE , + (dst->tiling) ? I915_TILING_Yf :I915_TILING_NONE , +32 ); + batch[i++] = dword1 | pitch; + }else { + batch[i] = (XY_SRC_COPY_BLT_CMD | +XY_SRC_COPY_BLT_WRITE_ALPHA | +XY_SRC_COPY_BLT_WRITE_RGB ); +if (device->gen >=4 && src->tiling) + batch[i] |=XY_SRC_COPY_BLT_SRC_TILED ; +if (device->gen >=4 && dst->tiling) + batch[i] |=XY_SRC_COPY_BLT_DST_TILED ; + batch[i++] |=6 +2 * has_64b_reloc; + batch[i++] =3 <<24 |0xcc <<16 | pitch; + } batch[i++] = dst_y <<16 | dst_x; batch[i++] = (height + dst_y) <<16 | (width + dst_x); reloc[0 ].target_handle = obj[0 ].handle; --2.25.1