drm/i915/execlists: Simply walk back along request timeline on reset
Subsystems (2)
PATCH 1/1 drm/i915/execlists: Simply walk back along request timeline on reset
The request's timeline will only contain requests from this context, in order of execution. Therefore, we can simply look back along this timeline to find the currently executing request.
If we do find that the current context has completed its last request, that does not imply that all requests are completed in the context, so only advance the ring->head up to the end of the known completions!
--- drivers/gpu/drm/i915/gt/intel_lrc.c | 31 +++++++++++------------------ 1 file changed, 12 insertions(+), 19 deletions(-)
drivers/gpu/drm/i915/gt/intel_lrc.c +12 -19
@@ -252,27 +252,18 @@ static void mark_eio(struct i915_request *rq)static struct i915_request *active_request (struct i915_request *rq) { -const struct intel_context *const ce = rq->hw_context; -struct i915_request *active =NULL ;struct list_head *list; -if (!i915_request_is_active (rq))/* unwound, but incomplete! */ -return rq; -rcu_read_lock (); list = &rcu_dereference (rq->timeline)->requests;list_for_each_entry_from_reverse (rq, list, link) {if (i915_request_completed (rq))break ; - -if (rq->hw_context != ce) -break ; - - active = rq; }rcu_read_unlock (); -return active; +GEM_BUG_ON (i915_request_completed (rq)); +return rq; }static inline u32 intel_hws_preempt_address (struct intel_engine_cs *engine)
@@ -1073,6 +1064,7 @@ static void reset_active(struct i915_request *rq, struct intel_engine_cs *engine) {struct intel_context *const ce = rq->hw_context; +u32 head;/* * The executing context has been cancelled. We want to prevent
@@ -1093,11 +1085,11 @@ static void reset_active(struct i915_request *rq, __func__, engine->name, rq->fence.context, rq->fence.seqno);/* On resubmission of the active request, payload will be scrubbed */ - rq =active_request (rq); -if (rq) - ce->ring->head =intel_ring_wrap (ce->ring, rq->head); +if (i915_request_completed (rq)) + head = rq->tail;else - ce->ring->head = ce->ring->tail; + head =active_request (rq)->head; + ce->ring->head =intel_ring_wrap (ce->ring, head);intel_ring_update_space (ce->ring);/* Scrub the context image to prevent replaying the previous batch */
@@ -2990,16 +2982,17 @@ static void __execlists_reset(struct intel_engine_cs *engine, bool stalled) ce = rq->hw_context;GEM_BUG_ON (!i915_vma_is_pinned (ce->state)); - rq =active_request (rq); -if (!rq) { +if (i915_request_completed (rq)) {/* Idle context; tidy up the ring so we can restart afresh */ - ce->ring->head = ce->ring->tail; + ce->ring->head =intel_ring_wrap (ce->ring, rq->tail); goto out_replay; }/* Context has requests still in-flight; it should not be idle! */ GEM_BUG_ON (i915_active_is_idle (&ce->active)); + rq =active_request (rq); ce->ring->head =intel_ring_wrap (ce->ring, rq->head); +GEM_BUG_ON (ce->ring->head == ce->ring->tail);/* * If this request hasn't started yet, e.g. it is waiting on a
@@ -3043,7 +3036,7 @@ static void __execlists_reset(struct intel_engine_cs *engine, bool stalled)restore_default_state (ce, engine); out_replay: -GEM_TRACE ("%s replay {head:%04x, tail:%04x\n" , +GEM_TRACE ("%s replay {head:%04x, tail:%04x}\n" , engine->name, ce->ring->head, ce->ring->tail);intel_ring_update_space (ce->ring);__execlists_reset_reg_state (ce, engine);
Signature · 6 lines
2.24.0.rc1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for drm/i915/execlists: Simply walk back along request timeline on reset (rev4)
== Series Details ==
== Series Details ==
Series: drm/i915/execlists: Simply walk back along request timeline on reset (rev4)
URL : https://patchwork.freedesktop.org/series/68601/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_7194 -> Patchwork_15007
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_15007 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_15007, 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/Patchwork_15007/index.html
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_15007:
### IGT changes ###
#### Possible regressions ####
* igt@i915_selftest@live_workarounds:
- fi-bsw-n3050: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7194/fi-bsw-n3050/igt@i915_selftest@live_workarounds.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15007/fi-bsw-n3050/igt@i915_selftest@live_workarounds.html
- fi-cfl-guc: [PASS][3] -> [INCOMPLETE][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7194/fi-cfl-guc/igt@i915_selftest@live_workarounds.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15007/fi-cfl-guc/igt@i915_selftest@live_workarounds.html
- fi-bsw-kefka: [PASS][5] -> [INCOMPLETE][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7194/fi-bsw-kefka/igt@i915_selftest@live_workarounds.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15007/fi-bsw-kefka/igt@i915_selftest@live_workarounds.html
- fi-kbl-7500u: [PASS][7] -> [INCOMPLETE][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7194/fi-kbl-7500u/igt@i915_selftest@live_workarounds.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15007/fi-kbl-7500u/igt@i915_selftest@live_workarounds.html
- fi-cfl-8109u: [PASS][9] -> [INCOMPLETE][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7194/fi-cfl-8109u/igt@i915_selftest@live_workarounds.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15007/fi-cfl-8109u/igt@i915_selftest@live_workarounds.html
- fi-kbl-guc: [PASS][11] -> [INCOMPLETE][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7194/fi-kbl-guc/igt@i915_selftest@live_workarounds.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15007/fi-kbl-guc/igt@i915_selftest@live_workarounds.html
- fi-skl-6600u: [PASS][13] -> [INCOMPLETE][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7194/fi-skl-6600u/igt@i915_selftest@live_workarounds.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15007/fi-skl-6600u/igt@i915_selftest@live_workarounds.html
- fi-bdw-5557u: [PASS][15] -> [INCOMPLETE][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7194/fi-bdw-5557u/igt@i915_selftest@live_workarounds.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15007/fi-bdw-5557u/igt@i915_selftest@live_workarounds.html
- fi-whl-u: [PASS][17] -> [INCOMPLETE][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7194/fi-whl-u/igt@i915_selftest@live_workarounds.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15007/fi-whl-u/igt@i915_selftest@live_workarounds.html
- fi-skl-iommu: [PASS][19] -> [INCOMPLETE][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7194/fi-skl-iommu/igt@i915_selftest@live_workarounds.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15007/fi-skl-iommu/igt@i915_selftest@live_workarounds.html
- fi-skl-lmem: [PASS][21] -> [INCOMPLETE][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7194/fi-skl-lmem/igt@i915_selftest@live_workarounds.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15007/fi-skl-lmem/igt@i915_selftest@live_workarounds.html
- fi-skl-6770hq: [PASS][23] -> [INCOMPLETE][24]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7194/fi-skl-6770hq/igt@i915_selftest@live_workarounds.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15007/fi-skl-6770hq/igt@i915_selftest@live_workarounds.html
- fi-kbl-x1275: [PASS][25] -> [INCOMPLETE][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7194/fi-kbl-x1275/igt@i915_selftest@live_workarounds.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15007/fi-kbl-x1275/igt@i915_selftest@live_workarounds.html
- fi-kbl-r: [PASS][27] -> [INCOMPLETE][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7194/fi-kbl-r/igt@i915_selftest@live_workarounds.html
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15007/fi-kbl-r/igt@i915_selftest@live_workarounds.html
- fi-kbl-8809g: [PASS][29] -> [INCOMPLETE][30]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7194/fi-kbl-8809g/igt@i915_selftest@live_workarounds.html
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15007/fi-kbl-8809g/igt@i915_selftest@live_workarounds.html
- fi-skl-guc: [PASS][31] -> [INCOMPLETE][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7194/fi-skl-guc/igt@i915_selftest@live_workarounds.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15007/fi-skl-guc/igt@i915_selftest@live_workarounds.html
- fi-cfl-8700k: [PASS][33] -> [INCOMPLETE][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7194/fi-cfl-8700k/igt@i915_selftest@live_workarounds.html
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15007/fi-cfl-8700k/igt@i915_selftest@live_workarounds.html
* igt@runner@aborted:
- fi-cfl-8700k: NOTRUN -> [FAIL][35]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15007/fi-cfl-8700k/igt@[email protected]
- fi-kbl-8809g: NOTRUN -> [FAIL][36]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15007/fi-kbl-8809g/igt@[email protected]
- fi-kbl-r: NOTRUN -> [FAIL][37]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15007/fi-kbl-r/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_workarounds:
- {fi-tgl-u}: [PASS][38] -> [INCOMPLETE][39]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7194/fi-tgl-u/igt@i915_selftest@live_workarounds.html
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15007/fi-tgl-u/igt@i915_selftest@live_workarounds.html
Known issues
------------
Here are the changes found in Patchwork_15007 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_ctx_switch@rcs0:
- fi-bxt-dsi: [PASS][40] -> [INCOMPLETE][41] ([fdo#103927])
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7194/fi-bxt-dsi/igt@[email protected]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15007/fi-bxt-dsi/igt@[email protected]
* igt@i915_selftest@live_workarounds:
- fi-glk-dsi: [PASS][42] -> [INCOMPLETE][43] ([fdo#103359] / [k.org#198133])
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7194/fi-glk-dsi/igt@i915_selftest@live_workarounds.html
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15007/fi-glk-dsi/igt@i915_selftest@live_workarounds.html
- fi-apl-guc: [PASS][44] -> [INCOMPLETE][45] ([fdo#103927])
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7194/fi-apl-guc/igt@i915_selftest@live_workarounds.html
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15007/fi-apl-guc/igt@i915_selftest@live_workarounds.html
- fi-icl-u3: [PASS][46] -> [INCOMPLETE][47] ([fdo#107713])
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7194/fi-icl-u3/igt@i915_selftest@live_workarounds.html
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15007/fi-icl-u3/igt@i915_selftest@live_workarounds.html
- fi-icl-u2: [PASS][48] -> [INCOMPLETE][49] ([fdo#107713])
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7194/fi-icl-u2/igt@i915_selftest@live_workarounds.html
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15007/fi-icl-u2/igt@i915_selftest@live_workarounds.html
- fi-cml-u2: [PASS][50] -> [INCOMPLETE][51] ([fdo#110566])
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7194/fi-cml-u2/igt@i915_selftest@live_workarounds.html
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15007/fi-cml-u2/igt@i915_selftest@live_workarounds.html
* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [PASS][52] -> [FAIL][53] ([fdo#111045] / [fdo#111096])
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7194/fi-kbl-7500u/igt@[email protected]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15007/fi-kbl-7500u/igt@[email protected]
* igt@prime_vgem@basic-fence-read:
- fi-icl-u3: [PASS][54] -> [DMESG-WARN][55] ([fdo#107724]) +1 similar issue
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7194/fi-icl-u3/igt@[email protected]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15007/fi-icl-u3/igt@[email protected]
#### Possible fixes ####
* igt@gem_exec_create@basic:
- {fi-tgl-u2}: [INCOMPLETE][56] ([fdo#111736]) -> [PASS][57]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7194/fi-tgl-u2/igt@[email protected]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15007/fi-tgl-u2/igt@[email protected]
* igt@gem_exec_fence@basic-wait-default:
- fi-icl-u3: [DMESG-WARN][58] ([fdo#107724]) -> [PASS][59] +1 similar issue
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7194/fi-icl-u3/igt@[email protected]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15007/fi-icl-u3/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#103359]: https://bugs.freedesktop.org/show_bug.cgi?id=103359
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#110566]: https://bugs.freedesktop.org/show_bug.cgi?id=110566
[fdo#111045]: https://bugs.freedesktop.org/show_bug.cgi?id=111045
[fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096
[fdo#111736]: https://bugs.freedesktop.org/show_bug.cgi?id=111736
[k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133
Participating hosts (49 -> 42)
------------------------------
Missing (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-icl-y fi-byt-clapper fi-bdw-samus
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_7194 -> Patchwork_15007
CI-20190529: 20190529
CI_DRM_7194: 5d2161b339033a7eb2d11eef17c5780b44edd996 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5244: 5eef4d167c00031709751f12bd77a42a1b74ac67 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_15007: a082f80ec0a3db1a39821604df0c2a43de925d3d @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
a082f80ec0a3 drm/i915/execlists: Simply walk back along request timeline on reset
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15007/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx