Skip to contentSkip to conversation

drm/i915/gt: Poison residual state [HWSP] across resume.

PATCH Superseded Chris Wilson 2 participants 4 messages Apr 17, 2020 – Apr 19, 2020

Subsystems (2)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 drm/i915/gt: Poison residual state [HWSP] across resume.

Since we may lose the content of any buffer when we relinquish control of the system (e.g. suspend/resume), we have to be careful not to rely on regaining control. A good method to detect when we might be using garbage is by always injecting that garbage prior to first use on load/resume/etc.

Cc Tvrtko Ursulin <[email protected]>
Cc Venkata Ramana Nayana <[email protected]>
Cc Daniele Ceraolo Spurio <[email protected]>
---
 drivers/gpu/drm/i915/gt/intel_lrc.c | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
drivers/gpu/drm/i915/gt/intel_lrc.c +28 -0
index 34f67eb9bfa1..7b3eaa1148df 100644
@@ -3647,9 +3647,37 @@ static void reset_csb_pointers(struct intel_engine_cs *engine)
 			       &execlists->csb_status[reset_value]);
 }
 
+static void timeline_reset_seqno(const struct intel_timeline *tl)
+{
+	/* Must be pinned to be writable, and no requests in flight. */
+	GEM_BUG_ON(!atomic_read(&tl->pin_count));
+	GEM_BUG_ON(atomic_read(&tl->active_count));
+
+	WRITE_ONCE(*(u32 *)tl->hwsp_seqno, tl->seqno);
+}
+
 static void execlists_sanitize(struct intel_engine_cs *engine)
 {
+	/*
+	 * Poison residual state on resume, in case the suspend didn't!
+	 *
+	 * We have to assume that across suspend/resume (or other loss
+	 * of control) that the contents of our pinned buffers has been
+	 * lost, replaced by garbage. Since this doesn't always happen,
+	 * let's poison such state so that we more quickly spot when
+	 * we falsely assume it has been preserved.
+	 */
+	if (IS_ENABLED(CONFIG_DRM_I915_DEBUG_GEM))
+		memset(engine->status_page.addr, POISON_INUSE, PAGE_SIZE);
+
 	reset_csb_pointers(engine);
+
+	/*
+	 * The kernel_context HWSP is stored in the status_page. As above,
+	 * that may be lost on resume/initialisation, and so we need to
+	 * reset the value in the HWSP.
+	 */
+	timeline_reset_seqno(engine->kernel_context->timeline);
 }
 
 static void enable_error_interrupt(struct intel_engine_cs *engine)
Signature · 6 lines
2.20.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

[Intel-gfx] ✗ Fi.CI.DOCS: warning for drm/i915/gt: Poison residual state [HWSP] across resume. (rev2)

== Series Details ==

== Series Details ==

Series: drm/i915/gt: Poison residual state [HWSP] across resume. (rev2)
URL : https://patchwork.freedesktop.org/series/76100/
State : warning

== Summary ==

$ make htmldocs 2>&1 > /dev/null | grep i915
/home/cidrm/kernel/Documentation/gpu/i915.rst:610: WARNING: duplicate label gpu/i915:layout, other instance in /home/cidrm/kernel/Documentation/gpu/i915.rst

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/gt: Poison residual state [HWSP] across resume. (rev2)

In reply to Chris Wilson
== Series Details ==

== Series Details ==

Series: drm/i915/gt: Poison residual state [HWSP] across resume. (rev2)
URL : https://patchwork.freedesktop.org/series/76100/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_8322 -> Patchwork_17360
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17360/index.html

Changes
-------

No changes found

Participating hosts (51 -> 45)
------------------------------

Additional (1): fi-cml-u2
Missing (7): fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-kbl-7560u fi-byt-clapper fi-bdw-samus

Build changes
-------------

* CI: CI-20190529 -> None
* Linux: CI_DRM_8322 -> Patchwork_17360

CI-20190529: 20190529
CI_DRM_8322: fd447e6b1ee13e6a9731bddc7694552640e8a01e @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5599: cdb07101dda33e2fcb0f4c2aa199c47159d88f35 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_17360: 2580009039243acff75a1b6d89c230f10fbd53f4 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

258000903924 drm/i915/gt: Poison residual state [HWSP] across resume.

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17360/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw

[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/gt: Poison residual state [HWSP] across resume. (rev2)

In reply to Chris Wilson
== Series Details ==

== Series Details ==

Series: drm/i915/gt: Poison residual state [HWSP] across resume. (rev2)
URL : https://patchwork.freedesktop.org/series/76100/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_8322_full -> Patchwork_17360_full
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_17360_full absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_17360_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_17360_full:

### IGT changes ###

#### Possible regressions ####

* igt@i915_module_load@reload-with-fault-injection:
- shard-skl: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8322/shard-skl8/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17360/shard-skl1/igt@[email protected]
- shard-kbl: [PASS][3] -> [INCOMPLETE][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8322/shard-kbl2/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17360/shard-kbl2/igt@[email protected]
- shard-tglb: [PASS][5] -> [INCOMPLETE][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8322/shard-tglb7/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17360/shard-tglb8/igt@[email protected]
- shard-apl: [PASS][7] -> [INCOMPLETE][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8322/shard-apl2/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17360/shard-apl4/igt@[email protected]
- shard-iclb: [PASS][9] -> [INCOMPLETE][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8322/shard-iclb3/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17360/shard-iclb5/igt@[email protected]

Known issues
------------

Here are the changes found in Patchwork_17360_full that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_ctx_persistence@processes:
- shard-apl: [PASS][11] -> [FAIL][12] ([i915#1528])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8322/shard-apl3/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17360/shard-apl8/igt@[email protected]

* igt@gem_workarounds@suspend-resume-fd:
- shard-skl: [PASS][13] -> [INCOMPLETE][14] ([i915#69])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8322/shard-skl1/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17360/shard-skl8/igt@[email protected]

* igt@i915_module_load@reload-with-fault-injection:
- shard-glk: [PASS][15] -> [INCOMPLETE][16] ([i915#58] / [k.org#198133])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8322/shard-glk6/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17360/shard-glk4/igt@[email protected]

* igt@i915_pm_rc6_residency@rc6-idle:
- shard-snb: [PASS][17] -> [FAIL][18] ([i915#1066])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8322/shard-snb6/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17360/shard-snb6/igt@[email protected]

* igt@kms_cursor_crc@pipe-a-cursor-128x42-random:
- shard-kbl: [PASS][19] -> [FAIL][20] ([i915#54] / [i915#93] / [i915#95])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8322/shard-kbl1/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17360/shard-kbl2/igt@[email protected]

* igt@kms_cursor_crc@pipe-c-cursor-suspend:
- shard-apl: [PASS][21] -> [DMESG-WARN][22] ([i915#180]) +1 similar issue
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8322/shard-apl7/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17360/shard-apl6/igt@[email protected]

* igt@kms_dp_dsc@basic-dsc-enable-edp:
- shard-iclb: [PASS][23] -> [SKIP][24] ([fdo#109349])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8322/shard-iclb2/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17360/shard-iclb3/igt@[email protected]

* igt@kms_mmap_write_crc@main:
- shard-kbl: [PASS][25] -> [FAIL][26] ([i915#93] / [i915#95])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8322/shard-kbl4/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17360/shard-kbl7/igt@[email protected]

* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes:
- shard-kbl: [PASS][27] -> [DMESG-WARN][28] ([i915#180]) +3 similar issues
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8322/shard-kbl3/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17360/shard-kbl4/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
- shard-skl: [PASS][29] -> [FAIL][30] ([fdo#108145] / [i915#265])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8322/shard-skl8/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17360/shard-skl3/igt@[email protected]

* igt@kms_psr@psr2_cursor_render:
- shard-iclb: [PASS][31] -> [SKIP][32] ([fdo#109441]) +1 similar issue
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8322/shard-iclb2/igt@kms_psr@psr2_cursor_render.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17360/shard-iclb6/igt@kms_psr@psr2_cursor_render.html

* igt@kms_setmode@basic:
- shard-skl: [PASS][33] -> [FAIL][34] ([i915#31])
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8322/shard-skl7/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17360/shard-skl6/igt@[email protected]
- shard-kbl: [PASS][35] -> [FAIL][36] ([i915#31])
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8322/shard-kbl6/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17360/shard-kbl4/igt@[email protected]

#### Possible fixes ####

* igt@gem_exec_params@invalid-bsd-ring:
- shard-iclb: [SKIP][37] ([fdo#109276]) -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8322/shard-iclb6/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17360/shard-iclb1/igt@[email protected]

* {igt@kms_flip@flip-vs-expired-vblank@c-edp1}:
- shard-skl: [FAIL][39] ([i915#79]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8322/shard-skl6/igt@kms_flip@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17360/shard-skl10/igt@kms_flip@[email protected]

* {igt@kms_flip@flip-vs-suspend-interruptible@c-dp1}:
- shard-apl: [DMESG-WARN][41] ([i915#180]) -> [PASS][42] +3 similar issues
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8322/shard-apl3/igt@kms_flip@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17360/shard-apl8/igt@kms_flip@[email protected]

* {igt@kms_flip@plain-flip-ts-check@c-edp1}:
- shard-skl: [FAIL][43] ([i915#34]) -> [PASS][44]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8322/shard-skl9/igt@kms_flip@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17360/shard-skl4/igt@kms_flip@[email protected]

* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- shard-kbl: [DMESG-WARN][45] ([i915#180]) -> [PASS][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8322/shard-kbl7/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17360/shard-kbl6/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-a-coverage-7efc:
- shard-skl: [FAIL][47] ([fdo#108145] / [i915#265]) -> [PASS][48]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8322/shard-skl5/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17360/shard-skl7/igt@[email protected]

* igt@kms_psr2_su@frontbuffer:
- shard-iclb: [SKIP][49] ([fdo#109642] / [fdo#111068]) -> [PASS][50]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8322/shard-iclb7/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17360/shard-iclb2/igt@[email protected]

* igt@kms_psr@psr2_primary_page_flip:
- shard-iclb: [SKIP][51] ([fdo#109441]) -> [PASS][52] +3 similar issues
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8322/shard-iclb7/igt@kms_psr@psr2_primary_page_flip.html
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17360/shard-iclb2/igt@kms_psr@psr2_primary_page_flip.html

* {igt@perf@polling-parameterized}:
- shard-tglb: [FAIL][53] ([i915#1542]) -> [PASS][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8322/shard-tglb6/igt@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17360/shard-tglb1/igt@[email protected]

* {igt@perf@polling-small-buf}:
- shard-iclb: [FAIL][55] -> [PASS][56]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8322/shard-iclb3/igt@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17360/shard-iclb7/igt@[email protected]

#### Warnings ####

* igt@kms_plane_alpha_blend@pipe-c-alpha-7efc:
- shard-apl: [FAIL][57] ([fdo#108145] / [i915#265] / [i915#95]) -> [FAIL][58] ([fdo#108145] / [i915#265])
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8322/shard-apl4/igt@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17360/shard-apl2/igt@[email protected]

* igt@runner@aborted:
- shard-kbl: [FAIL][59] -> [FAIL][60] ([i915#1423] / [i915#92])
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8322/shard-kbl2/igt@[email protected]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17360/shard-kbl2/igt@[email protected]
- shard-glk: [FAIL][61] ([k.org#202321]) -> ([FAIL][62], [FAIL][63]) ([i915#1423] / [k.org#202321])
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8322/shard-glk8/igt@[email protected]
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17360/shard-glk7/igt@[email protected]
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17360/shard-glk4/igt@[email protected]
- shard-tglb: [FAIL][64] ([i915#1602]) -> [FAIL][65] ([i915#1390])
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8322/shard-tglb7/igt@[email protected]
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17360/shard-tglb8/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#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109349]: https://bugs.freedesktop.org/show_bug.cgi?id=109349
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[i915#1066]: https://gitlab.freedesktop.org/drm/intel/issues/1066
[i915#1390]: https://gitlab.freedesktop.org/drm/intel/issues/1390
[i915#1423]: https://gitlab.freedesktop.org/drm/intel/issues/1423
[i915#1528]: https://gitlab.freedesktop.org/drm/intel/issues/1528
[i915#1542]: https://gitlab.freedesktop.org/drm/intel/issues/1542
[i915#1602]: https://gitlab.freedesktop.org/drm/intel/issues/1602
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
[i915#31]: https://gitlab.freedesktop.org/drm/intel/issues/31
[i915#34]: https://gitlab.freedesktop.org/drm/intel/issues/34
[i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
[i915#58]: https://gitlab.freedesktop.org/drm/intel/issues/58
[i915#69]: https://gitlab.freedesktop.org/drm/intel/issues/69
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
[i915#92]: https://gitlab.freedesktop.org/drm/intel/issues/92
[i915#93]: https://gitlab.freedesktop.org/drm/intel/issues/93
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95
[k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133
[k.org#202321]: https://bugzilla.kernel.org/show_bug.cgi?id=202321

Participating hosts (10 -> 10)
------------------------------

No changes in participating hosts

Build changes
-------------

* CI: CI-20190529 -> None
* Linux: CI_DRM_8322 -> Patchwork_17360

CI-20190529: 20190529
CI_DRM_8322: fd447e6b1ee13e6a9731bddc7694552640e8a01e @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5599: cdb07101dda33e2fcb0f4c2aa199c47159d88f35 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_17360: 2580009039243acff75a1b6d89c230f10fbd53f4 @ 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_17360/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx