Skip to contentSkip to conversation

drm/i915/selftests: add basic selftests for rc6

PATCH In review Andi Shyti 3 participants 6 messages Dec 3, 2019

Subsystems (2)
lore
Share & tools
lore

Andi Shyti

author
#0 lore raw

PATCH v3 1/1 drm/i915/selftests: add basic selftests for rc6

Add three basic tests for rc6 power status:

1. live_rc6_basic - simply checks if rc6 works when it's enabled or stops when it's disabled.

2. live_rc6_threshold - rc6 should not work when the evaluation interval is less than the threshold and should work otherwise.

3. live_rc6_busy - keeps the gpu busy and then goes in idle; checks that we don't fall in rc6 when busy and that we do fall in rc6 when idling.

The three tests are added as sutest of the bigger live_late_gt_pm selftest.

The basic rc6 functionality is tested by checking the reference counter within the evaluation interval.

---
Hi,

this is the first patche from the pm selftest series. Now it's rebased on top of drm-tip.

Changelog:
* v1 -> v2:
- some changes from Chris (thank you!).
* v2 -> v3:
- rebased on top of the latest drm-tip
- fixed exiting order in rc6_basic to avoid exiting without releasing the pm reference

Andi

 drivers/gpu/drm/i915/gt/selftest_gt_pm.c |   3 +
 drivers/gpu/drm/i915/gt/selftest_rc6.c   | 190 +++++++++++++++++++++++
 drivers/gpu/drm/i915/gt/selftest_rc6.h   |   3 +
 3 files changed, 196 insertions(+)
drivers/gpu/drm/i915/gt/selftest_gt_pm.c +3 -0
index 09ff8e4f88af..84d1a58cfa28 100644
@@ -51,6 +51,9 @@ static int live_gt_resume(void *arg)
 int intel_gt_pm_live_selftests(struct drm_i915_private *i915)
 {
 	static const struct i915_subtest tests[] = {
+		SUBTEST(live_rc6_basic),
+		SUBTEST(live_rc6_threshold),
+		SUBTEST(live_rc6_busy),
 		SUBTEST(live_rc6_manual),
 		SUBTEST(live_gt_resume),
 	};
drivers/gpu/drm/i915/gt/selftest_rc6.c +190 -0

199 lines not on this page · raw message

drivers/gpu/drm/i915/gt/selftest_rc6.h +3 -0
index 762fd442d7b2..b924d2e5cb43 100644
@@ -7,6 +7,9 @@
 #ifndef SELFTEST_RC6_H
 #define SELFTEST_RC6_H
 
+int live_rc6_basic(void *arg);
+int live_rc6_threshold(void *arg);
+int live_rc6_busy(void *arg);
 int live_rc6_ctx_wa(void *arg);
 int live_rc6_manual(void *arg);
 
Signature · 6 lines
2.24.0

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

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/selftests: add basic selftests for rc6 (rev3)

== Series Details ==

== Series Details ==

Series: drm/i915/selftests: add basic selftests for rc6 (rev3)
URL : https://patchwork.freedesktop.org/series/69825/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_7467 -> Patchwork_15552
====================================================

Summary
-------

**FAILURE**

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

If you think the reported changes have nothing to do with the changes introduced in Patchwork_15552, 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_15552/index.html

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in Patchwork_15552:

### IGT changes ###

#### Possible regressions ####

* igt@i915_selftest@live_gt_pm:
- fi-icl-u2: [PASS][1] -> [DMESG-FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-icl-u2/igt@i915_selftest@live_gt_pm.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-icl-u2/igt@i915_selftest@live_gt_pm.html
- fi-kbl-7500u: [PASS][3] -> [DMESG-FAIL][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-kbl-7500u/igt@i915_selftest@live_gt_pm.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-kbl-7500u/igt@i915_selftest@live_gt_pm.html
- fi-icl-u3: [PASS][5] -> [DMESG-FAIL][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-icl-u3/igt@i915_selftest@live_gt_pm.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-icl-u3/igt@i915_selftest@live_gt_pm.html
- fi-glk-dsi: [PASS][7] -> [DMESG-FAIL][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-glk-dsi/igt@i915_selftest@live_gt_pm.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-glk-dsi/igt@i915_selftest@live_gt_pm.html
- fi-hsw-peppy: [PASS][9] -> [DMESG-FAIL][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-hsw-peppy/igt@i915_selftest@live_gt_pm.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-hsw-peppy/igt@i915_selftest@live_gt_pm.html
- fi-ivb-3770: [PASS][11] -> [DMESG-FAIL][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-ivb-3770/igt@i915_selftest@live_gt_pm.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-ivb-3770/igt@i915_selftest@live_gt_pm.html
- fi-skl-6700k2: [PASS][13] -> [DMESG-FAIL][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-skl-6700k2/igt@i915_selftest@live_gt_pm.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-skl-6700k2/igt@i915_selftest@live_gt_pm.html
- fi-bsw-n3050: [PASS][15] -> [DMESG-FAIL][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-bsw-n3050/igt@i915_selftest@live_gt_pm.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-bsw-n3050/igt@i915_selftest@live_gt_pm.html
- fi-kbl-soraka: [PASS][17] -> [DMESG-FAIL][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-kbl-soraka/igt@i915_selftest@live_gt_pm.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-kbl-soraka/igt@i915_selftest@live_gt_pm.html
- fi-whl-u: [PASS][19] -> [DMESG-FAIL][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-whl-u/igt@i915_selftest@live_gt_pm.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-whl-u/igt@i915_selftest@live_gt_pm.html
- fi-cfl-guc: [PASS][21] -> [DMESG-FAIL][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-cfl-guc/igt@i915_selftest@live_gt_pm.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-cfl-guc/igt@i915_selftest@live_gt_pm.html
- fi-hsw-4770: [PASS][23] -> [DMESG-FAIL][24]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-hsw-4770/igt@i915_selftest@live_gt_pm.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-hsw-4770/igt@i915_selftest@live_gt_pm.html
- fi-bxt-dsi: [PASS][25] -> [DMESG-FAIL][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-bxt-dsi/igt@i915_selftest@live_gt_pm.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-bxt-dsi/igt@i915_selftest@live_gt_pm.html
- fi-skl-6600u: [PASS][27] -> [DMESG-FAIL][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-skl-6600u/igt@i915_selftest@live_gt_pm.html
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-skl-6600u/igt@i915_selftest@live_gt_pm.html
- fi-cml-u2: [PASS][29] -> [DMESG-FAIL][30]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-cml-u2/igt@i915_selftest@live_gt_pm.html
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-cml-u2/igt@i915_selftest@live_gt_pm.html
- fi-icl-dsi: [PASS][31] -> [DMESG-FAIL][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-icl-dsi/igt@i915_selftest@live_gt_pm.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-icl-dsi/igt@i915_selftest@live_gt_pm.html
- fi-apl-guc: [PASS][33] -> [DMESG-FAIL][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-apl-guc/igt@i915_selftest@live_gt_pm.html
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-apl-guc/igt@i915_selftest@live_gt_pm.html
- fi-kbl-8809g: [PASS][35] -> [DMESG-FAIL][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-kbl-8809g/igt@i915_selftest@live_gt_pm.html
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-kbl-8809g/igt@i915_selftest@live_gt_pm.html
- fi-cfl-8700k: [PASS][37] -> [DMESG-FAIL][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-cfl-8700k/igt@i915_selftest@live_gt_pm.html
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-cfl-8700k/igt@i915_selftest@live_gt_pm.html
- fi-kbl-r: [PASS][39] -> [DMESG-FAIL][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-kbl-r/igt@i915_selftest@live_gt_pm.html
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-kbl-r/igt@i915_selftest@live_gt_pm.html
- fi-byt-j1900: [PASS][41] -> [DMESG-FAIL][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-byt-j1900/igt@i915_selftest@live_gt_pm.html
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-byt-j1900/igt@i915_selftest@live_gt_pm.html
- fi-bsw-nick: [PASS][43] -> [DMESG-FAIL][44]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-bsw-nick/igt@i915_selftest@live_gt_pm.html
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-bsw-nick/igt@i915_selftest@live_gt_pm.html
- fi-icl-y: [PASS][45] -> [DMESG-FAIL][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-icl-y/igt@i915_selftest@live_gt_pm.html
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-icl-y/igt@i915_selftest@live_gt_pm.html
- fi-kbl-x1275: NOTRUN -> [DMESG-FAIL][47]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-kbl-x1275/igt@i915_selftest@live_gt_pm.html
- fi-kbl-guc: [PASS][48] -> [DMESG-FAIL][49]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-kbl-guc/igt@i915_selftest@live_gt_pm.html
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-kbl-guc/igt@i915_selftest@live_gt_pm.html
- fi-skl-guc: [PASS][50] -> [DMESG-FAIL][51]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-skl-guc/igt@i915_selftest@live_gt_pm.html
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-skl-guc/igt@i915_selftest@live_gt_pm.html
- fi-bdw-5557u: [PASS][52] -> [DMESG-FAIL][53]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-bdw-5557u/igt@i915_selftest@live_gt_pm.html
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-bdw-5557u/igt@i915_selftest@live_gt_pm.html
- fi-snb-2600: [PASS][54] -> [DMESG-FAIL][55]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-snb-2600/igt@i915_selftest@live_gt_pm.html
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-snb-2600/igt@i915_selftest@live_gt_pm.html
- fi-bsw-kefka: [PASS][56] -> [DMESG-FAIL][57]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-bsw-kefka/igt@i915_selftest@live_gt_pm.html
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-bsw-kefka/igt@i915_selftest@live_gt_pm.html
- fi-hsw-4770r: [PASS][58] -> [DMESG-FAIL][59]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-hsw-4770r/igt@i915_selftest@live_gt_pm.html
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-hsw-4770r/igt@i915_selftest@live_gt_pm.html
- fi-byt-n2820: [PASS][60] -> [DMESG-FAIL][61]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-byt-n2820/igt@i915_selftest@live_gt_pm.html
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-byt-n2820/igt@i915_selftest@live_gt_pm.html
- fi-skl-lmem: [PASS][62] -> [DMESG-FAIL][63]
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-skl-lmem/igt@i915_selftest@live_gt_pm.html
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-skl-lmem/igt@i915_selftest@live_gt_pm.html
- fi-skl-6770hq: NOTRUN -> [DMESG-FAIL][64]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-skl-6770hq/igt@i915_selftest@live_gt_pm.html
- fi-snb-2520m: [PASS][65] -> [DMESG-FAIL][66]
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-snb-2520m/igt@i915_selftest@live_gt_pm.html
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-snb-2520m/igt@i915_selftest@live_gt_pm.html

#### Warnings ####

* igt@i915_selftest@live_gt_pm:
- fi-icl-guc: [DMESG-FAIL][67] ([i915#571]) -> [DMESG-FAIL][68]
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-icl-guc/igt@i915_selftest@live_gt_pm.html
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-icl-guc/igt@i915_selftest@live_gt_pm.html

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

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

### IGT changes ###

#### Issues hit ####

* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [PASS][69] -> [FAIL][70] ([fdo#111096] / [i915#323])
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-kbl-7500u/igt@[email protected]
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-kbl-7500u/igt@[email protected]

#### Possible fixes ####

* igt@i915_pm_rpm@module-reload:
- fi-skl-6770hq: [DMESG-WARN][71] ([i915#592]) -> [PASS][72]
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-skl-6770hq/igt@[email protected]
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-skl-6770hq/igt@[email protected]

* igt@i915_selftest@live_blt:
- fi-ivb-3770: [DMESG-FAIL][73] ([i915#563]) -> [PASS][74]
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-ivb-3770/igt@i915_selftest@live_blt.html
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-ivb-3770/igt@i915_selftest@live_blt.html
- fi-hsw-4770: [DMESG-FAIL][75] ([i915#563]) -> [PASS][76]
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-hsw-4770/igt@i915_selftest@live_blt.html
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-hsw-4770/igt@i915_selftest@live_blt.html

* igt@i915_selftest@live_gem_contexts:
- fi-skl-lmem: [INCOMPLETE][77] ([i915#424]) -> [PASS][78]
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-skl-lmem/igt@i915_selftest@live_gem_contexts.html
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-skl-lmem/igt@i915_selftest@live_gem_contexts.html
- fi-hsw-peppy: [DMESG-FAIL][79] ([fdo#111692]) -> [PASS][80]
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-hsw-peppy/igt@i915_selftest@live_gem_contexts.html
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-hsw-peppy/igt@i915_selftest@live_gem_contexts.html

* igt@kms_frontbuffer_tracking@basic:
- fi-icl-guc: [FAIL][81] ([i915#49]) -> [PASS][82]
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-icl-guc/igt@[email protected]
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-icl-guc/igt@[email protected]

#### Warnings ####

* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- fi-kbl-x1275: [DMESG-WARN][83] ([i915#62] / [i915#92]) -> [DMESG-WARN][84] ([i915#62] / [i915#92] / [i915#95]) +6 similar issues
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-kbl-x1275/igt@[email protected]
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-kbl-x1275/igt@[email protected]

* igt@kms_flip@basic-flip-vs-modeset:
- fi-kbl-x1275: [DMESG-WARN][85] ([i915#62] / [i915#92] / [i915#95]) -> [DMESG-WARN][86] ([i915#62] / [i915#92]) +7 similar issues
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-kbl-x1275/igt@[email protected]
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-kbl-x1275/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#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096
[fdo#111692]: https://bugs.freedesktop.org/show_bug.cgi?id=111692
[i915#109]: https://gitlab.freedesktop.org/drm/intel/issues/109
[i915#323]: https://gitlab.freedesktop.org/drm/intel/issues/323
[i915#424]: https://gitlab.freedesktop.org/drm/intel/issues/424
[i915#49]: https://gitlab.freedesktop.org/drm/intel/issues/49
[i915#563]: https://gitlab.freedesktop.org/drm/intel/issues/563
[i915#571]: https://gitlab.freedesktop.org/drm/intel/issues/571
[i915#592]: https://gitlab.freedesktop.org/drm/intel/issues/592
[i915#62]: https://gitlab.freedesktop.org/drm/intel/issues/62
[i915#710]: https://gitlab.freedesktop.org/drm/intel/issues/710
[i915#92]: https://gitlab.freedesktop.org/drm/intel/issues/92
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95

Participating hosts (50 -> 45)
------------------------------

Missing (5): fi-ilk-m540 fi-hsw-4200u fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper

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

* CI: CI-20190529 -> None
* Linux: CI_DRM_7467 -> Patchwork_15552

CI-20190529: 20190529
CI_DRM_7467: 14954f24e7251b067b2081aaa09a7da6840da0d5 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5321: 9df50aef49e0da4413609d9866b41b82b725f2a0 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_15552: cad39e5dd244fb05ce050cbf6cf0ee84bc4e39cd @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

cad39e5dd244 drm/i915/selftests: add basic selftests for rc6

== Logs ==

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

#2 lore raw
In reply to Andi Shyti

Quoting Andi Shyti (2019-12-03 08:53:12)

Quoted 68 lines

Add three basic tests for rc6 power status:

1. live_rc6_basic - simply checks if rc6 works when it's enabled or stops when it's disabled.

2. live_rc6_threshold - rc6 should not work when the evaluation interval is less than the threshold and should work otherwise.

3. live_rc6_busy - keeps the gpu busy and then goes in idle; checks that we don't fall in rc6 when busy and that we do fall in rc6 when idling.

The three tests are added as sutest of the bigger live_late_gt_pm selftest.

The basic rc6 functionality is tested by checking the reference counter within the evaluation interval.

---
Hi,

this is the first patche from the pm selftest series. Now it's rebased on top of drm-tip.

Changelog:
* v1 -> v2:
- some changes from Chris (thank you!).
* v2 -> v3:
- rebased on top of the latest drm-tip
- fixed exiting order in rc6_basic to avoid exiting without releasing the pm reference

Andi

 drivers/gpu/drm/i915/gt/selftest_gt_pm.c |   3 +
 drivers/gpu/drm/i915/gt/selftest_rc6.c   | 190 +++++++++++++++++++++++
 drivers/gpu/drm/i915/gt/selftest_rc6.h   |   3 +
 3 files changed, 196 insertions(+)
drivers/gpu/drm/i915/gt/selftest_gt_pm.c +3 -0
index 09ff8e4f88af..84d1a58cfa28 100644
@@ -51,6 +51,9 @@ static int live_gt_resume(void *arg)
 int intel_gt_pm_live_selftests(struct drm_i915_private *i915)
 {
        static const struct i915_subtest tests[] = {
+               SUBTEST(live_rc6_basic),
+               SUBTEST(live_rc6_threshold),
+               SUBTEST(live_rc6_busy),
                SUBTEST(live_rc6_manual),
                SUBTEST(live_gt_resume),
        };
drivers/gpu/drm/i915/gt/selftest_rc6.c +1 -0
index f8b7691be4d1..935e721f5479 100644
@@ -11,6 +11,7 @@
 #include "selftest_rc6.h"
 
 #include "selftests/i915_random.h"
+#include "selftests/igt_spinner.h"
 
 int live_rc6_manual(void *arg)
 {

drivers/gpu/drm/i915/gt/selftest_rc6.c int live_rc6_ctx_wa(void *arg) · line 207

Quoted 5 lines
drivers/gpu/drm/i915/gt/selftest_rc6.c +2 -0
@@ -202,3 +203,192 @@ int live_rc6_ctx_wa(void *arg)
        kfree(engines);
        return err;
 }
+
+static bool test_rc6(struct intel_rc6 *rc6, bool enabled)

I keep getting confused as to the meaning of the result, forgetting it changes based on bool enabled.

Maybe u32 measure_rc6() and leave the pass/fail to the caller? -Chris
_______________________________________________
Intel-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

author
#3 lore raw

Hi Chris,

Quoted 8 lines

drivers/gpu/drm/i915/gt/selftest_rc6.c int live_rc6_ctx_wa(void *arg) · line 207

Quoted 3 lines

}

drivers/gpu/drm/i915/gt/selftest_rc6.c +2 -0
+
+static bool test_rc6(struct intel_rc6 *rc6, bool enabled)

I keep getting confused as to the meaning of the result, forgetting it changes based on bool enabled.

Maybe u32 measure_rc6() and leave the pass/fail to the caller?

yes, I was thinking the same, it makes, indeed more sense.

The original idea was just to know whether rc6 works or not.

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

author
#4 lore raw
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/i915/gt/selftest_rc6.c int live_rc6_ctx_wa(void *arg) · line 207

Quoted 3 lines

}

drivers/gpu/drm/i915/gt/selftest_rc6.c +2 -0
+
+static bool test_rc6(struct intel_rc6 *rc6, bool enabled)

I keep getting confused as to the meaning of the result, forgetting it changes based on bool enabled.

Maybe u32 measure_rc6() and leave the pass/fail to the caller?

thinking a bit better... what exactly would I return? what would measure_rc6 measure? The "sleeping" function is not precise by definition (as you pointed out as well) and it would be out from the scope of this function to provide an exact measure of the interval count.

The way I would rather do it would be:

u32 measure_rc6(u32 time_in_ms)

{
	...
}

bool test_rc6(bool enable)

{
	...
	return enable ^ does_rc6_work(2 * interval);
}

where measure_rc6 provides the counter in a more precise time range and can be also used for other tests, like hysteresis or duty cycle tests where I guess time measurement is more critical.

But as for now such function wouldn't be of any use. I could eventually call 'test_rc6' in a more intuitive way, like 'is_rc6_enabled()'.

Andi

Quoted 6 lines

yes, I was thinking the same, it makes, indeed more sense.

The original idea was just to know whether rc6 works or not.

Thanks,
Andi

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

#5 lore raw

Quoting Andi Shyti (2019-12-03 12:32:24)

Quoted 23 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/i915/gt/selftest_rc6.c int live_rc6_ctx_wa(void *arg) · line 207

Quoted 3 lines

}

drivers/gpu/drm/i915/gt/selftest_rc6.c +2 -0
+
+static bool test_rc6(struct intel_rc6 *rc6, bool enabled)

I keep getting confused as to the meaning of the result, forgetting it changes based on bool enabled.

Maybe u32 measure_rc6() and leave the pass/fail to the caller?

thinking a bit better... what exactly would I return? what would measure_rc6 measure? The "sleeping" function is not precise by definition (as you pointed out as well) and it would be out from the scope of this function to provide an exact measure of the interval count.

The way I would rather do it would be:

u32 measure_rc6(u32 time_in_ms)

{
        ...
}

bool test_rc6(bool enable)

Quoted 8 lines
{
        ...
        return enable ^ does_rc6_work(2 * interval);
}

where measure_rc6 provides the counter in a more precise time range and can be also used for other tests, like hysteresis or duty cycle tests where I guess time measurement is more critical.

That's how I thought it would look since for the first test, test_rc6(rc6->enabled) makes sense. But I would like to know the values of EI, THRESHOLD, slept and measured rc6 to understand failures better.

And when we do get better understanding, the next wave of tests I expect will be more than simple booleans, but did we get x rc6 cycles. (That depends on much we keep scratching at the rc6 powersaving surface :) -Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx