* [PATCH] drm/i915/execlists: Ignore lost completion events
@ 2019-08-31 8:25 Chris Wilson
2019-08-31 8:37 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Chris Wilson @ 2019-08-31 8:25 UTC (permalink / raw)
To: intel-gfx
Icelake hit an issue where it missed reporting a completion event and
instead jumped straight to a idle->active event (skipping over the
active->idle and not even hitting the lite-restore preemption).
661497511us : process_csb: rcs0 cs-irq head=11, tail=0
661497512us : process_csb: rcs0 csb[0]: status=0x10008002:0x00000020 [lite-restore]
661497512us : trace_ports: rcs0: preempted { 28cc8:11052, 0:0 }
661497513us : trace_ports: rcs0: promote { 28cc8:11054, 0:0 }
661497514us : __i915_request_submit: rcs0 fence 28cc8:11056, current 11052
661497514us : __execlists_submission_tasklet: rcs0: queue_priority_hint:-2147483648, submit:yes
661497515us : trace_ports: rcs0: submit { 28cc8:11056, 0:0 }
661497530us : process_csb: rcs0 cs-irq head=0, tail=1
661497530us : process_csb: rcs0 csb[1]: status=0x10008002:0x00000020 [lite-restore]
661497531us : trace_ports: rcs0: preempted { 28cc8:11054!, 0:0 }
661497535us : trace_ports: rcs0: promote { 28cc8:11056, 0:0 }
661497540us : __i915_request_submit: rcs0 fence 28cc8:11058, current 11054
661497544us : __execlists_submission_tasklet: rcs0: queue_priority_hint:-2147483648, submit:yes
661497545us : trace_ports: rcs0: submit { 28cc8:11058, 0:0 }
661497553us : process_csb: rcs0 cs-irq head=1, tail=2
661497553us : process_csb: rcs0 csb[2]: status=0x10000001:0x00000000 [idle->active]
661497574us : process_csb: process_csb:1538 GEM_BUG_ON(*execlists->active)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
---
drivers/gpu/drm/i915/gt/intel_lrc.c | 63 +++++++++--------------------
1 file changed, 18 insertions(+), 45 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
index 0e28263c7b87..9d50fd3b896c 100644
--- a/drivers/gpu/drm/i915/gt/intel_lrc.c
+++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
@@ -693,6 +693,9 @@ trace_ports(const struct intel_engine_execlists *execlists,
const struct intel_engine_cs *engine =
container_of(execlists, typeof(*engine), execlists);
+ if (!ports[0])
+ return;
+
GEM_TRACE("%s: %s { %llx:%lld%s, %llx:%lld }\n",
engine->name, msg,
ports[0]->fence.context,
@@ -1371,13 +1374,6 @@ reset_in_progress(const struct intel_engine_execlists *execlists)
return unlikely(!__tasklet_is_enabled(&execlists->tasklet));
}
-enum csb_step {
- CSB_NOP,
- CSB_PROMOTE,
- CSB_PREEMPT,
- CSB_COMPLETE,
-};
-
/*
* Starting with Gen12, the status has a new format:
*
@@ -1404,7 +1400,7 @@ enum csb_step {
* bits 47-57: sw context id of the lrc the GT switched away from
* bits 58-63: sw counter of the lrc the GT switched away from
*/
-static inline enum csb_step
+static inline bool
gen12_csb_parse(const struct intel_engine_execlists *execlists, const u32 *csb)
{
u32 lower_dw = csb[0];
@@ -1414,7 +1410,7 @@ gen12_csb_parse(const struct intel_engine_execlists *execlists, const u32 *csb)
bool new_queue = lower_dw & GEN12_CTX_STATUS_SWITCHED_TO_NEW_QUEUE;
if (!ctx_away_valid && ctx_to_valid)
- return CSB_PROMOTE;
+ return true;
/*
* The context switch detail is not guaranteed to be 5 when a preemption
@@ -1424,7 +1420,7 @@ gen12_csb_parse(const struct intel_engine_execlists *execlists, const u32 *csb)
* would require some extra handling, but we don't support that.
*/
if (new_queue && ctx_away_valid)
- return CSB_PREEMPT;
+ return true;
/*
* switch detail = 5 is covered by the case above and we do not expect a
@@ -1433,29 +1429,13 @@ gen12_csb_parse(const struct intel_engine_execlists *execlists, const u32 *csb)
*/
GEM_BUG_ON(GEN12_CTX_SWITCH_DETAIL(upper_dw));
- if (*execlists->active) {
- GEM_BUG_ON(!ctx_away_valid);
- return CSB_COMPLETE;
- }
-
- return CSB_NOP;
+ return false;
}
-static inline enum csb_step
+static inline bool
gen8_csb_parse(const struct intel_engine_execlists *execlists, const u32 *csb)
{
- unsigned int status = *csb;
-
- if (status & GEN8_CTX_STATUS_IDLE_ACTIVE)
- return CSB_PROMOTE;
-
- if (status & GEN8_CTX_STATUS_PREEMPTED)
- return CSB_PREEMPT;
-
- if (*execlists->active)
- return CSB_COMPLETE;
-
- return CSB_NOP;
+ return *csb & (GEN8_CTX_STATUS_IDLE_ACTIVE | GEN8_CTX_STATUS_PREEMPTED);
}
static void process_csb(struct intel_engine_cs *engine)
@@ -1494,7 +1474,7 @@ static void process_csb(struct intel_engine_cs *engine)
rmb();
do {
- enum csb_step csb_step;
+ bool promote;
if (++head == num_entries)
head = 0;
@@ -1522,20 +1502,16 @@ static void process_csb(struct intel_engine_cs *engine)
buf[2 * head + 0], buf[2 * head + 1]);
if (INTEL_GEN(engine->i915) >= 12)
- csb_step = gen12_csb_parse(execlists, buf + 2 * head);
+ promote = gen12_csb_parse(execlists, buf + 2 * head);
else
- csb_step = gen8_csb_parse(execlists, buf + 2 * head);
-
- switch (csb_step) {
- case CSB_PREEMPT: /* cancel old inflight, prepare for switch */
+ promote = gen8_csb_parse(execlists, buf + 2 * head);
+ if (promote) {
+ /* cancel old inflight, prepare for switch */
trace_ports(execlists, "preempted", execlists->active);
-
while (*execlists->active)
execlists_schedule_out(*execlists->active++);
- /* fallthrough */
- case CSB_PROMOTE: /* switch pending to inflight */
- GEM_BUG_ON(*execlists->active);
+ /* switch pending to inflight */
GEM_BUG_ON(!assert_pending_valid(execlists, "promote"));
execlists->active =
memcpy(execlists->inflight,
@@ -1550,9 +1526,10 @@ static void process_csb(struct intel_engine_cs *engine)
ring_set_paused(engine, 0);
WRITE_ONCE(execlists->pending[0], NULL);
- break;
+ } else {
+ GEM_BUG_ON(!*execlists->active);
- case CSB_COMPLETE: /* port0 completed, advanced to port1 */
+ /* port0 completed, advanced to port1 */
trace_ports(execlists, "completed", execlists->active);
/*
@@ -1567,10 +1544,6 @@ static void process_csb(struct intel_engine_cs *engine)
GEM_BUG_ON(execlists->active - execlists->inflight >
execlists_num_ports(execlists));
- break;
-
- case CSB_NOP:
- break;
}
} while (head != tail);
--
2.23.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 7+ messages in thread
* ✗ Fi.CI.CHECKPATCH: warning for drm/i915/execlists: Ignore lost completion events
2019-08-31 8:25 [PATCH] drm/i915/execlists: Ignore lost completion events Chris Wilson
@ 2019-08-31 8:37 ` Patchwork
2019-08-31 9:05 ` ✓ Fi.CI.BAT: success " Patchwork
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2019-08-31 8:37 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/execlists: Ignore lost completion events
URL : https://patchwork.freedesktop.org/series/66084/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip
99fb5a9a9d29 drm/i915/execlists: Ignore lost completion events
-:11: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#11:
661497512us : process_csb: rcs0 csb[0]: status=0x10008002:0x00000020 [lite-restore]
total: 0 errors, 1 warnings, 0 checks, 133 lines checked
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* ✓ Fi.CI.BAT: success for drm/i915/execlists: Ignore lost completion events
2019-08-31 8:25 [PATCH] drm/i915/execlists: Ignore lost completion events Chris Wilson
2019-08-31 8:37 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
@ 2019-08-31 9:05 ` Patchwork
2019-09-01 5:18 ` ✓ Fi.CI.IGT: " Patchwork
2019-09-04 7:16 ` [PATCH] " Mika Kuoppala
3 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2019-08-31 9:05 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/execlists: Ignore lost completion events
URL : https://patchwork.freedesktop.org/series/66084/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_6814 -> Patchwork_14249
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14249/
Known issues
------------
Here are the changes found in Patchwork_14249 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@live_mman:
- fi-bsw-kefka: [PASS][1] -> [DMESG-WARN][2] ([fdo#111373])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6814/fi-bsw-kefka/igt@i915_selftest@live_mman.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14249/fi-bsw-kefka/igt@i915_selftest@live_mman.html
* igt@kms_frontbuffer_tracking@basic:
- fi-icl-u2: [PASS][3] -> [FAIL][4] ([fdo#103167])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6814/fi-icl-u2/igt@kms_frontbuffer_tracking@basic.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14249/fi-icl-u2/igt@kms_frontbuffer_tracking@basic.html
#### Possible fixes ####
* igt@gem_exec_reloc@basic-cpu-active:
- {fi-kbl-soraka}: [DMESG-WARN][5] ([fdo#106107]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6814/fi-kbl-soraka/igt@gem_exec_reloc@basic-cpu-active.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14249/fi-kbl-soraka/igt@gem_exec_reloc@basic-cpu-active.html
#### Warnings ####
* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [FAIL][7] ([fdo#111407]) -> [FAIL][8] ([fdo#111096])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6814/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14249/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#106107]: https://bugs.freedesktop.org/show_bug.cgi?id=106107
[fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096
[fdo#111373]: https://bugs.freedesktop.org/show_bug.cgi?id=111373
[fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407
Participating hosts (52 -> 44)
------------------------------
Missing (8): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-icl-y fi-byt-n2820 fi-byt-clapper fi-bdw-samus
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_6814 -> Patchwork_14249
CI-20190529: 20190529
CI_DRM_6814: 36fe82b28ff02470a9b3a8f7861cf4bc0f44df56 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5162: e62ea305fdba2a9cd0dadfa527b54529cb0d1438 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_14249: 99fb5a9a9d2946553c82dbcd63dc0ed2605f6fbc @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
99fb5a9a9d29 drm/i915/execlists: Ignore lost completion events
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14249/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* ✓ Fi.CI.IGT: success for drm/i915/execlists: Ignore lost completion events
2019-08-31 8:25 [PATCH] drm/i915/execlists: Ignore lost completion events Chris Wilson
2019-08-31 8:37 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2019-08-31 9:05 ` ✓ Fi.CI.BAT: success " Patchwork
@ 2019-09-01 5:18 ` Patchwork
2019-09-04 7:16 ` [PATCH] " Mika Kuoppala
3 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2019-09-01 5:18 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/execlists: Ignore lost completion events
URL : https://patchwork.freedesktop.org/series/66084/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_6814_full -> Patchwork_14249_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Known issues
------------
Here are the changes found in Patchwork_14249_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@debugfs_test@read_all_entries:
- shard-skl: [PASS][1] -> [INCOMPLETE][2] ([fdo#108901])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6814/shard-skl4/igt@debugfs_test@read_all_entries.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14249/shard-skl2/igt@debugfs_test@read_all_entries.html
* igt@gem_exec_schedule@preempt-other-chain-bsd:
- shard-iclb: [PASS][3] -> [SKIP][4] ([fdo#111325]) +6 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6814/shard-iclb5/igt@gem_exec_schedule@preempt-other-chain-bsd.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14249/shard-iclb4/igt@gem_exec_schedule@preempt-other-chain-bsd.html
* igt@gem_workarounds@suspend-resume-context:
- shard-apl: [PASS][5] -> [DMESG-WARN][6] ([fdo#108566]) +6 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6814/shard-apl5/igt@gem_workarounds@suspend-resume-context.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14249/shard-apl1/igt@gem_workarounds@suspend-resume-context.html
* igt@i915_pm_rps@reset:
- shard-skl: [PASS][7] -> [FAIL][8] ([fdo#102250])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6814/shard-skl10/igt@i915_pm_rps@reset.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14249/shard-skl10/igt@i915_pm_rps@reset.html
* igt@kms_cursor_crc@pipe-b-cursor-suspend:
- shard-skl: [PASS][9] -> [INCOMPLETE][10] ([fdo#110741])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6814/shard-skl10/igt@kms_cursor_crc@pipe-b-cursor-suspend.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14249/shard-skl10/igt@kms_cursor_crc@pipe-b-cursor-suspend.html
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-pwrite:
- shard-iclb: [PASS][11] -> [FAIL][12] ([fdo#103167]) +1 similar issue
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6814/shard-iclb8/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-pwrite.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14249/shard-iclb4/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-pwrite.html
* igt@kms_frontbuffer_tracking@psr-rgb565-draw-blt:
- shard-iclb: [PASS][13] -> [INCOMPLETE][14] ([fdo#106978] / [fdo#107713])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6814/shard-iclb2/igt@kms_frontbuffer_tracking@psr-rgb565-draw-blt.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14249/shard-iclb7/igt@kms_frontbuffer_tracking@psr-rgb565-draw-blt.html
* igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
- shard-skl: [PASS][15] -> [FAIL][16] ([fdo#108145] / [fdo#110403])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6814/shard-skl9/igt@kms_plane_alpha_blend@pipe-b-coverage-7efc.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14249/shard-skl3/igt@kms_plane_alpha_blend@pipe-b-coverage-7efc.html
* igt@kms_psr@psr2_cursor_mmap_gtt:
- shard-iclb: [PASS][17] -> [SKIP][18] ([fdo#109441])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6814/shard-iclb2/igt@kms_psr@psr2_cursor_mmap_gtt.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14249/shard-iclb3/igt@kms_psr@psr2_cursor_mmap_gtt.html
* igt@kms_vblank@pipe-a-query-busy:
- shard-snb: [PASS][19] -> [SKIP][20] ([fdo#109271]) +5 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6814/shard-snb4/igt@kms_vblank@pipe-a-query-busy.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14249/shard-snb7/igt@kms_vblank@pipe-a-query-busy.html
* igt@perf@blocking:
- shard-skl: [PASS][21] -> [FAIL][22] ([fdo#110728])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6814/shard-skl1/igt@perf@blocking.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14249/shard-skl1/igt@perf@blocking.html
* igt@perf@oa-exponents:
- shard-glk: [PASS][23] -> [FAIL][24] ([fdo#105483])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6814/shard-glk4/igt@perf@oa-exponents.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14249/shard-glk7/igt@perf@oa-exponents.html
* igt@prime_busy@after-bsd2:
- shard-iclb: [PASS][25] -> [SKIP][26] ([fdo#109276]) +17 similar issues
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6814/shard-iclb1/igt@prime_busy@after-bsd2.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14249/shard-iclb8/igt@prime_busy@after-bsd2.html
#### Possible fixes ####
* igt@gem_ctx_shared@exec-single-timeline-bsd:
- shard-iclb: [SKIP][27] ([fdo#110841]) -> [PASS][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6814/shard-iclb1/igt@gem_ctx_shared@exec-single-timeline-bsd.html
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14249/shard-iclb8/igt@gem_ctx_shared@exec-single-timeline-bsd.html
* igt@gem_exec_schedule@independent-bsd2:
- shard-iclb: [SKIP][29] ([fdo#109276]) -> [PASS][30] +21 similar issues
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6814/shard-iclb5/igt@gem_exec_schedule@independent-bsd2.html
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14249/shard-iclb4/igt@gem_exec_schedule@independent-bsd2.html
* igt@gem_exec_schedule@preemptive-hang-bsd:
- shard-iclb: [SKIP][31] ([fdo#111325]) -> [PASS][32] +4 similar issues
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6814/shard-iclb1/igt@gem_exec_schedule@preemptive-hang-bsd.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14249/shard-iclb8/igt@gem_exec_schedule@preemptive-hang-bsd.html
* igt@kms_cursor_edge_walk@pipe-a-64x64-top-edge:
- shard-apl: [INCOMPLETE][33] ([fdo#103927]) -> [PASS][34] +2 similar issues
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6814/shard-apl6/igt@kms_cursor_edge_walk@pipe-a-64x64-top-edge.html
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14249/shard-apl3/igt@kms_cursor_edge_walk@pipe-a-64x64-top-edge.html
* igt@kms_flip@flip-vs-suspend:
- shard-hsw: [INCOMPLETE][35] ([fdo#103540]) -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6814/shard-hsw4/igt@kms_flip@flip-vs-suspend.html
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14249/shard-hsw6/igt@kms_flip@flip-vs-suspend.html
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-blt:
- shard-iclb: [FAIL][37] ([fdo#103167]) -> [PASS][38] +3 similar issues
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6814/shard-iclb2/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-blt.html
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14249/shard-iclb2/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-blt.html
* igt@kms_plane_alpha_blend@pipe-b-constant-alpha-min:
- shard-skl: [FAIL][39] ([fdo#108145]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6814/shard-skl8/igt@kms_plane_alpha_blend@pipe-b-constant-alpha-min.html
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14249/shard-skl4/igt@kms_plane_alpha_blend@pipe-b-constant-alpha-min.html
* igt@kms_psr@psr2_primary_mmap_cpu:
- shard-iclb: [SKIP][41] ([fdo#109441]) -> [PASS][42] +2 similar issues
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6814/shard-iclb3/igt@kms_psr@psr2_primary_mmap_cpu.html
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14249/shard-iclb2/igt@kms_psr@psr2_primary_mmap_cpu.html
* igt@kms_vblank@pipe-c-ts-continuation-suspend:
- shard-apl: [DMESG-WARN][43] ([fdo#108566]) -> [PASS][44] +2 similar issues
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6814/shard-apl1/igt@kms_vblank@pipe-c-ts-continuation-suspend.html
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14249/shard-apl7/igt@kms_vblank@pipe-c-ts-continuation-suspend.html
* igt@perf@polling:
- shard-skl: [FAIL][45] ([fdo#110728]) -> [PASS][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6814/shard-skl1/igt@perf@polling.html
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14249/shard-skl8/igt@perf@polling.html
[fdo#102250]: https://bugs.freedesktop.org/show_bug.cgi?id=102250
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#105483]: https://bugs.freedesktop.org/show_bug.cgi?id=105483
[fdo#106978]: https://bugs.freedesktop.org/show_bug.cgi?id=106978
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#108901]: https://bugs.freedesktop.org/show_bug.cgi?id=108901
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#110403]: https://bugs.freedesktop.org/show_bug.cgi?id=110403
[fdo#110728]: https://bugs.freedesktop.org/show_bug.cgi?id=110728
[fdo#110741]: https://bugs.freedesktop.org/show_bug.cgi?id=110741
[fdo#110841]: https://bugs.freedesktop.org/show_bug.cgi?id=110841
[fdo#111325]: https://bugs.freedesktop.org/show_bug.cgi?id=111325
Participating hosts (10 -> 10)
------------------------------
No changes in participating hosts
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_6814 -> Patchwork_14249
CI-20190529: 20190529
CI_DRM_6814: 36fe82b28ff02470a9b3a8f7861cf4bc0f44df56 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5162: e62ea305fdba2a9cd0dadfa527b54529cb0d1438 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_14249: 99fb5a9a9d2946553c82dbcd63dc0ed2605f6fbc @ 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_14249/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/i915/execlists: Ignore lost completion events
2019-08-31 8:25 [PATCH] drm/i915/execlists: Ignore lost completion events Chris Wilson
` (2 preceding siblings ...)
2019-09-01 5:18 ` ✓ Fi.CI.IGT: " Patchwork
@ 2019-09-04 7:16 ` Mika Kuoppala
3 siblings, 0 replies; 7+ messages in thread
From: Mika Kuoppala @ 2019-09-04 7:16 UTC (permalink / raw)
To: Chris Wilson, intel-gfx
Chris Wilson <chris@chris-wilson.co.uk> writes:
> Icelake hit an issue where it missed reporting a completion event and
> instead jumped straight to a idle->active event (skipping over the
> active->idle and not even hitting the lite-restore preemption).
>
> 661497511us : process_csb: rcs0 cs-irq head=11, tail=0
> 661497512us : process_csb: rcs0 csb[0]: status=0x10008002:0x00000020 [lite-restore]
> 661497512us : trace_ports: rcs0: preempted { 28cc8:11052, 0:0 }
> 661497513us : trace_ports: rcs0: promote { 28cc8:11054, 0:0 }
> 661497514us : __i915_request_submit: rcs0 fence 28cc8:11056, current 11052
> 661497514us : __execlists_submission_tasklet: rcs0: queue_priority_hint:-2147483648, submit:yes
> 661497515us : trace_ports: rcs0: submit { 28cc8:11056, 0:0 }
> 661497530us : process_csb: rcs0 cs-irq head=0, tail=1
> 661497530us : process_csb: rcs0 csb[1]: status=0x10008002:0x00000020 [lite-restore]
> 661497531us : trace_ports: rcs0: preempted { 28cc8:11054!, 0:0 }
> 661497535us : trace_ports: rcs0: promote { 28cc8:11056, 0:0 }
> 661497540us : __i915_request_submit: rcs0 fence 28cc8:11058, current 11054
> 661497544us : __execlists_submission_tasklet: rcs0: queue_priority_hint:-2147483648, submit:yes
> 661497545us : trace_ports: rcs0: submit { 28cc8:11058, 0:0 }
> 661497553us : process_csb: rcs0 cs-irq head=1, tail=2
> 661497553us : process_csb: rcs0 csb[2]: status=0x10000001:0x00000000 [idle->active]
> 661497574us : process_csb: process_csb:1538 GEM_BUG_ON(*execlists->active)
>
In CI? (ref)
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/gt/intel_lrc.c | 63 +++++++++--------------------
> 1 file changed, 18 insertions(+), 45 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
> index 0e28263c7b87..9d50fd3b896c 100644
> --- a/drivers/gpu/drm/i915/gt/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
> @@ -693,6 +693,9 @@ trace_ports(const struct intel_engine_execlists *execlists,
> const struct intel_engine_cs *engine =
> container_of(execlists, typeof(*engine), execlists);
>
> + if (!ports[0])
> + return;
> +
> GEM_TRACE("%s: %s { %llx:%lld%s, %llx:%lld }\n",
> engine->name, msg,
> ports[0]->fence.context,
> @@ -1371,13 +1374,6 @@ reset_in_progress(const struct intel_engine_execlists *execlists)
> return unlikely(!__tasklet_is_enabled(&execlists->tasklet));
> }
>
> -enum csb_step {
> - CSB_NOP,
> - CSB_PROMOTE,
> - CSB_PREEMPT,
> - CSB_COMPLETE,
> -};
> -
> /*
> * Starting with Gen12, the status has a new format:
> *
> @@ -1404,7 +1400,7 @@ enum csb_step {
> * bits 47-57: sw context id of the lrc the GT switched away from
> * bits 58-63: sw counter of the lrc the GT switched away from
> */
> -static inline enum csb_step
> +static inline bool
> gen12_csb_parse(const struct intel_engine_execlists *execlists, const u32 *csb)
should it be gen11_should_promote now?
-Mika
> {
> u32 lower_dw = csb[0];
> @@ -1414,7 +1410,7 @@ gen12_csb_parse(const struct intel_engine_execlists *execlists, const u32 *csb)
> bool new_queue = lower_dw & GEN12_CTX_STATUS_SWITCHED_TO_NEW_QUEUE;
>
> if (!ctx_away_valid && ctx_to_valid)
> - return CSB_PROMOTE;
> + return true;
>
> /*
> * The context switch detail is not guaranteed to be 5 when a preemption
> @@ -1424,7 +1420,7 @@ gen12_csb_parse(const struct intel_engine_execlists *execlists, const u32 *csb)
> * would require some extra handling, but we don't support that.
> */
> if (new_queue && ctx_away_valid)
> - return CSB_PREEMPT;
> + return true;
>
> /*
> * switch detail = 5 is covered by the case above and we do not expect a
> @@ -1433,29 +1429,13 @@ gen12_csb_parse(const struct intel_engine_execlists *execlists, const u32 *csb)
> */
> GEM_BUG_ON(GEN12_CTX_SWITCH_DETAIL(upper_dw));
>
> - if (*execlists->active) {
> - GEM_BUG_ON(!ctx_away_valid);
> - return CSB_COMPLETE;
> - }
> -
> - return CSB_NOP;
> + return false;
> }
>
> -static inline enum csb_step
> +static inline bool
> gen8_csb_parse(const struct intel_engine_execlists *execlists, const u32 *csb)
> {
> - unsigned int status = *csb;
> -
> - if (status & GEN8_CTX_STATUS_IDLE_ACTIVE)
> - return CSB_PROMOTE;
> -
> - if (status & GEN8_CTX_STATUS_PREEMPTED)
> - return CSB_PREEMPT;
> -
> - if (*execlists->active)
> - return CSB_COMPLETE;
> -
> - return CSB_NOP;
> + return *csb & (GEN8_CTX_STATUS_IDLE_ACTIVE | GEN8_CTX_STATUS_PREEMPTED);
> }
>
> static void process_csb(struct intel_engine_cs *engine)
> @@ -1494,7 +1474,7 @@ static void process_csb(struct intel_engine_cs *engine)
> rmb();
>
> do {
> - enum csb_step csb_step;
> + bool promote;
>
> if (++head == num_entries)
> head = 0;
> @@ -1522,20 +1502,16 @@ static void process_csb(struct intel_engine_cs *engine)
> buf[2 * head + 0], buf[2 * head + 1]);
>
> if (INTEL_GEN(engine->i915) >= 12)
> - csb_step = gen12_csb_parse(execlists, buf + 2 * head);
> + promote = gen12_csb_parse(execlists, buf + 2 * head);
> else
> - csb_step = gen8_csb_parse(execlists, buf + 2 * head);
> -
> - switch (csb_step) {
> - case CSB_PREEMPT: /* cancel old inflight, prepare for switch */
> + promote = gen8_csb_parse(execlists, buf + 2 * head);
> + if (promote) {
> + /* cancel old inflight, prepare for switch */
> trace_ports(execlists, "preempted", execlists->active);
> -
> while (*execlists->active)
> execlists_schedule_out(*execlists->active++);
>
> - /* fallthrough */
> - case CSB_PROMOTE: /* switch pending to inflight */
> - GEM_BUG_ON(*execlists->active);
> + /* switch pending to inflight */
> GEM_BUG_ON(!assert_pending_valid(execlists, "promote"));
> execlists->active =
> memcpy(execlists->inflight,
> @@ -1550,9 +1526,10 @@ static void process_csb(struct intel_engine_cs *engine)
> ring_set_paused(engine, 0);
>
> WRITE_ONCE(execlists->pending[0], NULL);
> - break;
> + } else {
> + GEM_BUG_ON(!*execlists->active);
>
> - case CSB_COMPLETE: /* port0 completed, advanced to port1 */
> + /* port0 completed, advanced to port1 */
> trace_ports(execlists, "completed", execlists->active);
>
> /*
> @@ -1567,10 +1544,6 @@ static void process_csb(struct intel_engine_cs *engine)
>
> GEM_BUG_ON(execlists->active - execlists->inflight >
> execlists_num_ports(execlists));
> - break;
> -
> - case CSB_NOP:
> - break;
> }
> } while (head != tail);
>
> --
> 2.23.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] drm/i915/execlists: Ignore lost completion events
@ 2019-09-07 8:43 Chris Wilson
2019-09-10 10:17 ` Mika Kuoppala
0 siblings, 1 reply; 7+ messages in thread
From: Chris Wilson @ 2019-09-07 8:43 UTC (permalink / raw)
To: intel-gfx
Icelake hit an issue where it missed reporting a completion event and
instead jumped straight to a idle->active event (skipping over the
active->idle and not even hitting the lite-restore preemption).
661497511us : process_csb: rcs0 cs-irq head=11, tail=0
661497512us : process_csb: rcs0 csb[0]: status=0x10008002:0x00000020 [lite-restore]
661497512us : trace_ports: rcs0: preempted { 28cc8:11052, 0:0 }
661497513us : trace_ports: rcs0: promote { 28cc8:11054, 0:0 }
661497514us : __i915_request_submit: rcs0 fence 28cc8:11056, current 11052
661497514us : __execlists_submission_tasklet: rcs0: queue_priority_hint:-2147483648, submit:yes
661497515us : trace_ports: rcs0: submit { 28cc8:11056, 0:0 }
661497530us : process_csb: rcs0 cs-irq head=0, tail=1
661497530us : process_csb: rcs0 csb[1]: status=0x10008002:0x00000020 [lite-restore]
661497531us : trace_ports: rcs0: preempted { 28cc8:11054!, 0:0 }
661497535us : trace_ports: rcs0: promote { 28cc8:11056, 0:0 }
661497540us : __i915_request_submit: rcs0 fence 28cc8:11058, current 11054
661497544us : __execlists_submission_tasklet: rcs0: queue_priority_hint:-2147483648, submit:yes
661497545us : trace_ports: rcs0: submit { 28cc8:11058, 0:0 }
661497553us : process_csb: rcs0 cs-irq head=1, tail=2
661497553us : process_csb: rcs0 csb[2]: status=0x10000001:0x00000000 [idle->active]
661497574us : process_csb: process_csb:1538 GEM_BUG_ON(*execlists->active)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
---
drivers/gpu/drm/i915/gt/intel_lrc.c | 63 +++++++++--------------------
1 file changed, 18 insertions(+), 45 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
index 0ddfbebbcbbc..3aad35b570d4 100644
--- a/drivers/gpu/drm/i915/gt/intel_lrc.c
+++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
@@ -693,6 +693,9 @@ trace_ports(const struct intel_engine_execlists *execlists,
const struct intel_engine_cs *engine =
container_of(execlists, typeof(*engine), execlists);
+ if (!ports[0])
+ return;
+
GEM_TRACE("%s: %s { %llx:%lld%s, %llx:%lld }\n",
engine->name, msg,
ports[0]->fence.context,
@@ -1381,13 +1384,6 @@ reset_in_progress(const struct intel_engine_execlists *execlists)
return unlikely(!__tasklet_is_enabled(&execlists->tasklet));
}
-enum csb_step {
- CSB_NOP,
- CSB_PROMOTE,
- CSB_PREEMPT,
- CSB_COMPLETE,
-};
-
/*
* Starting with Gen12, the status has a new format:
*
@@ -1414,7 +1410,7 @@ enum csb_step {
* bits 47-57: sw context id of the lrc the GT switched away from
* bits 58-63: sw counter of the lrc the GT switched away from
*/
-static inline enum csb_step
+static inline bool
gen12_csb_parse(const struct intel_engine_execlists *execlists, const u32 *csb)
{
u32 lower_dw = csb[0];
@@ -1424,7 +1420,7 @@ gen12_csb_parse(const struct intel_engine_execlists *execlists, const u32 *csb)
bool new_queue = lower_dw & GEN12_CTX_STATUS_SWITCHED_TO_NEW_QUEUE;
if (!ctx_away_valid && ctx_to_valid)
- return CSB_PROMOTE;
+ return true;
/*
* The context switch detail is not guaranteed to be 5 when a preemption
@@ -1434,7 +1430,7 @@ gen12_csb_parse(const struct intel_engine_execlists *execlists, const u32 *csb)
* would require some extra handling, but we don't support that.
*/
if (new_queue && ctx_away_valid)
- return CSB_PREEMPT;
+ return true;
/*
* switch detail = 5 is covered by the case above and we do not expect a
@@ -1443,29 +1439,13 @@ gen12_csb_parse(const struct intel_engine_execlists *execlists, const u32 *csb)
*/
GEM_BUG_ON(GEN12_CTX_SWITCH_DETAIL(upper_dw));
- if (*execlists->active) {
- GEM_BUG_ON(!ctx_away_valid);
- return CSB_COMPLETE;
- }
-
- return CSB_NOP;
+ return false;
}
-static inline enum csb_step
+static inline bool
gen8_csb_parse(const struct intel_engine_execlists *execlists, const u32 *csb)
{
- unsigned int status = *csb;
-
- if (status & GEN8_CTX_STATUS_IDLE_ACTIVE)
- return CSB_PROMOTE;
-
- if (status & GEN8_CTX_STATUS_PREEMPTED)
- return CSB_PREEMPT;
-
- if (*execlists->active)
- return CSB_COMPLETE;
-
- return CSB_NOP;
+ return *csb & (GEN8_CTX_STATUS_IDLE_ACTIVE | GEN8_CTX_STATUS_PREEMPTED);
}
static void process_csb(struct intel_engine_cs *engine)
@@ -1504,7 +1484,7 @@ static void process_csb(struct intel_engine_cs *engine)
rmb();
do {
- enum csb_step csb_step;
+ bool promote;
if (++head == num_entries)
head = 0;
@@ -1532,20 +1512,16 @@ static void process_csb(struct intel_engine_cs *engine)
buf[2 * head + 0], buf[2 * head + 1]);
if (INTEL_GEN(engine->i915) >= 12)
- csb_step = gen12_csb_parse(execlists, buf + 2 * head);
+ promote = gen12_csb_parse(execlists, buf + 2 * head);
else
- csb_step = gen8_csb_parse(execlists, buf + 2 * head);
-
- switch (csb_step) {
- case CSB_PREEMPT: /* cancel old inflight, prepare for switch */
+ promote = gen8_csb_parse(execlists, buf + 2 * head);
+ if (promote) {
+ /* cancel old inflight, prepare for switch */
trace_ports(execlists, "preempted", execlists->active);
-
while (*execlists->active)
execlists_schedule_out(*execlists->active++);
- /* fallthrough */
- case CSB_PROMOTE: /* switch pending to inflight */
- GEM_BUG_ON(*execlists->active);
+ /* switch pending to inflight */
GEM_BUG_ON(!assert_pending_valid(execlists, "promote"));
execlists->active =
memcpy(execlists->inflight,
@@ -1560,9 +1536,10 @@ static void process_csb(struct intel_engine_cs *engine)
ring_set_paused(engine, 0);
WRITE_ONCE(execlists->pending[0], NULL);
- break;
+ } else {
+ GEM_BUG_ON(!*execlists->active);
- case CSB_COMPLETE: /* port0 completed, advanced to port1 */
+ /* port0 completed, advanced to port1 */
trace_ports(execlists, "completed", execlists->active);
/*
@@ -1577,10 +1554,6 @@ static void process_csb(struct intel_engine_cs *engine)
GEM_BUG_ON(execlists->active - execlists->inflight >
execlists_num_ports(execlists));
- break;
-
- case CSB_NOP:
- break;
}
} while (head != tail);
--
2.23.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/i915/execlists: Ignore lost completion events
2019-09-07 8:43 Chris Wilson
@ 2019-09-10 10:17 ` Mika Kuoppala
0 siblings, 0 replies; 7+ messages in thread
From: Mika Kuoppala @ 2019-09-10 10:17 UTC (permalink / raw)
To: Chris Wilson, intel-gfx
Chris Wilson <chris@chris-wilson.co.uk> writes:
> Icelake hit an issue where it missed reporting a completion event and
> instead jumped straight to a idle->active event (skipping over the
> active->idle and not even hitting the lite-restore preemption).
>
> 661497511us : process_csb: rcs0 cs-irq head=11, tail=0
> 661497512us : process_csb: rcs0 csb[0]: status=0x10008002:0x00000020 [lite-restore]
> 661497512us : trace_ports: rcs0: preempted { 28cc8:11052, 0:0 }
> 661497513us : trace_ports: rcs0: promote { 28cc8:11054, 0:0 }
> 661497514us : __i915_request_submit: rcs0 fence 28cc8:11056, current 11052
> 661497514us : __execlists_submission_tasklet: rcs0: queue_priority_hint:-2147483648, submit:yes
> 661497515us : trace_ports: rcs0: submit { 28cc8:11056, 0:0 }
> 661497530us : process_csb: rcs0 cs-irq head=0, tail=1
> 661497530us : process_csb: rcs0 csb[1]: status=0x10008002:0x00000020 [lite-restore]
> 661497531us : trace_ports: rcs0: preempted { 28cc8:11054!, 0:0 }
> 661497535us : trace_ports: rcs0: promote { 28cc8:11056, 0:0 }
> 661497540us : __i915_request_submit: rcs0 fence 28cc8:11058, current 11054
> 661497544us : __execlists_submission_tasklet: rcs0: queue_priority_hint:-2147483648, submit:yes
> 661497545us : trace_ports: rcs0: submit { 28cc8:11058, 0:0 }
> 661497553us : process_csb: rcs0 cs-irq head=1, tail=2
> 661497553us : process_csb: rcs0 csb[2]: status=0x10000001:0x00000000 [idle->active]
> 661497574us : process_csb: process_csb:1538 GEM_BUG_ON(*execlists->active)
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Trace is convincing, tho always it feels bit uneasy
for the hardware to change the behaviour 'suddenly'.
And state folds to a binary so othing much to argue against.
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/gt/intel_lrc.c | 63 +++++++++--------------------
> 1 file changed, 18 insertions(+), 45 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
> index 0ddfbebbcbbc..3aad35b570d4 100644
> --- a/drivers/gpu/drm/i915/gt/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
> @@ -693,6 +693,9 @@ trace_ports(const struct intel_engine_execlists *execlists,
> const struct intel_engine_cs *engine =
> container_of(execlists, typeof(*engine), execlists);
>
> + if (!ports[0])
> + return;
> +
> GEM_TRACE("%s: %s { %llx:%lld%s, %llx:%lld }\n",
> engine->name, msg,
> ports[0]->fence.context,
> @@ -1381,13 +1384,6 @@ reset_in_progress(const struct intel_engine_execlists *execlists)
> return unlikely(!__tasklet_is_enabled(&execlists->tasklet));
> }
>
> -enum csb_step {
> - CSB_NOP,
> - CSB_PROMOTE,
> - CSB_PREEMPT,
> - CSB_COMPLETE,
> -};
> -
> /*
> * Starting with Gen12, the status has a new format:
> *
> @@ -1414,7 +1410,7 @@ enum csb_step {
> * bits 47-57: sw context id of the lrc the GT switched away from
> * bits 58-63: sw counter of the lrc the GT switched away from
> */
> -static inline enum csb_step
> +static inline bool
> gen12_csb_parse(const struct intel_engine_execlists *execlists, const u32 *csb)
> {
> u32 lower_dw = csb[0];
> @@ -1424,7 +1420,7 @@ gen12_csb_parse(const struct intel_engine_execlists *execlists, const u32 *csb)
> bool new_queue = lower_dw & GEN12_CTX_STATUS_SWITCHED_TO_NEW_QUEUE;
>
> if (!ctx_away_valid && ctx_to_valid)
> - return CSB_PROMOTE;
> + return true;
>
> /*
> * The context switch detail is not guaranteed to be 5 when a preemption
> @@ -1434,7 +1430,7 @@ gen12_csb_parse(const struct intel_engine_execlists *execlists, const u32 *csb)
> * would require some extra handling, but we don't support that.
> */
> if (new_queue && ctx_away_valid)
> - return CSB_PREEMPT;
> + return true;
>
> /*
> * switch detail = 5 is covered by the case above and we do not expect a
> @@ -1443,29 +1439,13 @@ gen12_csb_parse(const struct intel_engine_execlists *execlists, const u32 *csb)
> */
> GEM_BUG_ON(GEN12_CTX_SWITCH_DETAIL(upper_dw));
>
> - if (*execlists->active) {
> - GEM_BUG_ON(!ctx_away_valid);
> - return CSB_COMPLETE;
> - }
> -
> - return CSB_NOP;
> + return false;
> }
>
> -static inline enum csb_step
> +static inline bool
> gen8_csb_parse(const struct intel_engine_execlists *execlists, const u32 *csb)
> {
> - unsigned int status = *csb;
> -
> - if (status & GEN8_CTX_STATUS_IDLE_ACTIVE)
> - return CSB_PROMOTE;
> -
> - if (status & GEN8_CTX_STATUS_PREEMPTED)
> - return CSB_PREEMPT;
> -
> - if (*execlists->active)
> - return CSB_COMPLETE;
> -
> - return CSB_NOP;
> + return *csb & (GEN8_CTX_STATUS_IDLE_ACTIVE | GEN8_CTX_STATUS_PREEMPTED);
> }
>
> static void process_csb(struct intel_engine_cs *engine)
> @@ -1504,7 +1484,7 @@ static void process_csb(struct intel_engine_cs *engine)
> rmb();
>
> do {
> - enum csb_step csb_step;
> + bool promote;
>
> if (++head == num_entries)
> head = 0;
> @@ -1532,20 +1512,16 @@ static void process_csb(struct intel_engine_cs *engine)
> buf[2 * head + 0], buf[2 * head + 1]);
>
> if (INTEL_GEN(engine->i915) >= 12)
> - csb_step = gen12_csb_parse(execlists, buf + 2 * head);
> + promote = gen12_csb_parse(execlists, buf + 2 * head);
> else
> - csb_step = gen8_csb_parse(execlists, buf + 2 * head);
> -
> - switch (csb_step) {
> - case CSB_PREEMPT: /* cancel old inflight, prepare for switch */
> + promote = gen8_csb_parse(execlists, buf + 2 * head);
> + if (promote) {
> + /* cancel old inflight, prepare for switch */
> trace_ports(execlists, "preempted", execlists->active);
> -
> while (*execlists->active)
> execlists_schedule_out(*execlists->active++);
>
> - /* fallthrough */
> - case CSB_PROMOTE: /* switch pending to inflight */
> - GEM_BUG_ON(*execlists->active);
> + /* switch pending to inflight */
> GEM_BUG_ON(!assert_pending_valid(execlists, "promote"));
> execlists->active =
> memcpy(execlists->inflight,
> @@ -1560,9 +1536,10 @@ static void process_csb(struct intel_engine_cs *engine)
> ring_set_paused(engine, 0);
>
> WRITE_ONCE(execlists->pending[0], NULL);
> - break;
> + } else {
> + GEM_BUG_ON(!*execlists->active);
>
> - case CSB_COMPLETE: /* port0 completed, advanced to port1 */
> + /* port0 completed, advanced to port1 */
> trace_ports(execlists, "completed", execlists->active);
>
> /*
> @@ -1577,10 +1554,6 @@ static void process_csb(struct intel_engine_cs *engine)
>
> GEM_BUG_ON(execlists->active - execlists->inflight >
> execlists_num_ports(execlists));
> - break;
> -
> - case CSB_NOP:
> - break;
> }
> } while (head != tail);
>
> --
> 2.23.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-09-10 10:18 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-31 8:25 [PATCH] drm/i915/execlists: Ignore lost completion events Chris Wilson
2019-08-31 8:37 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2019-08-31 9:05 ` ✓ Fi.CI.BAT: success " Patchwork
2019-09-01 5:18 ` ✓ Fi.CI.IGT: " Patchwork
2019-09-04 7:16 ` [PATCH] " Mika Kuoppala
-- strict thread matches above, loose matches on Subject: below --
2019-09-07 8:43 Chris Wilson
2019-09-10 10:17 ` Mika Kuoppala
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).