intel/xe_exec_store: Add Persistent subtest
PATCH 1/1 intel/xe_exec_store: Add Persistent subtest
From: Sai Gowtham Ch <[email protected]>
Add persistent subtest to validate MI_PRT_BATCH_BUFFER_START.
--- tests/intel/xe_exec_store.c | 87 +++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+)
tests/intel/xe_exec_store.c +87 -0
@@ -23,6 +23,7 @@#define MAX_INSTANCE 9#define STORE 0#define COND_BATCH 1 +#define MI_PRT_BATCH_BUFFER_START (0x39 << 23)struct data {uint32_t batch[16 ];
@@ -74,6 +75,24 @@ static void cond_batch(struct data *data, uint64_t addr, int value) data->addr = batch_addr; } +static void persistance_batch (struct data *data,uint64_t addr) +{ +int b; +uint64_t batch_offset = (char *)&(data->batch) - (char *)data; +uint64_t batch_addr = addr + batch_offset; +uint64_t sdi_offset = (char *)&(data->data) - (char *)data; +uint64_t sdi_addr = addr + sdi_offset; + + b =0 ; + data->batch[b++] =MI_BATCH_BUFFER_START ; + data->batch[b++] =MI_PRT_BATCH_BUFFER_START ; + data->batch[b++] = sdi_addr; + data->batch[b++] = sdi_addr >>32 ; + data->batch[b++] =MI_BATCH_BUFFER_END ; + + data->addr = batch_addr; + +}/** * SUBTEST: basic-store * Description: Basic test to verify store dword.
@@ -246,6 +265,71 @@ static void store_cachelines(int fd, struct drm_xe_engine_class_instance *eci,xe_vm_destroy (fd, vm); } +/** +* SUBTEST: persistent +* DESCRIPTION: Validate MI_PRT_BATCH_BUFFER_START functionality +*/ +static void persistent (int fd) +{ +struct drm_xe_sync sync = { + .type =DRM_XE_SYNC_TYPE_SYNCOBJ , + .flags =DRM_XE_SYNC_FLAG_SIGNAL , + }; +struct drm_xe_exec exec = { + .num_batch_buffer =1 , + .num_syncs =1 , + .syncs =to_user_pointer (&sync), + }; +struct data *data1; +struct data *data2; +struct drm_xe_engine *engine; +uint32_t vm, exec_queue,syncobj; +uint32_t batch1, batch2; +uint64_t addr =0x100000 ; +int value =0x123456 ; +size_t batch_size =4096 ; + + syncobj =syncobj_create (fd,0 ); + sync.handle = syncobj; + + vm =xe_vm_create (fd,DRM_XE_VM_CREATE_FLAG_ASYNC_DEFAULT ,0 ); + batch_size =ALIGN (batch_size +xe_cs_prefetch_size (fd), +xe_get_default_alignment (fd)); + + engine =xe_engine (fd,1 ); + batch1 =xe_bo_create (fd, vm, batch_size, +vram_if_possible (fd, engine->instance.gt_id), +DRM_XE_GEM_CREATE_FLAG_NEEDS_VISIBLE_VRAM ); + batch2 =xe_bo_create (fd, vm, batch_size, +vram_if_possible (fd, engine->instance.gt_id), +DRM_XE_GEM_CREATE_FLAG_NEEDS_VISIBLE_VRAM ); + +xe_vm_bind_async (fd, vm, engine->instance.gt_id, batch1,0 , addr, batch_size, &sync,1 ); + data1 =xe_bo_map (fd, batch1, batch_size); + data2 =xe_bo_map (fd, batch2, batch_size); + +store_dword_batch (data1, addr, value); +persistance_batch (data2, addr); + + exec_queue =xe_exec_queue_create (fd, vm, &engine->instance,0 ); + exec.exec_queue_id = exec_queue; + exec.address = data2->addr; + sync.flags &=DRM_XE_SYNC_FLAG_SIGNAL ; +xe_exec (fd, &exec); + +igt_assert (syncobj_wait (fd, &syncobj,1 ,INT64_MAX ,0 ,NULL )); +igt_assert_eq (data1->data, value); + +syncobj_destroy (fd, syncobj); +munmap (data1, batch_size); +munmap (data2, batch_size); +gem_close (fd, batch1); +gem_close (fd, batch2); + +xe_exec_queue_destroy (fd, exec_queue); +xe_vm_destroy (fd, vm); +} + igt_main {struct drm_xe_engine_class_instance *hwe;
@@ -285,6 +369,9 @@ igt_mainxe_for_each_engine (fd, hwe)store_cachelines (fd, hwe,PAGES ); + igt_subtest("persistent") +persistent (fd); + igt_fixture {xe_device_put (fd);close (fd);
Signature · 1 line
2.39.1
Patchwork
CI✓ CI.xeBAT: success for intel/xe_exec_store: Add Persistent subtest
== Series Details ==
== Series Details ==
Series: intel/xe_exec_store: Add Persistent subtest
URL : https://patchwork.freedesktop.org/series/127748/
State : success
== Summary ==
CI Bug Log - changes from XEIGT_7638_BAT -> XEIGTPW_10413_BAT
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Participating hosts (4 -> 4)
------------------------------
No changes in participating hosts
Known issues
------------
Here are the changes found in XEIGTPW_10413_BAT that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@kms_frontbuffer_tracking@basic:
- bat-adlp-7: [PASS][1] -> [DMESG-FAIL][2] ([Intel XE#1033])
[1]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7638/bat-adlp-7/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10413/bat-adlp-7/igt@[email protected]
* igt@xe_prime_self_import@basic-with_one_bo:
- bat-pvc-2: [PASS][3] -> [FAIL][4] ([Intel XE#999]) +1 other test fail
[3]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7638/bat-pvc-2/igt@xe_prime_self_import@basic-with_one_bo.html
[4]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10413/bat-pvc-2/igt@xe_prime_self_import@basic-with_one_bo.html
#### Possible fixes ####
* igt@xe_create@create-execqueues-noleak:
- bat-adlp-7: [FAIL][5] ([Intel XE#524]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7638/bat-adlp-7/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10413/bat-adlp-7/igt@[email protected]
* igt@xe_prime_self_import@basic-with_fd_dup:
- bat-atsm-2: [FAIL][7] ([Intel XE#999]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7638/bat-atsm-2/igt@xe_prime_self_import@basic-with_fd_dup.html
[8]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10413/bat-atsm-2/igt@xe_prime_self_import@basic-with_fd_dup.html
[Intel XE#1033]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1033
[Intel XE#524]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/524
[Intel XE#999]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/999
Build changes
-------------
* IGT: IGT_7638 -> IGTPW_10413
IGTPW_10413: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10413/index.html
IGT_7638: 52ca619dfeae57348b957778dcfdd8117d8ff9f0 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
xe-577-5cd1893366708380854f4694ae57417192458a6b: 5cd1893366708380854f4694ae57417192458a6b
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10413/index.html
Patchwork
CI✗ Fi.CI.BAT: failure for intel/xe_exec_store: Add Persistent subtest
In reply to [email protected]== Series Details ==
== Series Details ==
Series: intel/xe_exec_store: Add Persistent subtest
URL : https://patchwork.freedesktop.org/series/127748/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_14012 -> IGTPW_10413
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with IGTPW_10413 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes
introduced in IGTPW_10413, 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_10413/index.html
Participating hosts (34 -> 36)
------------------------------
Additional (3): bat-adlm-1 bat-adlp-11 bat-rpls-3
Missing (1): fi-snb-2520m
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_10413:
### IGT changes ###
#### Possible regressions ####
* igt@i915_suspend@basic-s2idle-without-i915:
- bat-jsl-1: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14012/bat-jsl-1/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10413/bat-jsl-1/igt@[email protected]
* igt@kms_cursor_legacy@basic-flip-after-cursor-varying-size:
- bat-adlm-1: NOTRUN -> [SKIP][3] +17 other tests skip
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10413/bat-adlm-1/igt@[email protected]
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.
* igt@i915_selftest@live@hangcheck:
- {bat-rpls-3}: NOTRUN -> [DMESG-WARN][4]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10413/bat-rpls-3/igt@i915_selftest@[email protected]
* {igt@kms_psr@psr-cursor-plane-move}:
- {bat-rpls-3}: NOTRUN -> [SKIP][5] +42 other tests skip
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10413/bat-rpls-3/igt@[email protected]
Known issues
------------
Here are the changes found in IGTPW_10413 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@debugfs_test@basic-hwmon:
- bat-adlm-1: NOTRUN -> [SKIP][6] ([i915#3826])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10413/bat-adlm-1/igt@[email protected]
- bat-adlp-11: NOTRUN -> [SKIP][7] ([i915#9318])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10413/bat-adlp-11/igt@[email protected]
* igt@fbdev@eof:
- bat-adlp-11: NOTRUN -> [SKIP][8] ([i915#2582]) +3 other tests skip
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10413/bat-adlp-11/igt@[email protected]
* igt@fbdev@info:
- bat-adlp-11: NOTRUN -> [SKIP][9] ([i915#1849] / [i915#2582])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10413/bat-adlp-11/igt@[email protected]
- bat-adlm-1: NOTRUN -> [SKIP][10] ([i915#1849] / [i915#2582])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10413/bat-adlm-1/igt@[email protected]
* igt@fbdev@read:
- bat-adlm-1: NOTRUN -> [SKIP][11] ([i915#2582]) +3 other tests skip
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10413/bat-adlm-1/igt@[email protected]
* igt@gem_lmem_swapping@parallel-random-engines:
- bat-adlm-1: NOTRUN -> [SKIP][12] ([i915#4613]) +3 other tests skip
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10413/bat-adlm-1/igt@[email protected]
* igt@gem_lmem_swapping@verify-random:
- bat-adlp-11: NOTRUN -> [SKIP][13] ([i915#4613]) +3 other tests skip
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10413/bat-adlp-11/igt@[email protected]
* igt@gem_tiled_pread_basic:
- bat-adlp-11: NOTRUN -> [SKIP][14] ([i915#3282])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10413/bat-adlp-11/igt@gem_tiled_pread_basic.html
- bat-adlm-1: NOTRUN -> [SKIP][15] ([i915#3282])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10413/bat-adlm-1/igt@gem_tiled_pread_basic.html
* igt@i915_pm_rps@basic-api:
- bat-adlm-1: NOTRUN -> [SKIP][16] ([i915#6621])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10413/bat-adlm-1/igt@[email protected]
- bat-adlp-11: NOTRUN -> [SKIP][17] ([i915#6621])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10413/bat-adlp-11/igt@[email protected]
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- bat-adlp-11: NOTRUN -> [SKIP][18] ([i915#5608] / [i915#9866]) +1 other test skip
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10413/bat-adlp-11/igt@[email protected]
* igt@kms_cursor_legacy@basic-flip-before-cursor-legacy:
- bat-adlp-11: NOTRUN -> [SKIP][19] ([i915#9824] / [i915#9866])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10413/bat-adlp-11/igt@[email protected]
* igt@kms_flip@basic-flip-vs-dpms:
- bat-adlp-11: NOTRUN -> [SKIP][20] ([i915#3637]) +3 other tests skip
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10413/bat-adlp-11/igt@[email protected]
* igt@kms_flip@basic-flip-vs-wf_vblank:
- bat-adlm-1: NOTRUN -> [SKIP][21] ([i915#3637]) +3 other tests skip
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10413/bat-adlm-1/igt@kms_flip@basic-flip-vs-wf_vblank.html
* igt@kms_force_connector_basic@force-load-detect:
- bat-adlm-1: NOTRUN -> [SKIP][22] ([fdo#109285])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10413/bat-adlm-1/igt@[email protected]
* igt@kms_force_connector_basic@prune-stale-modes:
- bat-adlp-11: NOTRUN -> [SKIP][23] ([i915#4093]) +3 other tests skip
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10413/bat-adlp-11/igt@[email protected]
* igt@kms_frontbuffer_tracking@basic:
- bat-adlp-11: NOTRUN -> [SKIP][24] ([i915#4342] / [i915#5354])
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10413/bat-adlp-11/igt@[email protected]
- bat-adlm-1: NOTRUN -> [SKIP][25] ([i915#1849] / [i915#4342])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10413/bat-adlm-1/igt@[email protected]
* igt@kms_hdmi_inject@inject-audio:
- bat-adlp-11: NOTRUN -> [SKIP][26] ([i915#4369])
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10413/bat-adlp-11/igt@[email protected]
* igt@kms_pipe_crc_basic@read-crc:
- bat-adlp-11: NOTRUN -> [SKIP][27] ([i915#9866]) +14 other tests skip
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10413/bat-adlp-11/igt@[email protected]
* igt@kms_pm_backlight@basic-brightness:
- bat-adlm-1: NOTRUN -> [SKIP][28] ([i915#5354])
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10413/bat-adlm-1/igt@[email protected]
- bat-adlp-11: NOTRUN -> [SKIP][29] ([i915#9812])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10413/bat-adlp-11/igt@[email protected]
* igt@kms_setmode@basic-clone-single-crtc:
- bat-adlp-11: NOTRUN -> [SKIP][30] ([i915#3555])
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10413/bat-adlp-11/igt@[email protected]
- bat-adlm-1: NOTRUN -> [SKIP][31] ([i915#3555])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10413/bat-adlm-1/igt@[email protected]
* igt@prime_vgem@basic-fence-flip:
- bat-adlm-1: NOTRUN -> [SKIP][32] ([i915#3708]) +3 other tests skip
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10413/bat-adlm-1/igt@[email protected]
- bat-adlp-11: NOTRUN -> [SKIP][33] ([fdo#109295] / [i915#3708])
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10413/bat-adlp-11/igt@[email protected]
* igt@prime_vgem@basic-write:
- bat-adlp-11: NOTRUN -> [SKIP][34] ([fdo#109295] / [i915#3291] / [i915#3708]) +2 other tests skip
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10413/bat-adlp-11/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#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#3826]: https://gitlab.freedesktop.org/drm/intel/issues/3826
[i915#4093]: https://gitlab.freedesktop.org/drm/intel/issues/4093
[i915#4342]: https://gitlab.freedesktop.org/drm/intel/issues/4342
[i915#4369]: https://gitlab.freedesktop.org/drm/intel/issues/4369
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
[i915#5608]: https://gitlab.freedesktop.org/drm/intel/issues/5608
[i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
[i915#9318]: https://gitlab.freedesktop.org/drm/intel/issues/9318
[i915#9673]: https://gitlab.freedesktop.org/drm/intel/issues/9673
[i915#9812]: https://gitlab.freedesktop.org/drm/intel/issues/9812
[i915#9824]: https://gitlab.freedesktop.org/drm/intel/issues/9824
[i915#9866]: https://gitlab.freedesktop.org/drm/intel/issues/9866
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_7638 -> IGTPW_10413
CI-20190529: 20190529
CI_DRM_14012: 3dbd9e32db3edc72f8b7d82a75c0e7355e1bac92 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_10413: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10413/index.html
IGT_7638: 52ca619dfeae57348b957778dcfdd8117d8ff9f0 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Testlist changes
----------------
+igt@xe_exec_store@persistent
-igt@kms_darkscreen_detection@basic
-igt@kms_darkscreen_detection@negative
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10413/index.html
Quoted 25 lines
-----Original Message-----
From: igt-dev <[email protected]> On Behalf Of [email protected]
Sent: Wednesday, December 13, 2023 6:29 PM
To: [email protected]; Ch, Sai Gowtham <[email protected]>
Subject: [PATCH i-g-t] intel/xe_exec_store: Add Persistent subtestFrom: Sai Gowtham Ch <[email protected]>
Add persistent subtest to validate
MI_PRT_BATCH_BUFFER_START.Signed-off-by Sai Gowtham Ch <[email protected]>--- tests/intel/xe_exec_store.c | 87 +++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+)tests/intel/xe_exec_store.c index renamed from tests/intel/xe_exec_store.c +0
-0
7a66d744c..ea7ecb01f100644
tests/intel/xe_exec_store.c line 26
Quoted 4 lines
tests/intel/xe_exec_store.c +1
-0@@ -23,6 +23,7 @@#define MAX_INSTANCE 9#define STORE 0#define COND_BATCH 1 +#define MI_PRT_BATCH_BUFFER_START (0x39 << 23)
Move this command to a library
Quoted 4 lines
tests/intel/xe_exec_store.c +0
-0struct data {uint32_t batch[16 ];
tests/intel/xe_exec_store.c static void cond_batch(struct data *data, uint64_t · line 84
Quoted 10 lines
tests/intel/xe_exec_store.c +6
-0@@ -74,6 +75,24 @@ static void cond_batch(struct data *data, uint64_t addr, int value) data->addr = batch_addr; } +static void persistance_batch (struct data *data,uint64_t addr) { +int b; +uint64_t batch_offset = (char *)&(data->batch) - (char *)data; +uint64_t batch_addr = addr + batch_offset; +uint64_t sdi_offset = (char *)&(data->data) - (char *)data; +uint64_t sdi_addr = addr + sdi_offset;
Rename sdi_offset/addr as they no longer represent store dword addr but a persistent batch buffer addr.
Quoted 27 lines
tests/intel/xe_exec_store.c +19
-0+ + b =0 ; + data->batch[b++] =MI_BATCH_BUFFER_START ; + data->batch[b++] =MI_PRT_BATCH_BUFFER_START ; + data->batch[b++] = sdi_addr; + data->batch[b++] = sdi_addr >>32 ; + data->batch[b++] =MI_BATCH_BUFFER_END ; + + data->addr = batch_addr; + +}/** * SUBTEST: basic-store * Description: Basic test to verify store dword. @@ -246,6 +265,71 @@ static void store_cachelines(int fd, structdrm_xe_engine_class_instance *eci,xe_vm_destroy (fd ,vm ); } +/** +* SUBTEST: persistent +* DESCRIPTION: Validate MI_PRT_BATCH_BUFFER_START functionality */ +static void persistent (int fd) { +struct drm_xe_sync sync = { + .type =DRM_XE_SYNC_TYPE_SYNCOBJ , + .flags =DRM_XE_SYNC_FLAG_SIGNAL , + };
tests/intel/xe_exec_store.c static void store_cachelines(int fd, struct · line 286
Quoted 10 lines
tests/intel/xe_exec_store.c +10
-0+struct drm_xe_exec exec = { + .num_batch_buffer =1 , + .num_syncs =1 , + .syncs =to_user_pointer (&sync), + }; +struct data *data1; +struct data *data2; +struct drm_xe_engine *engine; +uint32_t vm, exec_queue,syncobj; +uint32_t batch1, batch2;
Rename data1, data2, batch1 and batch2 to represent what are they intended for ?
Thanks,
Rahul
Quoted 24 lines
tests/intel/xe_exec_store.c +18
-0+uint64_t addr =0x100000 ; +int value =0x123456 ; +size_t batch_size =4096 ; + + syncobj =syncobj_create (fd,0 ); + sync.handle = syncobj; + + vm =xe_vm_create (fd,DRM_XE_VM_CREATE_FLAG_ASYNC_DEFAULT ,0 ); + batch_size =ALIGN (batch_size +xe_cs_prefetch_size (fd), +xe_get_default_alignment (fd)); + + engine =xe_engine (fd,1 ); + batch1 =xe_bo_create (fd, vm, batch_size, +vram_if_possible (fd, engine->instance.gt_id), +DRM_XE_GEM_CREATE_FLAG_NEEDS_VISIBLE_VRAM ); + batch2 = xe_bo_create(fd, vm, batch_size, + vram_if_possible(fd, engine->instance.gt_id), +
DRM_XE_GEM_CREATE_FLAG_NEEDS_VISIBLE_VRAM);tests/intel/xe_exec_store.c +2
-0+ + xe_vm_bind_async(fd, vm, engine->instance.gt_id, batch1, 0, addr,
batch_size, &sync, 1);
tests/intel/xe_exec_store.c static void store_cachelines(int fd, struct drm_xe_engine_class_instance *eci, · line 311
Quoted 4 lines
tests/intel/xe_exec_store.c +4
-0+ data1 =xe_bo_map (fd, batch1, batch_size); + data2 =xe_bo_map (fd, batch2, batch_size); + +store_dword_batch (data1, addr, value);
Persistent batch buffer should not contain MI_BATCH_BUFFER_START , you might have to rewrite a new helper to create store dword batch without MI_BATCH_BUFFER_START.
Thanks,
Rahul
Quoted 37 lines
tests/intel/xe_exec_store.c +3
-0+persistance_batch (data2, addr); + + exec_queue = xe_exec_queue_create(fd, vm, &engine->instance,0);
tests/intel/xe_exec_store.c +18
-0+ exec.exec_queue_id = exec_queue; + exec.address = data2->addr; + sync.flags &=DRM_XE_SYNC_FLAG_SIGNAL ; +xe_exec (fd, &exec); + +igt_assert (syncobj_wait (fd, &syncobj,1 ,INT64_MAX ,0 ,NULL )); +igt_assert_eq (data1->data, value); + +syncobj_destroy (fd, syncobj); +munmap (data1, batch_size); +munmap (data2, batch_size); +gem_close (fd, batch1); +gem_close (fd, batch2); + +xe_exec_queue_destroy (fd, exec_queue); +xe_vm_destroy (fd, vm); +} + igt_main { struct drm_xe_engine_class_instance *hwe; @@ -285,6 +369,9 @@
igt_maintests/intel/xe_exec_store.c +3
-1xe_for_each_engine (fd, hwe)store_cachelines (fd, hwe,PAGES ); + igt_subtest("persistent") +persistent (fd); + igt_fixture {xe_device_put (fd);close (fd); --2.39.1