lib/xe/xe_spin: Integrate igt_spin_new with Xe.
PATCH 1/1 lib/xe/xe_spin: Integrate igt_spin_new with Xe.
From: Sai Gowtham Ch <[email protected]>
Extending the spin_create implementation and allocator handle support in xe, where it submits dummy work loads to engine. This Implementation is wrapped around vm_bind and unbind as we are supposed to do it manually for xe.
--- lib/xe/xe_spin.c | 39 +++++++++++++++++++++++++++++++++++++++ lib/xe/xe_spin.h | 9 +++++++++ 2 files changed, 48 insertions(+)
lib/xe/xe_spin.c +39 -0
@@ -82,6 +82,45 @@ void xe_spin_end(struct xe_spin *spin) spin->end =0 ; } +void xe_spin_new (int fd,struct xe_spin *spin,struct drm_xe_engine_class_instance *eci) +{ +size_t bo_size =xe_get_default_alignment (fd); +uint32_t syncobj; +uint64_t ahnd = spin->ahnd, addr; +struct drm_xe_sync sync = { + .flags =DRM_XE_SYNC_SYNCOBJ |DRM_XE_SYNC_SIGNAL , + }; +struct drm_xe_exec exec = { + .num_batch_buffer =1 , + .num_syncs =1 , + .syncs =to_user_pointer (&sync), + }; + + spin->vm =xe_vm_create (fd,0 ,0 ); + spin->bo =xe_bo_create (fd, eci->gt_id, spin->vm, bo_size); + spin->engine =xe_engine_create (fd, spin->vm, eci,0 ); + syncobj =syncobj_create (fd,0 ); + +if (ahnd) + addr =intel_allocator_alloc_with_strategy (ahnd, spin->bo, bo_size,0 ,ALLOC_STRATEGY_LOW_TO_HIGH ); + +xe_vm_bind_sync (fd, spin->vm, spin->bo,0 , addr, bo_size); + +xe_spin_init (spin, addr, true); + exec.engine_id = spin->engine; + exec.address = addr; + sync.handle = syncobj; + +igt_assert_eq (igt_ioctl (fd,DRM_IOCTL_XE_EXEC , &exec),0 ); + +} + +void xe_spin_free (struct xe_spin *spin) +{ +xe_engine_destroy (spin->fd, spin->engine); +xe_vm_destroy (spin->fd, spin->vm); +gem_close (spin->fd, spin->bo); +}void xe_cork_init (int fd,struct drm_xe_engine_class_instance *hwe,struct xe_cork *cork) {
lib/xe/xe_spin.h +9 -0
@@ -17,15 +17,24 @@/* Mapped GPU object */ struct xe_spin {uint32_t batch[16 ]; +int fd;uint64_t pad;uint32_t start;uint32_t end; +uint64_t ahnd; +uint32_t engine; +uint32_t vm; +uint32_t bo; + };void xe_spin_init (struct xe_spin *spin,uint64_t addr,bool preempt);bool xe_spin_started (struct xe_spin *spin);void xe_spin_wait_started (struct xe_spin *spin);void xe_spin_end (struct xe_spin *spin); +void xe_spin_new (int fd,struct xe_spin *spin, +struct drm_xe_engine_class_instance *hwe); +void xe_spin_free (struct xe_spin *spin);struct xe_cork {struct xe_spin *spin;
Signature · 1 line
2.39.1
Patchwork
CI[igt-dev] ✓ Fi.CI.BAT: success for lib/xe/xe_spin: Integrate igt_spin_new with Xe.
== Series Details ==
== Series Details ==
Series: lib/xe/xe_spin: Integrate igt_spin_new with Xe.
URL : https://patchwork.freedesktop.org/series/116880/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_13053 -> IGTPW_8844
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8844/index.html
Participating hosts (38 -> 38)
------------------------------
Additional (1): bat-mtlp-8
Missing (1): fi-snb-2520m
Known issues
------------
Here are the changes found in IGTPW_8844 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@live@workarounds:
- bat-rpls-1: [PASS][1] -> [INCOMPLETE][2] ([i915#4983] / [i915#7677])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13053/bat-rpls-1/igt@i915_selftest@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8844/bat-rpls-1/igt@i915_selftest@[email protected]
* igt@kms_chamelium_hpd@common-hpd-after-suspend:
- bat-adln-1: NOTRUN -> [SKIP][3] ([i915#7828])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8844/bat-adln-1/igt@[email protected]
#### Possible fixes ####
* igt@dmabuf@all-tests@dma_fence:
- bat-adln-1: [FAIL][4] ([i915#8064]) -> [PASS][5]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13053/bat-adln-1/igt@dmabuf@all-tests@dma_fence.html
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8844/bat-adln-1/igt@dmabuf@all-tests@dma_fence.html
* igt@dmabuf@all-tests@sanitycheck:
- bat-adln-1: [ABORT][6] ([i915#8058] / [i915#8144]) -> [PASS][7]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13053/bat-adln-1/igt@dmabuf@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8844/bat-adln-1/igt@dmabuf@[email protected]
* igt@i915_selftest@live@gt_heartbeat:
- fi-kbl-soraka: [DMESG-FAIL][8] ([i915#5334] / [i915#7872]) -> [PASS][9]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13053/fi-kbl-soraka/igt@i915_selftest@live@gt_heartbeat.html
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8844/fi-kbl-soraka/igt@i915_selftest@live@gt_heartbeat.html
* igt@i915_selftest@live@migrate:
- bat-adlp-9: [DMESG-FAIL][10] ([i915#7699]) -> [PASS][11]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13053/bat-adlp-9/igt@i915_selftest@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8844/bat-adlp-9/igt@i915_selftest@[email protected]
* igt@kms_pipe_crc_basic@suspend-read-crc@pipe-b-hdmi-a-1:
- fi-rkl-11600: [FAIL][12] ([fdo#103375]) -> [PASS][13]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13053/fi-rkl-11600/igt@kms_pipe_crc_basic@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8844/fi-rkl-11600/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).
[fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
[i915#7677]: https://gitlab.freedesktop.org/drm/intel/issues/7677
[i915#7699]: https://gitlab.freedesktop.org/drm/intel/issues/7699
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#7872]: https://gitlab.freedesktop.org/drm/intel/issues/7872
[i915#8058]: https://gitlab.freedesktop.org/drm/intel/issues/8058
[i915#8064]: https://gitlab.freedesktop.org/drm/intel/issues/8064
[i915#8144]: https://gitlab.freedesktop.org/drm/intel/issues/8144
[i915#8361]: https://gitlab.freedesktop.org/drm/intel/issues/8361
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_7266 -> IGTPW_8844
CI-20190529: 20190529
CI_DRM_13053: 63a6d68541b38408d5be8345f3e4a561661f68cb @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_8844: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8844/index.html
IGT_7266: 94411dd85f9ad6d76fb7b2097197122703a3914c @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8844/index.html
Patchwork
CI[igt-dev] ✓ Fi.CI.IGT: success for lib/xe/xe_spin: Integrate igt_spin_new with Xe.
In reply to [email protected]== Series Details ==
== Series Details ==
Series: lib/xe/xe_spin: Integrate igt_spin_new with Xe.
URL : https://patchwork.freedesktop.org/series/116880/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_13053_full -> IGTPW_8844_full
====================================================
Summary
-------
**WARNING**
Minor unknown changes coming with IGTPW_8844_full need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in IGTPW_8844_full, please notify your bug team 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_8844/index.html
Participating hosts (7 -> 7)
------------------------------
No changes in participating hosts
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_8844_full:
### IGT changes ###
#### Warnings ####
* igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-pri-shrfb-draw-mmap-cpu:
- shard-snb: [SKIP][1] ([fdo#109271]) -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13053/shard-snb4/igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-pri-shrfb-draw-mmap-cpu.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8844/shard-snb1/igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-pri-shrfb-draw-mmap-cpu.html
Known issues
------------
Here are the changes found in IGTPW_8844_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_ctx_persistence@hang:
- shard-snb: NOTRUN -> [SKIP][3] ([fdo#109271] / [i915#1099])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8844/shard-snb6/igt@[email protected]
* igt@gem_exec_capture@capture-invisible@smem0:
- shard-apl: NOTRUN -> [SKIP][4] ([fdo#109271] / [i915#6334])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8844/shard-apl3/igt@gem_exec_capture@[email protected]
* igt@gem_exec_fair@basic-deadline:
- shard-apl: [PASS][5] -> [FAIL][6] ([i915#2846])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13053/shard-apl1/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8844/shard-apl2/igt@[email protected]
* igt@gem_exec_fair@basic-pace-share@rcs0:
- shard-glk: [PASS][7] -> [FAIL][8] ([i915#2842]) +2 similar issues
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13053/shard-glk7/igt@gem_exec_fair@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8844/shard-glk1/igt@gem_exec_fair@[email protected]
* igt@gem_exec_fair@basic-pace-solo@rcs0:
- shard-apl: [PASS][9] -> [FAIL][10] ([i915#2842])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13053/shard-apl2/igt@gem_exec_fair@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8844/shard-apl6/igt@gem_exec_fair@[email protected]
* igt@gem_lmem_swapping@heavy-verify-multi:
- shard-apl: NOTRUN -> [SKIP][11] ([fdo#109271] / [i915#4613])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8844/shard-apl2/igt@[email protected]
* igt@i915_pm_dc@dc9-dpms:
- shard-apl: [PASS][12] -> [SKIP][13] ([fdo#109271])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13053/shard-apl6/igt@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8844/shard-apl1/igt@[email protected]
* igt@kms_ccs@pipe-a-bad-pixel-format-4_tiled_dg2_rc_ccs_cc:
- shard-apl: NOTRUN -> [SKIP][14] ([fdo#109271]) +45 similar issues
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8844/shard-apl6/igt@kms_ccs@pipe-a-bad-pixel-format-4_tiled_dg2_rc_ccs_cc.html
* igt@kms_ccs@pipe-c-bad-rotation-90-y_tiled_gen12_mc_ccs:
- shard-glk: NOTRUN -> [SKIP][15] ([fdo#109271] / [i915#3886]) +1 similar issue
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8844/shard-glk5/igt@kms_ccs@pipe-c-bad-rotation-90-y_tiled_gen12_mc_ccs.html
* igt@kms_ccs@pipe-c-crc-primary-basic-y_tiled_gen12_mc_ccs:
- shard-apl: NOTRUN -> [SKIP][16] ([fdo#109271] / [i915#3886])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8844/shard-apl7/igt@kms_ccs@pipe-c-crc-primary-basic-y_tiled_gen12_mc_ccs.html
* igt@kms_plane_scaling@plane-scaler-with-clipping-clamping-rotation@pipe-a-vga-1:
- shard-snb: NOTRUN -> [SKIP][17] ([fdo#109271]) +99 similar issues
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8844/shard-snb6/igt@kms_plane_scaling@[email protected]
* igt@v3d/v3d_submit_csd@multiple-job-submission:
- shard-glk: NOTRUN -> [SKIP][18] ([fdo#109271]) +12 similar issues
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8844/shard-glk2/igt@v3d/[email protected]
#### Possible fixes ####
* igt@gem_exec_fair@basic-throttle@rcs0:
- {shard-rkl}: [FAIL][19] ([i915#2842]) -> [PASS][20] +1 similar issue
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13053/shard-rkl-6/igt@gem_exec_fair@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8844/shard-rkl-2/igt@gem_exec_fair@[email protected]
* igt@gen9_exec_parse@allowed-single:
- shard-apl: [ABORT][21] ([i915#5566]) -> [PASS][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13053/shard-apl1/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8844/shard-apl4/igt@[email protected]
* igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-hdmi-a:
- {shard-rkl}: [SKIP][23] ([i915#1937]) -> [PASS][24]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13053/shard-rkl-4/igt@i915_pm_lpsp@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8844/shard-rkl-7/igt@i915_pm_lpsp@[email protected]
* igt@i915_pm_rc6_residency@rc6-idle@bcs0:
- {shard-dg1}: [FAIL][25] ([i915#3591]) -> [PASS][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13053/shard-dg1-15/igt@i915_pm_rc6_residency@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8844/shard-dg1-16/igt@i915_pm_rc6_residency@[email protected]
* igt@i915_pm_rpm@modeset-non-lpsp-stress:
- {shard-rkl}: [SKIP][27] ([i915#1397]) -> [PASS][28] +1 similar issue
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13053/shard-rkl-7/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8844/shard-rkl-3/igt@[email protected]
* igt@i915_pm_rps@reset:
- shard-snb: [INCOMPLETE][29] ([i915#7790]) -> [PASS][30]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13053/shard-snb5/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8844/shard-snb6/igt@[email protected]
* igt@i915_selftest@live@gt_heartbeat:
- shard-apl: [DMESG-FAIL][31] ([i915#5334]) -> [PASS][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13053/shard-apl6/igt@i915_selftest@live@gt_heartbeat.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8844/shard-apl6/igt@i915_selftest@live@gt_heartbeat.html
* igt@kms_cursor_legacy@forked-move@pipe-b:
- {shard-dg1}: [INCOMPLETE][33] ([i915#8011] / [i915#8347]) -> [PASS][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13053/shard-dg1-14/igt@kms_cursor_legacy@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8844/shard-dg1-17/igt@kms_cursor_legacy@[email protected]
* igt@kms_cursor_legacy@single-move@pipe-b:
- {shard-rkl}: [INCOMPLETE][35] ([i915#8011]) -> [PASS][36] +1 similar issue
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13053/shard-rkl-7/igt@kms_cursor_legacy@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8844/shard-rkl-1/igt@kms_cursor_legacy@[email protected]
* igt@kms_plane_scaling@i915-max-src-size@pipe-a-hdmi-a-2:
- {shard-rkl}: [FAIL][37] ([i915#8292]) -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13053/shard-rkl-3/igt@kms_plane_scaling@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8844/shard-rkl-4/igt@kms_plane_scaling@[email protected]
* igt@kms_rotation_crc@multiplane-rotation-cropping-top:
- shard-glk: [DMESG-FAIL][39] ([i915#118]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13053/shard-glk4/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8844/shard-glk6/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#2]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/2
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
[fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
[fdo#109283]: https://bugs.freedesktop.org/show_bug.cgi?id=109283
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[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#109300]: https://bugs.freedesktop.org/show_bug.cgi?id=109300
[fdo#109307]: https://bugs.freedesktop.org/show_bug.cgi?id=109307
[fdo#109313]: https://bugs.freedesktop.org/show_bug.cgi?id=109313
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
[fdo#109506]: https://bugs.freedesktop.org/show_bug.cgi?id=109506
[fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
[fdo#110723]: https://bugs.freedesktop.org/show_bug.cgi?id=110723
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[fdo#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#112283]: https://bugs.freedesktop.org/show_bug.cgi?id=112283
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1099]: https://gitlab.freedesktop.org/drm/intel/issues/1099
[i915#118]: https://gitlab.freedesktop.org/drm/intel/issues/118
[i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
[i915#1825]: https://gitlab.freedesktop.org/drm/intel/issues/1825
[i915#1937]: https://gitlab.freedesktop.org/drm/intel/issues/1937
[i915#2437]: https://gitlab.freedesktop.org/drm/intel/issues/2437
[i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
[i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
[i915#2587]: https://gitlab.freedesktop.org/drm/intel/issues/2587
[i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
[i915#2681]: https://gitlab.freedesktop.org/drm/intel/issues/2681
[i915#2705]: https://gitlab.freedesktop.org/drm/intel/issues/2705
[i915#280]: https://gitlab.freedesktop.org/drm/intel/issues/280
[i915#284]: https://gitlab.freedesktop.org/drm/intel/issues/284
[i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
[i915#2846]: https://gitlab.freedesktop.org/drm/intel/issues/2846
[i915#3023]: https://gitlab.freedesktop.org/drm/intel/issues/3023
[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#3297]: https://gitlab.freedesktop.org/drm/intel/issues/3297
[i915#3359]: https://gitlab.freedesktop.org/drm/intel/issues/3359
[i915#3458]: https://gitlab.freedesktop.org/drm/intel/issues/3458
[i915#3469]: https://gitlab.freedesktop.org/drm/intel/issues/3469
[i915#3539]: https://gitlab.freedesktop.org/drm/intel/issues/3539
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3591]: https://gitlab.freedesktop.org/drm/intel/issues/3591
[i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
[i915#3638]: https://gitlab.freedesktop.org/drm/intel/issues/3638
[i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#3742]: https://gitlab.freedesktop.org/drm/intel/issues/3742
[i915#3778]: https://gitlab.freedesktop.org/drm/intel/issues/3778
[i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
[i915#3936]: https://gitlab.freedesktop.org/drm/intel/issues/3936
[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#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#4349]: https://gitlab.freedesktop.org/drm/intel/issues/4349
[i915#4538]: https://gitlab.freedesktop.org/drm/intel/issues/4538
[i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4771]: https://gitlab.freedesktop.org/drm/intel/issues/4771
[i915#4812]: https://gitlab.freedesktop.org/drm/intel/issues/4812
[i915#4816]: https://gitlab.freedesktop.org/drm/intel/issues/4816
[i915#4818]: https://gitlab.freedesktop.org/drm/intel/issues/4818
[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#4860]: https://gitlab.freedesktop.org/drm/intel/issues/4860
[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#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[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#5289]: https://gitlab.freedesktop.org/drm/intel/issues/5289
[i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
[i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
[i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
[i915#5431]: https://gitlab.freedesktop.org/drm/intel/issues/5431
[i915#5563]: https://gitlab.freedesktop.org/drm/intel/issues/5563
[i915#5566]: https://gitlab.freedesktop.org/drm/intel/issues/5566
[i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
[i915#6245]: https://gitlab.freedesktop.org/drm/intel/issues/6245
[i915#6301]: https://gitlab.freedesktop.org/drm/intel/issues/6301
[i915#6334]: https://gitlab.freedesktop.org/drm/intel/issues/6334
[i915#6433]: https://gitlab.freedesktop.org/drm/intel/issues/6433
[i915#6493]: https://gitlab.freedesktop.org/drm/intel/issues/6493
[i915#6524]: https://gitlab.freedesktop.org/drm/intel/issues/6524
[i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
[i915#6768]: https://gitlab.freedesktop.org/drm/intel/issues/6768
[i915#6946]: https://gitlab.freedesktop.org/drm/intel/issues/6946
[i915#7116]: https://gitlab.freedesktop.org/drm/intel/issues/7116
[i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
[i915#7697]: https://gitlab.freedesktop.org/drm/intel/issues/7697
[i915#7701]: https://gitlab.freedesktop.org/drm/intel/issues/7701
[i915#7711]: https://gitlab.freedesktop.org/drm/intel/issues/7711
[i915#7742]: https://gitlab.freedesktop.org/drm/intel/issues/7742
[i915#7790]: https://gitlab.freedesktop.org/drm/intel/issues/7790
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#7975]: https://gitlab.freedesktop.org/drm/intel/issues/7975
[i915#8011]: https://gitlab.freedesktop.org/drm/intel/issues/8011
[i915#8253]: https://gitlab.freedesktop.org/drm/intel/issues/8253
[i915#8292]: https://gitlab.freedesktop.org/drm/intel/issues/8292
[i915#8347]: https://gitlab.freedesktop.org/drm/intel/issues/8347
[i915#8381]: https://gitlab.freedesktop.org/drm/intel/issues/8381
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_7266 -> IGTPW_8844
* Piglit: piglit_4509 -> None
CI-20190529: 20190529
CI_DRM_13053: 63a6d68541b38408d5be8345f3e4a561661f68cb @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_8844: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8844/index.html
IGT_7266: 94411dd85f9ad6d76fb7b2097197122703a3914c @ 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_8844/index.html
Quoted 50 lines · On Mon, Apr 24, 2023 at 05:24:23PM +0530, [email protected] wrote:
From: Sai Gowtham Ch <[email protected]>
Extending the
spin_createimplementation and allocator handle support in xe, where it submits dummy work loads to engine. This Implementation is wrapped aroundvm_bindand unbind as we are supposed to do it manually for xe.Cc Zbigniew Kempczyński <[email protected]>Signed-off-by Sai Gowtham Ch <[email protected]>--- lib/xe/xe_spin.c | 39 +++++++++++++++++++++++++++++++++++++++ lib/xe/xe_spin.h | 9 +++++++++ 2 files changed, 48 insertions(+)lib/xe/xe_spin.c +29
-0@@ -82,6 +82,45 @@ void xe_spin_end(struct xe_spin *spin) spin->end =0 ; } +void xe_spin_new (int fd,struct xe_spin *spin,struct drm_xe_engine_class_instance *eci) +{ +size_t bo_size =xe_get_default_alignment (fd); +uint32_t syncobj; +uint64_t ahnd = spin->ahnd, addr; +struct drm_xe_sync sync = { + .flags =DRM_XE_SYNC_SYNCOBJ |DRM_XE_SYNC_SIGNAL , + }; +struct drm_xe_exec exec = { + .num_batch_buffer =1 , + .num_syncs =1 , + .syncs =to_user_pointer (&sync), + }; + + spin->vm =xe_vm_create (fd,0 ,0 ); + spin->bo =xe_bo_create (fd, eci->gt_id, spin->vm, bo_size); + spin->engine =xe_engine_create (fd, spin->vm, eci,0 ); + syncobj =syncobj_create (fd,0 ); + +if (ahnd) + addr =intel_allocator_alloc_with_strategy (ahnd, spin->bo, bo_size,0 ,ALLOC_STRATEGY_LOW_TO_HIGH ); + +xe_vm_bind_sync (fd, spin->vm, spin->bo,0 , addr, bo_size); + +xe_spin_init (spin, addr, true); + exec.engine_id = spin->engine; + exec.address = addr; + sync.handle = syncobj; +
lib/xe/xe_spin.c void xe_spin_end(struct xe_spin *spin) · line 123
Quoted 10 lines
lib/xe/xe_spin.c +10
-0+igt_assert_eq (igt_ioctl (fd,DRM_IOCTL_XE_EXEC , &exec),0 ); + +} + +void xe_spin_free (struct xe_spin *spin) +{ +xe_engine_destroy (spin->fd, spin->engine); +xe_vm_destroy (spin->fd, spin->vm); +gem_close (spin->fd, spin->bo); +}
You need to embed this into igt_spin_new(). Take a look to kms_cursor_legacy.c. We want to have this syntax intact:
spin = igt_spin_new(display->drm_fd, .ahnd = ahnd, .dependency = fb_info.gem_handle);
--
Zbigniew
Quoted 35 lines
lib/xe/xe_spin.c +0
-0void xe_cork_init (int fd,struct drm_xe_engine_class_instance *hwe,struct xe_cork *cork) {lib/xe/xe_spin.h +9
-0@@ -17,15 +17,24 @@/* Mapped GPU object */ struct xe_spin {uint32_t batch[16 ]; +int fd;uint64_t pad;uint32_t start;uint32_t end; +uint64_t ahnd; +uint32_t engine; +uint32_t vm; +uint32_t bo; + };void xe_spin_init (struct xe_spin *spin,uint64_t addr,bool preempt);bool xe_spin_started (struct xe_spin *spin);void xe_spin_wait_started (struct xe_spin *spin);void xe_spin_end (struct xe_spin *spin); +void xe_spin_new (int fd,struct xe_spin *spin, +struct drm_xe_engine_class_instance *hwe); +void xe_spin_free (struct xe_spin *spin);struct xe_cork {struct xe_spin *spin;Signature · 1 line
2.39.1
Quoted 77 lines
-----Original Message-----
From: Kempczynski, Zbigniew <[email protected]>
Sent: Tuesday, April 25, 2023 9:07 AM
To: Ch, Sai Gowtham <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH i-g-t]lib/xe/xe_spin: Integrateigt_spin_newwith Xe.Quoted 5 lines · On Mon, Apr 24, 2023 at 05:24:23PM +0530, [email protected] wrote:
From: Sai Gowtham Ch <[email protected]>
Extending the
spin_createimplementation and allocator handle support in xe, where it submits dummy work loads to engine. This Implementation is wrapped aroundvm_bindand unbind as we are supposed todo it manually for xe.
Quoted 27 lines
Cc Zbigniew Kempczyński <[email protected]>Signed-off-by Sai Gowtham Ch <[email protected]>--- lib/xe/xe_spin.c | 39 +++++++++++++++++++++++++++++++++++++++ lib/xe/xe_spin.h | 9 +++++++++ 2 files changed, 48 insertions(+)lib/xe/xe_spin.c index renamed from lib/xe/xe_spin.c +0
-0
856d0ba2..e0629419100644lib/xe/xe_spin.c +11
-0@@ -82,6 +82,45 @@ void xe_spin_end(struct xe_spin *spin) spin->end =0 ; } +void xe_spin_new (int fd,struct xe_spin *spin,struct +drm_xe_engine_class_instance *eci) { +size_t bo_size =xe_get_default_alignment (fd); +uint32_t syncobj; +uint64_t ahnd = spin->ahnd, addr; +struct drm_xe_sync sync = { + .flags =DRM_XE_SYNC_SYNCOBJ |DRM_XE_SYNC_SIGNAL , + }; +struct drm_xe_exec exec = { + .num_batch_buffer =1 , + .num_syncs =1 ,lib/xe/xe_spin.c void xe_spin_end(struct xe_spin *spin) · line 105
Quoted 10 lines
lib/xe/xe_spin.c +10
-0+ .syncs = to_user_pointer(&sync), + }; + + spin->vm =xe_vm_create (fd,0 ,0 ); + spin->bo =xe_bo_create (fd, eci->gt_id, spin->vm, bo_size); + spin->engine =xe_engine_create (fd, spin->vm, eci,0 ); + syncobj =syncobj_create (fd,0 ); + +if (ahnd) + addr = intel_allocator_alloc_with_strategy(ahnd, spin->bo,
bo_size,Quoted 8 lines
lib/xe/xe_spin.c +8
-0+0, ALLOC_STRATEGY_LOW_TO_HIGH); + +xe_vm_bind_sync (fd, spin->vm, spin->bo,0 , addr, bo_size); + +xe_spin_init (spin, addr, true); + exec.engine_id = spin->engine; + exec.address = addr; + sync.handle = syncobj;lib/xe/xe_spin.c void xe_spin_end(struct xe_spin *spin) · line 123
Quoted 10 lines
lib/xe/xe_spin.c +10
-0+ +igt_assert_eq (igt_ioctl (fd,DRM_IOCTL_XE_EXEC , &exec),0 ); + +} + +void xe_spin_free (struct xe_spin *spin) { +xe_engine_destroy (spin->fd, spin->engine); +xe_vm_destroy (spin->fd, spin->vm); +gem_close (spin->fd, spin->bo); +}You need to embed this into
igt_spin_new(). Take a look tokms_cursor_legacy.c.
We want to have this syntax intact:
Quoted 7 lines
spin = igt_spin_new(display->drm_fd, .ahnd = ahnd, .dependency = fb_info.gem_handle);--
Zbigniew
Will be calling this code from igt_spin_factory it self, with a check is being called like below
igt_spin_t *__igt_spin_factory(int fd, const struct igt_spin_factory *opts)
{
if (is_xe_device)
xe_spin_create(fd, opts);
else
spin_create(fd, opts);
}And similarly in igt_spin_free:
What are your thoughts on this ? Do you think this works ?
-----
Sai Gowtham
Quoted 36 lines
Quoted 26 lines
lib/xe/xe_spin.c +0
-0void xe_cork_init (int fd,struct drm_xe_engine_class_instance *hwe,struct xe_cork *cork) {lib/xe/xe_spin.h index renamed from lib/xe/xe_spin.h +0
-073f9a026..12116445 100644
lib/xe/xe_spin.h +6
-0@@ -17,15 +17,24 @@/* Mapped GPU object */ struct xe_spin {uint32_t batch[16 ]; +int fd;uint64_t pad;uint32_t start;uint32_t end; +uint64_t ahnd; +uint32_t engine; +uint32_t vm; +uint32_t bo; + };void xe_spin_init (struct xe_spin *spin,uint64_t addr,bool preempt);bool
xe_spin_started(struct xe_spin *spin); voidxe_spin_wait_started(struct xe_spin *spin); voidxe_spin_end(struct xe_spin *spin);lib/xe/xe_spin.h
Quoted 2 lines
lib/xe/xe_spin.h +2
-0+void xe_spin_new (int fd,struct xe_spin *spin, +struct drm_xe_engine_class_instance *hwe);void xe_spin_free(struct
Quoted 7 lines
lib/xe/xe_spin.h +1
-1+xe_spin *spin);struct xe_cork {struct xe_spin *spin; --2.39.1
Quoted 94 lines · Sai Gowtham
Quoted 77 lines
-----Original Message-----
From: Kempczynski, Zbigniew <[email protected]>
Sent: Tuesday, April 25, 2023 9:07 AM
To: Ch, Sai Gowtham <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH i-g-t]lib/xe/xe_spin: Integrateigt_spin_newwith Xe.Quoted 5 lines · On Mon, Apr 24, 2023 at 05:24:23PM +0530, [email protected] wrote:
From: Sai Gowtham Ch <[email protected]>
Extending the
spin_createimplementation and allocator handle support in xe, where it submits dummy work loads to engine. This Implementation is wrapped aroundvm_bindand unbind as we are supposed todo it manually for xe.
Quoted 27 lines
Cc Zbigniew Kempczyński <[email protected]>Signed-off-by Sai Gowtham Ch <[email protected]>--- lib/xe/xe_spin.c | 39 +++++++++++++++++++++++++++++++++++++++ lib/xe/xe_spin.h | 9 +++++++++ 2 files changed, 48 insertions(+)lib/xe/xe_spin.c index renamed from lib/xe/xe_spin.c +0
-0
856d0ba2..e0629419100644lib/xe/xe_spin.c +11
-0@@ -82,6 +82,45 @@ void xe_spin_end(struct xe_spin *spin) spin->end =0 ; } +void xe_spin_new (int fd,struct xe_spin *spin,struct +drm_xe_engine_class_instance *eci) { +size_t bo_size =xe_get_default_alignment (fd); +uint32_t syncobj; +uint64_t ahnd = spin->ahnd, addr; +struct drm_xe_sync sync = { + .flags =DRM_XE_SYNC_SYNCOBJ |DRM_XE_SYNC_SIGNAL , + }; +struct drm_xe_exec exec = { + .num_batch_buffer =1 , + .num_syncs =1 ,lib/xe/xe_spin.c void xe_spin_end(struct xe_spin *spin) · line 105
Quoted 10 lines
lib/xe/xe_spin.c +10
-0+ .syncs = to_user_pointer(&sync), + }; + + spin->vm =xe_vm_create (fd,0 ,0 ); + spin->bo =xe_bo_create (fd, eci->gt_id, spin->vm, bo_size); + spin->engine =xe_engine_create (fd, spin->vm, eci,0 ); + syncobj =syncobj_create (fd,0 ); + +if (ahnd) + addr = intel_allocator_alloc_with_strategy(ahnd, spin->bo,
bo_size,Quoted 8 lines
lib/xe/xe_spin.c +8
-0+0, ALLOC_STRATEGY_LOW_TO_HIGH); + +xe_vm_bind_sync (fd, spin->vm, spin->bo,0 , addr, bo_size); + +xe_spin_init (spin, addr, true); + exec.engine_id = spin->engine; + exec.address = addr; + sync.handle = syncobj;lib/xe/xe_spin.c void xe_spin_end(struct xe_spin *spin) · line 123
Quoted 10 lines
lib/xe/xe_spin.c +10
-0+ +igt_assert_eq (igt_ioctl (fd,DRM_IOCTL_XE_EXEC , &exec),0 ); + +} + +void xe_spin_free (struct xe_spin *spin) { +xe_engine_destroy (spin->fd, spin->engine); +xe_vm_destroy (spin->fd, spin->vm); +gem_close (spin->fd, spin->bo); +}You need to embed this into
igt_spin_new(). Take a look tokms_cursor_legacy.c.
We want to have this syntax intact:Quoted 7 lines
spin = igt_spin_new(display->drm_fd, .ahnd = ahnd, .dependency = fb_info.gem_handle);--
ZbigniewWill be calling this code from
igt_spin_factoryit self, with a check is being called like below
igt_spin_t*__igt_spin_factory(int fd, const struct igt_spin_factory *opts){ if (is_xe_device) xe_spin_create(fd, opts); else spin_create(fd, opts); }
Quoted 3 lines
And similarly in
igt_spin_free:What are your thoughts on this ? Do you think this works ?
We need adopt the code to make this work. Be aware that spin_create() uses igt_spin_t to collect all necessary information about spinner so you need to do this for xe_spin_create() too.
--
Zbigniew
Quoted 39 lines
-----
Sai GowthamQuoted 36 lines
Quoted 26 lines
lib/xe/xe_spin.c +0
-0void xe_cork_init (int fd,struct drm_xe_engine_class_instance *hwe,struct xe_cork *cork) {lib/xe/xe_spin.h index renamed from lib/xe/xe_spin.h +0
-073f9a026..12116445 100644
lib/xe/xe_spin.h +6
-0@@ -17,15 +17,24 @@/* Mapped GPU object */ struct xe_spin {uint32_t batch[16 ]; +int fd;uint64_t pad;uint32_t start;uint32_t end; +uint64_t ahnd; +uint32_t engine; +uint32_t vm; +uint32_t bo; + };void xe_spin_init (struct xe_spin *spin,uint64_t addr,bool preempt);bool
xe_spin_started(struct xe_spin *spin); voidxe_spin_wait_started(struct xe_spin *spin); voidxe_spin_end(struct xe_spin *spin);lib/xe/xe_spin.h
Quoted 2 lines
lib/xe/xe_spin.h +2
-0+void xe_spin_new (int fd,struct xe_spin *spin, +struct drm_xe_engine_class_instance *hwe);void xe_spin_free(struct
Quoted 7 lines
lib/xe/xe_spin.h +1
-1+xe_spin *spin);struct xe_cork {struct xe_spin *spin; --2.39.1