drm/i915/ttm: Fix incorrect assumptions about ttm_bo_validate() semantics
Subsystems (2)
PATCH 1/1 drm/i915/ttm: Fix incorrect assumptions about ttm_bo_validate() semantics
We have assumed that if the current placement was not the requested placement, but instead one of the busy placements, a TTM move would have been triggered. That is not the case.
So when we initially place LMEM objects in "Limbo", (that is system placement without any pages allocated), to be able to defer clearing objects until first get_pages(), the first get_pages() would happily keep objects in system memory if that is one of the allowed placements. And since we don't yet support i915 GEM system memory from TTM, everything breaks apart.
So make sure we try the requested placement first, if no eviction is needed. If that fails, retry with all allowed placements also allowing evictions. Also make sure we handle TTM failure codes correctly.
Also temporarily (until we support i915 GEM system on TTM), restrict allowed placements to the requested placement to avoid things falling apart should LMEM be full.
--- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 61 +++++++++++++++++++++++-- 1 file changed, 58 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/gem/i915_gem_ttm.c +58 -3
@@ -64,6 +64,30 @@ static struct ttm_placement i915_sys_placement = { .busy_placement = &sys_placement_flags, }; +static int i915_ttm_err_to_gem (int err) +{ +/* Fastpath */ +if (likely (!err)) +return 0 ; + +switch (err) { +case -EBUSY : +/* +* TTM likes to convert -EDEADLK to -EBUSY, and wants us to +* restart the operation, since we don't record the contending +* lock. We use -EAGAIN to restart. +*/ +return -EAGAIN ; +case -ENOSPC : +/* Memory type / region is full, and we can't evict. */ +return -ENXIO ; +default : +break ; + } + +return err; +} +static void i915_ttm_adjust_lru (struct drm_i915_gem_object *obj); static enum ttm_caching
@@ -522,15 +546,46 @@ static int i915_ttm_get_pages(struct drm_i915_gem_object *obj)struct sg_table *st;struct ttm_place requested, busy[I915_TTM_MAX_PLACEMENTS ];struct ttm_placement placement; +int real_num_busy;int ret;GEM_BUG_ON (obj->mm.n_placements >I915_TTM_MAX_PLACEMENTS );/* Move to the requested placement. */ i915_ttm_placement_from_obj (obj, &requested, busy, &placement); + +/* +* For now we support LMEM only with TTM. +* TODO: Remove with system support +*/ +GEM_BUG_ON (requested.mem_type <I915_PL_LMEM0 || + busy[0 ].mem_type <I915_PL_LMEM0 ); + +/* First try only the requested placement. No eviction. */ + real_num_busy =fetch_and_zero (&placement.num_busy_placement); ret =ttm_bo_validate (bo, &placement, &ctx); -if (ret) -return ret == -ENOSPC ? -ENXIO : ret; +if (ret) { + ret =i915_ttm_err_to_gem (ret); +/* +* Anything that wants to restart the operation gets to +* do that. +*/ +if (ret == -EDEADLK || ret == -EINTR || ret == -ERESTARTSYS || + ret == -EAGAIN ) +return ret; + +/* TODO: Remove this when we support system as TTM. */ + real_num_busy =1 ; + +/* +* If the initial attempt fails, allow all accepted placements, +* evicting if necessary. +*/ + placement.num_busy_placement = real_num_busy; + ret =ttm_bo_validate (bo, &placement, &ctx); +if (ret) +return i915_ttm_err_to_gem (ret); + }/* Object either has a page vector or is an iomem object */ st = bo->ttm ?i915_ttm_tt_get_st (bo->ttm) : obj->ttm.cached_io_st;
@@ -741,5 +796,5 @@ int __i915_gem_ttm_object_init(struct intel_memory_region *mem, obj->ttm.created = true;/* i915 wants -ENXIO when out of memory region space. */ -return (ret == -ENOSPC ) ? -ENXIO : ret; +return i915_ttm_err_to_gem (ret); }
Signature · 1 line
2.31.1
Patchwork
CI[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/ttm: Fix incorrect assumptions about ttm_bo_validate() semantics
== Series Details ==
== Series Details ==
Series: drm/i915/ttm: Fix incorrect assumptions about ttm_bo_validate() semantics
URL : https://patchwork.freedesktop.org/series/91661/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_10242 -> Patchwork_20407
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/index.html
Known issues
------------
Here are the changes found in Patchwork_20407 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@kms_chamelium@dp-crc-fast:
- fi-kbl-7500u: [PASS][1] -> [FAIL][2] ([i915#1372])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/fi-kbl-7500u/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/fi-kbl-7500u/igt@[email protected]
#### Possible fixes ####
* igt@i915_selftest@live@perf:
- {fi-tgl-dsi}: [DMESG-WARN][3] ([i915#2867]) -> [PASS][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/fi-tgl-dsi/igt@i915_selftest@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/fi-tgl-dsi/igt@i915_selftest@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[i915#1372]: https://gitlab.freedesktop.org/drm/intel/issues/1372
[i915#2867]: https://gitlab.freedesktop.org/drm/intel/issues/2867
Participating hosts (42 -> 37)
------------------------------
Missing (5): fi-ilk-m540 fi-hsw-4200u fi-bsw-cyan fi-ctg-p8600 fi-bdw-samus
Build changes
-------------
* Linux: CI_DRM_10242 -> Patchwork_20407
CI-20190529: 20190529
CI_DRM_10242: a31069c62e8586aa92907539ab948412c1d5f5a0 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_6112: a17cc0c5d096fabfd516848c114bc411e11130f4 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_20407: 88154e0600a8c8bc833dd9d869ae4863e91975c5 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
88154e0600a8 drm/i915/ttm: Fix incorrect assumptions about ttm_bo_validate() semantics
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/ttm: Fix incorrect assumptions about ttm_bo_validate() semantics
In reply to Thomas Hellström== Series Details ==
== Series Details ==
Series: drm/i915/ttm: Fix incorrect assumptions about ttm_bo_validate() semantics
URL : https://patchwork.freedesktop.org/series/91661/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_10242_full -> Patchwork_20407_full
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_20407_full absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_20407_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_20407_full:
### IGT changes ###
#### Possible regressions ####
* igt@gem_exec_reloc@basic-wide-active@vcs1:
- shard-iclb: NOTRUN -> [FAIL][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-iclb2/igt@gem_exec_reloc@[email protected]
* igt@kms_big_fb@x-tiled-8bpp-rotate-0:
- shard-glk: [PASS][2] -> [FAIL][3]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-glk3/igt@[email protected]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-glk1/igt@[email protected]
Known issues
------------
Here are the changes found in Patchwork_20407_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_eio@in-flight-contexts-10ms:
- shard-skl: [PASS][4] -> [TIMEOUT][5] ([i915#3063])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-skl8/igt@[email protected]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-skl9/igt@[email protected]
* igt@gem_eio@unwedge-stress:
- shard-iclb: [PASS][6] -> [TIMEOUT][7] ([i915#2369] / [i915#2481] / [i915#3070])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-iclb4/igt@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-iclb4/igt@[email protected]
* igt@gem_exec_fair@basic-none-share@rcs0:
- shard-iclb: [PASS][8] -> [FAIL][9] ([i915#2842])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-iclb3/igt@gem_exec_fair@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-iclb7/igt@gem_exec_fair@[email protected]
- shard-tglb: [PASS][10] -> [FAIL][11] ([i915#2842])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-tglb7/igt@gem_exec_fair@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-tglb8/igt@gem_exec_fair@[email protected]
* igt@gem_exec_fair@basic-none@vecs0:
- shard-glk: [PASS][12] -> [FAIL][13] ([i915#2842] / [i915#3468])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-glk3/igt@gem_exec_fair@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-glk1/igt@gem_exec_fair@[email protected]
* igt@gem_exec_fair@basic-pace-solo@rcs0:
- shard-glk: [PASS][14] -> [FAIL][15] ([i915#2842]) +1 similar issue
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-glk7/igt@gem_exec_fair@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-glk4/igt@gem_exec_fair@[email protected]
* igt@gem_exec_fair@basic-pace@vecs0:
- shard-kbl: [PASS][16] -> [FAIL][17] ([i915#2842]) +1 similar issue
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-kbl3/igt@gem_exec_fair@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-kbl4/igt@gem_exec_fair@[email protected]
* igt@gem_exec_fair@basic-throttle@rcs0:
- shard-iclb: [PASS][18] -> [FAIL][19] ([i915#2849])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-iclb4/igt@gem_exec_fair@[email protected]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-iclb6/igt@gem_exec_fair@[email protected]
* igt@gem_exec_whisper@basic-queues:
- shard-glk: [PASS][20] -> [DMESG-WARN][21] ([i915#118] / [i915#95])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-glk4/igt@[email protected]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-glk2/igt@[email protected]
* igt@gem_huc_copy@huc-copy:
- shard-tglb: [PASS][22] -> [SKIP][23] ([i915#2190])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-tglb7/igt@[email protected]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-tglb6/igt@[email protected]
* igt@gem_pread@exhaustion:
- shard-apl: NOTRUN -> [WARN][24] ([i915#2658])
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-apl1/igt@[email protected]
* igt@gem_userptr_blits@input-checking:
- shard-snb: NOTRUN -> [DMESG-WARN][25] ([i915#3002])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-snb2/igt@[email protected]
* igt@gen7_exec_parse@basic-offset:
- shard-apl: NOTRUN -> [SKIP][26] ([fdo#109271]) +137 similar issues
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-apl1/igt@[email protected]
* igt@gen9_exec_parse@allowed-single:
- shard-skl: [PASS][27] -> [DMESG-WARN][28] ([i915#1436] / [i915#716])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-skl6/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-skl10/igt@[email protected]
* igt@gen9_exec_parse@batch-invalid-length:
- shard-snb: NOTRUN -> [SKIP][29] ([fdo#109271]) +155 similar issues
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-snb2/igt@[email protected]
* igt@kms_chamelium@dp-crc-multiple:
- shard-apl: NOTRUN -> [SKIP][30] ([fdo#109271] / [fdo#111827]) +10 similar issues
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-apl3/igt@[email protected]
* igt@kms_color_chamelium@pipe-invalid-ctm-matrix-sizes:
- shard-snb: NOTRUN -> [SKIP][31] ([fdo#109271] / [fdo#111827]) +4 similar issues
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-snb2/igt@[email protected]
* igt@kms_content_protection@atomic-dpms:
- shard-apl: NOTRUN -> [TIMEOUT][32] ([i915#1319])
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-apl1/igt@[email protected]
* igt@kms_cursor_crc@pipe-c-cursor-suspend:
- shard-skl: [PASS][33] -> [INCOMPLETE][34] ([i915#300])
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-skl10/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-skl6/igt@[email protected]
* igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions:
- shard-skl: [PASS][35] -> [FAIL][36] ([i915#2346])
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-skl1/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-skl9/igt@[email protected]
* igt@kms_flip@flip-vs-suspend-interruptible@b-dp1:
- shard-apl: [PASS][37] -> [DMESG-WARN][38] ([i915#180]) +1 similar issue
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-apl3/igt@kms_flip@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-apl8/igt@kms_flip@[email protected]
* igt@kms_flip@plain-flip-ts-check-interruptible@b-edp1:
- shard-skl: [PASS][39] -> [FAIL][40] ([i915#2122])
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-skl6/igt@kms_flip@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-skl10/igt@kms_flip@[email protected]
* igt@kms_frontbuffer_tracking@psr-2p-scndscrn-spr-indfb-draw-render:
- shard-glk: NOTRUN -> [SKIP][41] ([fdo#109271]) +18 similar issues
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-glk7/igt@kms_frontbuffer_tracking@psr-2p-scndscrn-spr-indfb-draw-render.html
* igt@kms_frontbuffer_tracking@psr-rgb565-draw-pwrite:
- shard-skl: [PASS][42] -> [DMESG-WARN][43] ([i915#1982])
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-skl1/igt@[email protected]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-skl3/igt@[email protected]
* igt@kms_hdr@bpc-switch-suspend:
- shard-skl: [PASS][44] -> [FAIL][45] ([i915#1188])
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-skl7/igt@[email protected]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-skl5/igt@[email protected]
* igt@kms_pipe_crc_basic@read-crc-pipe-d:
- shard-apl: NOTRUN -> [SKIP][46] ([fdo#109271] / [i915#533])
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-apl8/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-a-alpha-basic:
- shard-apl: NOTRUN -> [FAIL][47] ([fdo#108145] / [i915#265])
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-apl8/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-b-alpha-transparent-fb:
- shard-apl: NOTRUN -> [FAIL][48] ([i915#265])
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-apl3/igt@[email protected]
* igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-5:
- shard-glk: NOTRUN -> [SKIP][49] ([fdo#109271] / [i915#658])
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-glk7/igt@[email protected]
* igt@kms_psr2_sf@plane-move-sf-dmg-area-0:
- shard-apl: NOTRUN -> [SKIP][50] ([fdo#109271] / [i915#658]) +1 similar issue
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-apl8/igt@[email protected]
* igt@kms_psr@psr2_sprite_plane_onoff:
- shard-iclb: [PASS][51] -> [SKIP][52] ([fdo#109441]) +1 similar issue
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-iclb2/igt@kms_psr@psr2_sprite_plane_onoff.html
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-iclb6/igt@kms_psr@psr2_sprite_plane_onoff.html
* igt@kms_vblank@pipe-c-ts-continuation-suspend:
- shard-kbl: [PASS][53] -> [INCOMPLETE][54] ([i915#155] / [i915#2828] / [i915#794])
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-kbl6/igt@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-kbl4/igt@[email protected]
* igt@kms_writeback@writeback-check-output:
- shard-apl: NOTRUN -> [SKIP][55] ([fdo#109271] / [i915#2437]) +1 similar issue
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-apl3/igt@[email protected]
* igt@nouveau_crc@pipe-b-source-outp-inactive:
- shard-skl: NOTRUN -> [SKIP][56] ([fdo#109271])
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-skl3/igt@[email protected]
* igt@prime_vgem@sync@rcs0:
- shard-apl: [PASS][57] -> [INCOMPLETE][58] ([i915#409])
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-apl8/igt@prime_vgem@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-apl7/igt@prime_vgem@[email protected]
* igt@sysfs_clients@fair-3:
- shard-apl: NOTRUN -> [SKIP][59] ([fdo#109271] / [i915#2994])
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-apl1/igt@[email protected]
#### Possible fixes ####
* igt@feature_discovery@psr2:
- shard-iclb: [SKIP][60] ([i915#658]) -> [PASS][61]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-iclb6/igt@[email protected]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-iclb2/igt@[email protected]
* igt@gem_exec_fair@basic-none-rrul@rcs0:
- shard-glk: [FAIL][62] ([i915#2842]) -> [PASS][63]
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-glk8/igt@gem_exec_fair@[email protected]
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-glk5/igt@gem_exec_fair@[email protected]
* igt@gem_exec_fair@basic-none@vcs0:
- shard-kbl: [FAIL][64] ([i915#2842]) -> [PASS][65]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-kbl4/igt@gem_exec_fair@[email protected]
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-kbl3/igt@gem_exec_fair@[email protected]
* igt@gem_exec_fair@basic-pace-share@rcs0:
- shard-tglb: [FAIL][66] ([i915#2842]) -> [PASS][67]
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-tglb5/igt@gem_exec_fair@[email protected]
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-tglb5/igt@gem_exec_fair@[email protected]
* igt@gem_mmap_gtt@big-copy-odd:
- shard-skl: [FAIL][68] ([i915#307]) -> [PASS][69]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-skl7/igt@[email protected]
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-skl5/igt@[email protected]
* igt@gem_mmap_offset@clear:
- shard-iclb: [FAIL][70] ([i915#3160]) -> [PASS][71]
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-iclb6/igt@[email protected]
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-iclb2/igt@[email protected]
* igt@i915_pm_dc@dc6-psr:
- shard-iclb: [FAIL][72] ([i915#454]) -> [PASS][73]
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-iclb4/igt@[email protected]
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-iclb4/igt@[email protected]
* igt@kms_big_fb@linear-32bpp-rotate-0:
- shard-glk: [DMESG-WARN][74] ([i915#118] / [i915#95]) -> [PASS][75] +1 similar issue
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-glk6/igt@[email protected]
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-glk7/igt@[email protected]
* igt@kms_cursor_crc@pipe-a-cursor-64x21-random:
- shard-glk: [FAIL][76] ([i915#3444]) -> [PASS][77]
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-glk6/igt@[email protected]
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-glk7/igt@[email protected]
* igt@kms_flip@flip-vs-suspend-interruptible@c-dp1:
- shard-apl: [DMESG-WARN][78] ([i915#180]) -> [PASS][79] +1 similar issue
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-apl3/igt@kms_flip@[email protected]
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-apl8/igt@kms_flip@[email protected]
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-blt:
- shard-glk: [FAIL][80] ([i915#49]) -> [PASS][81]
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-glk6/igt@[email protected]
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-glk7/igt@[email protected]
* igt@kms_hdr@bpc-switch-dpms:
- shard-skl: [FAIL][82] ([i915#1188]) -> [PASS][83] +1 similar issue
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-skl1/igt@[email protected]
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-skl4/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-a-coverage-7efc:
- shard-skl: [FAIL][84] ([fdo#108145] / [i915#265]) -> [PASS][85]
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-skl8/igt@[email protected]
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-skl6/igt@[email protected]
* igt@kms_psr@psr2_cursor_mmap_cpu:
- shard-iclb: [SKIP][86] ([fdo#109441]) -> [PASS][87] +1 similar issue
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-iclb1/igt@kms_psr@psr2_cursor_mmap_cpu.html
[87]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-iclb2/igt@kms_psr@psr2_cursor_mmap_cpu.html
* igt@kms_vblank@pipe-a-ts-continuation-suspend:
- shard-glk: [INCOMPLETE][88] -> [PASS][89]
[88]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-glk2/igt@[email protected]
[89]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-glk7/igt@[email protected]
* igt@kms_vblank@pipe-b-accuracy-idle:
- shard-glk: [FAIL][90] ([i915#43]) -> [PASS][91]
[90]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-glk7/igt@[email protected]
[91]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-glk2/igt@[email protected]
* igt@sysfs_heartbeat_interval@mixed@vcs0:
- shard-skl: [FAIL][92] ([i915#1731]) -> [PASS][93] +1 similar issue
[92]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-skl6/igt@sysfs_heartbeat_interval@[email protected]
[93]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-skl7/igt@sysfs_heartbeat_interval@[email protected]
* igt@sysfs_heartbeat_interval@mixed@vecs0:
- shard-glk: [FAIL][94] ([i915#1731]) -> [PASS][95]
[94]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-glk2/igt@sysfs_heartbeat_interval@[email protected]
[95]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-glk9/igt@sysfs_heartbeat_interval@[email protected]
#### Warnings ####
* igt@i915_pm_rc6_residency@rc6-fence:
- shard-iclb: [WARN][96] ([i915#2684]) -> [WARN][97] ([i915#1804] / [i915#2684])
[96]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-iclb2/igt@[email protected]
[97]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-iclb6/igt@[email protected]
* igt@i915_pm_rc6_residency@rc6-idle:
- shard-iclb: [WARN][98] ([i915#1804] / [i915#2684]) -> [WARN][99] ([i915#2684])
[98]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-iclb7/igt@[email protected]
[99]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-iclb5/igt@[email protected]
* igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-3:
- shard-iclb: [SKIP][100] ([i915#2920]) -> [SKIP][101] ([i915#658])
[100]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-iclb2/igt@[email protected]
[101]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-iclb6/igt@[email protected]
* igt@runner@aborted:
- shard-apl: ([FAIL][102], [FAIL][103], [FAIL][104], [FAIL][105], [FAIL][106], [FAIL][107]) ([fdo#109271] / [i915#180] / [i915#1814] / [i915#3002] / [i915#3363]) -> ([FAIL][108], [FAIL][109], [FAIL][110], [FAIL][111], [FAIL][112], [FAIL][113]) ([i915#180] / [i915#2426] / [i915#3002] / [i915#3363] / [i915#409])
[102]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-apl7/igt@[email protected]
[103]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-apl1/igt@[email protected]
[104]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-apl1/igt@[email protected]
[105]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-apl1/igt@[email protected]
[106]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-apl3/igt@[email protected]
[107]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-apl3/igt@[email protected]
[108]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-apl1/igt@[email protected]
[109]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-apl6/igt@[email protected]
[110]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-apl1/igt@[email protected]
[111]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-apl8/igt@[email protected]
[112]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-apl6/igt@[email protected]
[113]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-apl7/igt@[email protected]
- shard-skl: ([FAIL][114], [FAIL][115]) ([i915#3002] / [i915#3363]) -> ([FAIL][116], [FAIL][117], [FAIL][118]) ([i915#1436] / [i915#3002] / [i915#3363])
[114]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-skl9/igt@[email protected]
[115]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-skl10/igt@[email protected]
[116]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-skl1/igt@[email protected]
[117]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-skl10/igt@[email protected]
[118]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-skl1/igt@[email protected]
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#118]: https://gitlab.freedesktop.org/drm/intel/issues/118
[i915#1188]: https://gitlab.freedesktop.org/drm/intel/issues/1188
[i915#1319]: https://gitlab.freedesktop.org/drm/intel/issues/1319
[i915#1436]: https://gitlab.freedesktop.org/drm/intel/issues/1436
[i915#155]: https://gitlab.freedesktop.org/drm/intel/issues/155
[i915#1731]: https://gitlab.freedesktop.org/drm/intel/issues/1731
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#1804]: https://gitlab.freedesktop.org/drm/intel/issues/1804
[i915#1814]: https://gitlab.freedesktop.org/drm/intel/issues/1814
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2122]: https://gitlab.freedesktop.org/drm/intel/issues/2122
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
[i915#2369]: https://gitlab.freedesktop.org/drm/intel/issues/2369
[i915#2426]: https://gitlab.freedesktop.org/drm/intel/issues/2426
[i915#2437]: https://gitlab.freedesktop.org/drm/intel/issues/2437
[i915#2481]: https://gitlab.freedesktop.org/drm/intel/issues/2481
[i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
[i915#2658]: https://gitlab.freedesktop.org/drm/intel/issues/2658
[i915#2684]: https://gitlab.freedesktop.org/drm/intel/issues/2684
[i915#2828]: https://gitlab.freedesktop.org/drm/intel/issues/2828
[i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
[i915#2849]: https://gitlab.freedesktop.org/drm/intel/issues/2849
[i915#2920]: https://gitlab.freedesktop.org/drm/intel/issues/2920
[i915#2994]: https://gitlab.freedesktop.org/drm/intel/issues/2994
[i915#300]: https://gitlab.freedesktop.org/drm/intel/issues/300
[i915#3002]: https://gitlab.freedesktop.org/drm/intel/issues/3002
[i915#3063]: https://gitlab.freedesktop.org/drm/intel/issues/3063
[i915#307]: https://gitlab.freedesktop.org/drm/intel/issues/307
[i915#3070]: https://gitlab.freedesktop.org/drm/intel/issues/3070
[i915#3160]: https://gitlab.freedesktop.org/drm/intel/issues/3160
[i915#3363]: https://gitlab.freedesktop.org/drm/intel/issues/3363
[i915#3444]: https://gitlab.freedesktop.org/drm/intel/issues/3444
[i915#3468]: https://gitlab.freedesktop.org/drm/intel/issues/3468
[i915#409]: https://gitlab.freedesktop.org/drm/intel/issues/409
[i915#43]: https://gitlab.freedesktop.org/drm/intel/issues/43
[i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
[i915#49]: https://gitlab.freedesktop.org/drm/intel/issues/49
[i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
[i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
[i915#716]: https://gitlab.freedesktop.org/drm/intel/issues/716
[i915#794]: https://gitlab.freedesktop.org/drm/intel/issues/794
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95
Participating hosts (11 -> 10)
------------------------------
Missing (1): pig-snb-2600
Build changes
-------------
* Linux: CI_DRM_10242 -> Patchwork_20407
CI-20190529: 20190529
CI_DRM_10242: a31069c62e8586aa92907539ab948412c1d5f5a0 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_6112: a17cc0c5d096fabfd516848c114bc411e11130f4 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_20407: 88154e0600a8c8bc833dd9d869ae4863e91975c5 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/ttm: Fix incorrect assumptions about ttm_bo_validate() semantics
Quoted 40 lines · Patchwork
Project List - Patchwork *Patch Details*
*Series:* drm/i915/ttm: Fix incorrect assumptions aboutttm_bo_validate()semantics
*URL:* https://patchwork.freedesktop.org/series/91661/ <https://patchwork.freedesktop.org/series/91661/>
*State:* failure
*Details:* https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/index.html <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/index.html>CI Bug Log - changes from
CI_DRM_10242_full->Patchwork_20407_fullSummary
*FAILURE*
Serious unknown changes coming with
Patchwork_20407_fullabsolutely need to be verified manually.If you think the reported changes have nothing to do with the changes introduced in
Patchwork_20407_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.Possible new issues
Here are the unknown changes that may have been introduced in
Patchwork_20407_full:IGT changes
Possible regressions
*
igt@gem_exec_reloc@basic-wide-active@vcs1:
o shard-iclb: NOTRUN -> FAIL
<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-iclb2/igt@gem_exec_reloc@[email protected]>
*
Quoted 7 lines
igt@kms_big_fb@x-tiled-8bpp-rotate-0:
o shard-glk: PASS
<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10242/shard-glk3/igt@[email protected]>
-> FAIL
<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20407/shard-glk1/igt@[email protected]>Failures not related AFAICT.
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 41 lines · Thomas Hellström
We have assumed that if the current placement was not the requested placement, but instead one of the busy placements, a TTM move would have been triggered. That is not the case.
So when we initially place LMEM objects in "Limbo", (that is system placement without any pages allocated), to be able to defer clearing objects until first
get_pages(), the firstget_pages()would happily keep objects in system memory if that is one of the allowed placements. And since we don't yet support i915 GEM system memory from TTM, everything breaks apart.So make sure we try the requested placement first, if no eviction is needed. If that fails, retry with all allowed placements also allowing evictions. Also make sure we handle TTM failure codes correctly.
Also temporarily (until we support i915 GEM system on TTM), restrict allowed placements to the requested placement to avoid things falling apart should LMEM be full.
Fixes 38f28c0695c0 ("drm/i915/ttm: Calculate the object placement at get_pages time)Signed-off-by Thomas Hellström <[email protected]>--- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 61 +++++++++++++++++++++++-- 1 file changed, 58 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/gem/i915_gem_ttm.c +7
-0@@ -64,6 +64,30 @@ static struct ttm_placement i915_sys_placement = { .busy_placement = &sys_placement_flags, }; +static int i915_ttm_err_to_gem (int err) +{ +/* Fastpath */ +if (likely (!err)) +return 0 ; + +switch (err) {
drivers/gpu/drm/i915/gem/i915_gem_ttm.c static struct ttm_placement i915_sys_placement = { · line 83
Quoted 10 lines
drivers/gpu/drm/i915/gem/i915_gem_ttm.c +10
-0+case -EBUSY : +/* +* TTM likes to convert -EDEADLK to -EBUSY, and wants us to +* restart the operation, since we don't record the contending +* lock. We use -EAGAIN to restart. +*/ +return -EAGAIN ; +case -ENOSPC : +/* Memory type / region is full, and we can't evict. */ +return -ENXIO ;
ttm system will return -ENOMEM right?
Quoted 73 lines
drivers/gpu/drm/i915/gem/i915_gem_ttm.c +41
-4+default : +break ; + } + +return err; +} +static void i915_ttm_adjust_lru (struct drm_i915_gem_object *obj); static enum ttm_caching@@ -522,15 +546,46 @@ static int i915_ttm_get_pages(struct drm_i915_gem_object *obj)struct sg_table *st;struct ttm_place requested, busy[I915_TTM_MAX_PLACEMENTS ];struct ttm_placement placement; +int real_num_busy;int ret;GEM_BUG_ON (obj->mm.n_placements >I915_TTM_MAX_PLACEMENTS );/* Move to the requested placement. */ i915_ttm_placement_from_obj (obj, &requested, busy, &placement); + +/* +* For now we support LMEM only with TTM. +* TODO: Remove with system support +*/ +GEM_BUG_ON (requested.mem_type <I915_PL_LMEM0 || + busy[0 ].mem_type <I915_PL_LMEM0 ); + +/* First try only the requested placement. No eviction. */ + real_num_busy =fetch_and_zero (&placement.num_busy_placement); ret =ttm_bo_validate (bo, &placement, &ctx); -if (ret) -return ret == -ENOSPC ? -ENXIO : ret; +if (ret) { + ret =i915_ttm_err_to_gem (ret); +/* +* Anything that wants to restart the operation gets to +* do that. +*/ +if (ret == -EDEADLK || ret == -EINTR || ret == -ERESTARTSYS || + ret == -EAGAIN ) +return ret; + +/* TODO: Remove this when we support system as TTM. */ + real_num_busy =1 ; + +/* +* If the initial attempt fails, allow all accepted placements, +* evicting if necessary. +*/ + placement.num_busy_placement = real_num_busy; + ret =ttm_bo_validate (bo, &placement, &ctx); +if (ret) +return i915_ttm_err_to_gem (ret); + }/* Object either has a page vector or is an iomem object */ st = bo->ttm ?i915_ttm_tt_get_st (bo->ttm) : obj->ttm.cached_io_st;@@ -741,5 +796,5 @@ int __i915_gem_ttm_object_init(struct intel_memory_region *mem, obj->ttm.created = true;/* i915 wants -ENXIO when out of memory region space. */ -return (ret == -ENOSPC ) ? -ENXIO : ret; +return i915_ttm_err_to_gem (ret); } --2.31.1
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 54 lines · Matthew Auld
Quoted 40 lines · Thomas Hellström
We have assumed that if the current placement was not the requested placement, but instead one of the busy placements, a TTM move would have been triggered. That is not the case.
So when we initially place LMEM objects in "Limbo", (that is system placement without any pages allocated), to be able to defer clearing objects until first
get_pages(), the firstget_pages()would happily keep objects in system memory if that is one of the allowed placements. And since we don't yet support i915 GEM system memory from TTM, everything breaks apart.So make sure we try the requested placement first, if no eviction is needed. If that fails, retry with all allowed placements also allowing evictions. Also make sure we handle TTM failure codes correctly.
Also temporarily (until we support i915 GEM system on TTM), restrict allowed placements to the requested placement to avoid things falling apart should LMEM be full.
Fixes 38f28c0695c0 ("drm/i915/ttm: Calculate the object placement at get_pages time)Signed-off-by Thomas Hellström <[email protected]>--- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 61 +++++++++++++++++++++++-- 1 file changed, 58 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/gem/i915_gem_ttm.c +7
-0@@ -64,6 +64,30 @@ static struct ttm_placement i915_sys_placement = { .busy_placement = &sys_placement_flags, }; +static int i915_ttm_err_to_gem (int err) +{ +/* Fastpath */ +if (likely (!err)) +return 0 ; + +switch (err) {drivers/gpu/drm/i915/gem/i915_gem_ttm.c static struct ttm_placement i915_sys_placement = { · line 83
Quoted 10 lines
drivers/gpu/drm/i915/gem/i915_gem_ttm.c +10
-0+case -EBUSY : +/* +* TTM likes to convert -EDEADLK to -EBUSY, and wants us to +* restart the operation, since we don't record the contending +* lock. We use -EAGAIN to restart. +*/ +return -EAGAIN ; +case -ENOSPC : +/* Memory type / region is full, and we can't evict. */ +return -ENXIO ;ttm system will return
-ENOMEMright?
Quoted 1 line
Reviewed-by Matthew Auld <[email protected]>
Hmm, Yes, I suppose so. Will that need some mangling before handing over to GEM?
Thanks for reviewing!
Thomas