tests/intel/xe_exec_store: Add cachelines and page-sized subtests
PATCH 1/1 tests/intel/xe_exec_store: Add cachelines and page-sized subtests
From: Sai Gowtham Ch <[email protected]>
Intension of these subtests is to verify that each capable engine can store a dword to different cachelines/pages of a buffer object.
--- tests/intel/xe_exec_store.c | 107 ++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+)
tests/intel/xe_exec_store.c +107 -0
@@ -105,6 +105,104 @@ static void store(int fd)xe_vm_destroy (fd, vm); } +#define PAGES 1 +#define NCACHELINES (4096/64) +/** +* SUBTEST: %s +* Description: Verify that each capable engine can store a dword to different +* %arg[1] of a buffer object. +* Test category: functionality test +* +* arg[1]: +* +* @cachelines: cachelines +* @page-sized: page-sized +*/ +static void store_cachelines (int fd,struct drm_xe_engine_class_instance *eci,unsigned int flags) +{ +struct drm_xe_sync sync[2 ] = { + { .flags =DRM_XE_SYNC_SYNCOBJ |DRM_XE_SYNC_SIGNAL , }, + { .flags =DRM_XE_SYNC_SYNCOBJ |DRM_XE_SYNC_SIGNAL , } + }; + +struct drm_xe_exec exec = { + .num_batch_buffer =1 , + .num_syncs =2 , + .syncs =to_user_pointer (&sync), + }; + +int count = flags &PAGES ?NCACHELINES +1 :2 ; +int i, object_index, b =0 ; +uint64_t dst_offset[count]; +uint32_t exec_queues, vm, syncobjs; +uint32_t bo[count], *bo_map[count]; +uint32_t value[NCACHELINES ], *ptr[NCACHELINES ], delta; +uint64_t offset[NCACHELINES ]; +uint64_t ahnd; +uint32_t *batch_map; +size_t bo_size =4096 ; + + bo_size =ALIGN (bo_size ,xe_get_default_alignment (fd)); + vm =xe_vm_create (fd,DRM_XE_VM_CREATE_ASYNC_DEFAULT ,0 ); + ahnd =intel_allocator_open (fd,0 ,INTEL_ALLOCATOR_SIMPLE ); + exec_queues =xe_exec_queue_create (fd, vm, eci,0 ); + syncobjs =syncobj_create (fd,0 ); + sync[0 ].handle =syncobj_create (fd,0 ); + +for (i =0 ; i < count; i++) { + bo[i] =xe_bo_create_flags (fd, vm, bo_size, +visible_vram_if_possible (fd, eci->gt_id)); + bo_map[i] =xe_bo_map (fd, bo[i], bo_size); + dst_offset[i] =intel_allocator_alloc_with_strategy (ahnd, bo[i], + bo_size,0 , +ALLOC_STRATEGY_LOW_TO_HIGH ); +xe_vm_bind_async (fd, vm, eci->gt_id, bo[i],0 , dst_offset[i], bo_size, sync,1 ); + } + + batch_map =xe_bo_map (fd, bo[i-1 ], bo_size); + exec.address = dst_offset[i-1 ]; + +for (unsigned n =0 ; n <NCACHELINES ; n++) { + delta =4 * (n *16 + n %16 ); + value[n] = n | ~n <<16 ; + offset[n] = dst_offset[n % (count -1 )] + delta; + + batch_map[b++] =MI_STORE_DWORD_IMM_GEN4 ; + batch_map[b++] = offset[n]; + batch_map[b++] = offset[n] >>32 ; + batch_map[b++] = value[n]; + } + batch_map[b++] =MI_BATCH_BUFFER_END ; + sync[0 ].flags &=DRM_XE_SYNC_SIGNAL ; + sync[1 ].flags |=DRM_XE_SYNC_SIGNAL ; + sync[1 ].handle = syncobjs; + exec.exec_queue_id = exec_queues; +xe_exec (fd, &exec); +igt_assert (syncobj_wait (fd, &syncobjs,1 ,INT64_MAX ,0 ,NULL )); + +for (unsigned n =0 ; n <NCACHELINES ; n++) { + delta =4 * (n *16 + n %16 ); + value[n] = n | ~n <<16 ; + object_index = n % (count -1 ); + ptr[n] = bo_map[object_index] + delta /4 ; + +igt_assert (*ptr[n] == value[n]); + } + +for ( i =0 ; i < count; i++) { +munmap (bo_map[i], bo_size); +xe_vm_unbind_async (fd, vm,0 ,0 , dst_offset[i], bo_size, sync,1 ); +gem_close (fd, bo[i]); + } + +munmap (batch_map, bo_size); +put_ahnd (ahnd); +syncobj_destroy (fd, sync[0 ].handle); +syncobj_destroy (fd, syncobjs); +xe_exec_queue_destroy (fd, exec_queues); +xe_vm_destroy (fd, vm); +} +/** * SUBTEST: basic-all * Description: Test to verify store dword on all available engines.
@@ -195,6 +293,7 @@ static void store_all(int fd, int gt, int class) igt_main { +struct drm_xe_engine_class_instance *hwe;int fd, class, gt; igt_fixture {
@@ -211,6 +310,14 @@ igt_mainstore_all (fd, gt, class); } + igt_subtest("cachelines") +xe_for_each_hw_engine (fd, hwe) +store_cachelines (fd, hwe,0 ); + + igt_subtest("page-sized") +xe_for_each_hw_engine (fd, hwe) +store_cachelines (fd, hwe,PAGES ); + igt_fixture {xe_device_put (fd);close (fd);
Signature · 1 line
2.39.1
Patchwork
CI[igt-dev] ✓ CI.xeBAT: success for tests/intel/xe_exec_store: Add cachelines and page-sized subtests
== Series Details ==
== Series Details ==
Series: tests/intel/xe_exec_store: Add cachelines and page-sized subtests
URL : https://patchwork.freedesktop.org/series/125889/
State : success
== Summary ==
CI Bug Log - changes from XEIGT_7568_BAT -> XEIGTPW_10100_BAT
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Participating hosts (4 -> 4)
------------------------------
No changes in participating hosts
Known issues
------------
Here are the changes found in XEIGTPW_10100_BAT that come from known issues:
### IGT changes ###
#### Warnings ####
* igt@kms_frontbuffer_tracking@basic:
- bat-adlp-7: [DMESG-FAIL][1] ([Intel XE#282] / [i915#2017]) -> [FAIL][2] ([Intel XE#616] / [Intel XE#750])
[1]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7568/bat-adlp-7/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10100/bat-adlp-7/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[Intel XE#282]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/282
[Intel XE#616]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/616
[Intel XE#750]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/750
[Intel XE#855]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/855
[i915#2017]: https://gitlab.freedesktop.org/drm/intel/issues/2017
Build changes
-------------
* IGT: IGT_7568 -> IGTPW_10100
* Linux: xe-459-76bba03c4f90371e7b2da536b966a49c68d589b0 -> xe-465-34a82567688cfe0c7e63e9cda15b6da4b449abfe
IGTPW_10100: 10100
IGT_7568: 9e3c3791e7e0297f277211b19a3388a1ee87f3d0 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
xe-459-76bba03c4f90371e7b2da536b966a49c68d589b0: 76bba03c4f90371e7b2da536b966a49c68d589b0 xe-465-34a82567688cfe0c7e63e9cda15b6da4b449abfe: 34a82567688cfe0c7e63e9cda15b6da4b449abfe
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10100/index.html
Patchwork
CI[igt-dev] ✗ Fi.CI.BAT: failure for tests/intel/xe_exec_store: Add cachelines and page-sized subtests
In reply to [email protected]== Series Details ==
== Series Details ==
Series: tests/intel/xe_exec_store: Add cachelines and page-sized subtests
URL : https://patchwork.freedesktop.org/series/125889/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_13828 -> IGTPW_10100
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with IGTPW_10100 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes
introduced in IGTPW_10100, please notify your bug team ([email protected]) to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10100/index.html
Participating hosts (35 -> 36)
------------------------------
Additional (3): fi-kbl-soraka bat-kbl-2 bat-dg1-5
Missing (2): bat-mtlp-8 fi-snb-2520m
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_10100:
### IGT changes ###
#### Possible regressions ####
* igt@dmabuf@all-tests@dma_fence_chain:
- fi-hsw-4770: NOTRUN -> [INCOMPLETE][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10100/fi-hsw-4770/igt@dmabuf@all-tests@dma_fence_chain.html
Known issues
------------
Here are the changes found in IGTPW_10100 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@fbdev@info:
- bat-kbl-2: NOTRUN -> [SKIP][2] ([fdo#109271] / [i915#1849])
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10100/bat-kbl-2/igt@[email protected]
* igt@gem_huc_copy@huc-copy:
- fi-kbl-soraka: NOTRUN -> [SKIP][3] ([fdo#109271] / [i915#2190])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10100/fi-kbl-soraka/igt@[email protected]
* igt@gem_lmem_swapping@basic:
- fi-kbl-soraka: NOTRUN -> [SKIP][4] ([fdo#109271] / [i915#4613]) +3 other tests skip
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10100/fi-kbl-soraka/igt@[email protected]
* igt@gem_lmem_swapping@parallel-random-engines:
- bat-kbl-2: NOTRUN -> [SKIP][5] ([fdo#109271]) +39 other tests skip
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10100/bat-kbl-2/igt@[email protected]
* igt@gem_mmap@basic:
- bat-dg1-5: NOTRUN -> [SKIP][6] ([i915#4083])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10100/bat-dg1-5/igt@[email protected]
* igt@gem_tiled_blits@basic:
- fi-bsw-n3050: NOTRUN -> [SKIP][7] ([fdo#109271]) +18 other tests skip
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10100/fi-bsw-n3050/igt@[email protected]
- bat-dg1-5: NOTRUN -> [SKIP][8] ([i915#4077]) +2 other tests skip
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10100/bat-dg1-5/igt@[email protected]
* igt@gem_tiled_pread_basic:
- bat-dg1-5: NOTRUN -> [SKIP][9] ([i915#4079]) +1 other test skip
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10100/bat-dg1-5/igt@gem_tiled_pread_basic.html
* igt@i915_pm_rps@basic-api:
- bat-dg1-5: NOTRUN -> [SKIP][10] ([i915#6621])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10100/bat-dg1-5/igt@[email protected]
* igt@i915_selftest@live@gt_pm:
- fi-kbl-soraka: NOTRUN -> [DMESG-FAIL][11] ([i915#1886])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10100/fi-kbl-soraka/igt@i915_selftest@live@gt_pm.html
* igt@kms_addfb_basic@basic-x-tiled-legacy:
- bat-dg1-5: NOTRUN -> [SKIP][12] ([i915#4212]) +7 other tests skip
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10100/bat-dg1-5/igt@[email protected]
* igt@kms_addfb_basic@basic-y-tiled-legacy:
- bat-dg1-5: NOTRUN -> [SKIP][13] ([i915#4215])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10100/bat-dg1-5/igt@[email protected]
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
- fi-kbl-soraka: NOTRUN -> [SKIP][14] ([fdo#109271]) +9 other tests skip
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10100/fi-kbl-soraka/igt@[email protected]
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- bat-dg1-5: NOTRUN -> [SKIP][15] ([i915#4103] / [i915#4213]) +1 other test skip
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10100/bat-dg1-5/igt@[email protected]
* igt@kms_dsc@dsc-basic:
- bat-dg1-5: NOTRUN -> [SKIP][16] ([i915#3555] / [i915#3840])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10100/bat-dg1-5/igt@[email protected]
* igt@kms_force_connector_basic@force-load-detect:
- bat-dg1-5: NOTRUN -> [SKIP][17] ([fdo#109285])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10100/bat-dg1-5/igt@[email protected]
* igt@kms_hdmi_inject@inject-audio:
- fi-kbl-guc: [PASS][18] -> [FAIL][19] ([IGT#3])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13828/fi-kbl-guc/igt@[email protected]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10100/fi-kbl-guc/igt@[email protected]
- fi-bsw-n3050: NOTRUN -> [FAIL][20] ([IGT#3])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10100/fi-bsw-n3050/igt@[email protected]
- bat-dg1-5: NOTRUN -> [SKIP][21] ([i915#433])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10100/bat-dg1-5/igt@[email protected]
* igt@kms_psr@primary_page_flip:
- bat-dg1-5: NOTRUN -> [SKIP][22] ([i915#1072] / [i915#4078]) +3 other tests skip
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10100/bat-dg1-5/igt@kms_psr@primary_page_flip.html
* igt@kms_setmode@basic-clone-single-crtc:
- bat-dg1-5: NOTRUN -> [SKIP][23] ([i915#3555])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10100/bat-dg1-5/igt@[email protected]
* igt@prime_vgem@basic-fence-read:
- bat-dg1-5: NOTRUN -> [SKIP][24] ([i915#3708]) +3 other tests skip
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10100/bat-dg1-5/igt@[email protected]
* igt@prime_vgem@basic-gtt:
- bat-dg1-5: NOTRUN -> [SKIP][25] ([i915#3708] / [i915#4077]) +1 other test skip
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10100/bat-dg1-5/igt@[email protected]
#### Possible fixes ####
* igt@i915_selftest@live@perf:
- fi-hsw-4770: [INCOMPLETE][26] -> [PASS][27]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13828/fi-hsw-4770/igt@i915_selftest@[email protected]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10100/fi-hsw-4770/igt@i915_selftest@[email protected]
* igt@kms_pipe_crc_basic@read-crc-frame-sequence@pipe-d-edp-1:
- bat-rplp-1: [ABORT][28] ([i915#8668]) -> [PASS][29]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13828/bat-rplp-1/igt@kms_pipe_crc_basic@[email protected]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10100/bat-rplp-1/igt@kms_pipe_crc_basic@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[IGT#3]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/3
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
[i915#1886]: https://gitlab.freedesktop.org/drm/intel/issues/1886
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#3840]: https://gitlab.freedesktop.org/drm/intel/issues/3840
[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#433]: https://gitlab.freedesktop.org/drm/intel/issues/433
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
[i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
[i915#8668]: https://gitlab.freedesktop.org/drm/intel/issues/8668
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_7568 -> IGTPW_10100
CI-20190529: 20190529
CI_DRM_13828: 03d8fa0115d6531bf0ea276f13f9b685296bc38b @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_10100: 10100
IGT_7568: 9e3c3791e7e0297f277211b19a3388a1ee87f3d0 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Testlist changes
----------------
+igt@xe_exec_store@cachelines +igt@xe_exec_store@page-sized -igt@kms_pipe_crc_basic@darkscreen-read-crc -igt@kms_pipe_crc_basic@negative-darkscreen-read-crc
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10100/index.html