Skip to contentSkip to conversation

lib/igt_pm: dump runtime pm status on timeout

PATCH In review [email protected] 3 participants 4 messages Oct 8, 2019 – Oct 10, 2019 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lib/igt_pm: dump runtime pm status on timeout

From: Don Hiatt <[email protected]>

Display the runtime pm status if we timeout waiting for status.

---
 lib/igt_pm.c | 16 ++++++++++++----
 lib/igt_pm.h |  2 +-
 2 files changed, 13 insertions(+), 5 deletions(-)
lib/igt_pm.c +12 -4
index 64ce240e093f..0d3561fdf821 100644
@@ -658,16 +658,17 @@ void igt_disable_runtime_pm(void)
 
 /**
  * igt_get_runtime_pm_status:
+ * @buf: buffer to place pm status string in
+ * @len: length of buf
  *
  * Returns: The current runtime PM status.
  */
-enum igt_runtime_pm_status igt_get_runtime_pm_status(void)
+enum igt_runtime_pm_status igt_get_runtime_pm_status(char *buf, int len)
 {
 	ssize_t n_read;
-	char buf[32];
 
 	lseek(pm_status_fd, 0, SEEK_SET);
-	n_read = read(pm_status_fd, buf, ARRAY_SIZE(buf) - 1);
+	n_read = read(pm_status_fd, buf, len - 1);
 	igt_assert(n_read >= 0);
 	buf[n_read] = '\0';
 
@@ -697,7 +698,14 @@ enum igt_runtime_pm_status igt_get_runtime_pm_status(void)
  */
 bool igt_wait_for_pm_status(enum igt_runtime_pm_status status)
 {
-	return igt_wait(igt_get_runtime_pm_status() == status, 10000, 100);
+	bool ret;
+	char buf[32];
+
+	ret = igt_wait(igt_get_runtime_pm_status(buf, ARRAY_SIZE(buf)) == status, 10000, 100);
+	if (!ret)
+		igt_warn("timeout: pm_status=%s", buf);
+
+	return ret;
 }
 
 /**
lib/igt_pm.h +1 -1
index 7dc241749180..b2ff835e8a33 100644
@@ -49,7 +49,7 @@ enum igt_runtime_pm_status {
 bool igt_setup_runtime_pm(void);
 void igt_disable_runtime_pm(void);
 void igt_restore_runtime_pm(void);
-enum igt_runtime_pm_status igt_get_runtime_pm_status(void);
+enum igt_runtime_pm_status igt_get_runtime_pm_status(char *buf, int len);
 bool igt_wait_for_pm_status(enum igt_runtime_pm_status status);
 bool igt_pm_dmc_loaded(int debugfs);
 bool igt_pm_pc8_plus_residencies_enabled(int msr_fd);
Signature · 6 lines
2.20.1

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

[igt-dev] ✓ Fi.CI.BAT: success for lib/igt_pm: dump runtime pm status on timeout

== Series Details ==

== Series Details ==

Series: lib/igt_pm: dump runtime pm status on timeout
URL : https://patchwork.freedesktop.org/series/67739/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_7034 -> IGTPW_3553
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

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

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

### IGT changes ###

#### Suppressed ####

The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.

* igt@i915_selftest@live_hangcheck:
- {fi-tgl-u}: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7034/fi-tgl-u/igt@i915_selftest@live_hangcheck.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/fi-tgl-u/igt@i915_selftest@live_hangcheck.html

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_mmap_gtt@basic-small-bo-tiledx:
- fi-icl-u3: [PASS][3] -> [DMESG-WARN][4] ([fdo#107724]) +2 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7034/fi-icl-u3/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/fi-icl-u3/igt@[email protected]

* igt@i915_module_load@reload:
- fi-blb-e6850: [PASS][5] -> [INCOMPLETE][6] ([fdo#107718])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7034/fi-blb-e6850/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/fi-blb-e6850/igt@[email protected]

#### Possible fixes ####

* igt@gem_exec_suspend@basic-s4-devices:
- fi-kbl-7500u: [DMESG-WARN][7] ([fdo#105128] / [fdo#107139]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7034/fi-kbl-7500u/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/fi-kbl-7500u/igt@[email protected]

* igt@gem_linear_blits@basic:
- fi-icl-u3: [DMESG-WARN][9] ([fdo#107724]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7034/fi-icl-u3/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/fi-icl-u3/igt@[email protected]

* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [FAIL][11] ([fdo#111407]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7034/fi-kbl-7500u/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/fi-kbl-7500u/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#105128]: https://bugs.freedesktop.org/show_bug.cgi?id=105128
[fdo#107139]: https://bugs.freedesktop.org/show_bug.cgi?id=107139
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407

Participating hosts (49 -> 44)
------------------------------

Missing (5): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-icl-y fi-byt-clapper

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

* CI: CI-20190529 -> None
* IGT: IGT_5218 -> IGTPW_3553

CI-20190529: 20190529
CI_DRM_7034: ed62a5500342bb02d735d35d6a0fea5cf27a6e23 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_3553: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/index.html
IGT_5218: 869ed1ee0b71ce17f0a864512488f8b1a6cb8545 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

#2 lore raw

[igt-dev] ✓ Fi.CI.IGT: success for lib/igt_pm: dump runtime pm status on timeout

In reply to [email protected]
== Series Details ==

== Series Details ==

Series: lib/igt_pm: dump runtime pm status on timeout
URL : https://patchwork.freedesktop.org/series/67739/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_7034_full -> IGTPW_3553_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

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

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

### IGT changes ###

#### Suppressed ####

The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.

* igt@kms_flip@flip-vs-blocking-wf-vblank:
- {shard-tglb}: NOTRUN -> [FAIL][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/shard-tglb6/igt@[email protected]

* igt@kms_rotation_crc@primary-yf-tiled-reflect-x-180:
- {shard-tglb}: NOTRUN -> [SKIP][2] +1 similar issue
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/shard-tglb2/igt@[email protected]

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_eio@in-flight-contexts-immediate:
- shard-snb: [PASS][3] -> [FAIL][4] ([fdo#111925])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7034/shard-snb5/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/shard-snb1/igt@[email protected]

* igt@gem_exec_schedule@preempt-other-chain-bsd:
- shard-iclb: [PASS][5] -> [SKIP][6] ([fdo#111325]) +9 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7034/shard-iclb8/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/shard-iclb4/igt@[email protected]

* igt@gem_exec_schedule@preempt-queue-bsd1:
- shard-iclb: [PASS][7] -> [SKIP][8] ([fdo#109276]) +17 similar issues
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7034/shard-iclb2/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/shard-iclb7/igt@[email protected]

* igt@gem_userptr_blits@sync-unmap-cycles:
- shard-snb: [PASS][9] -> [DMESG-WARN][10] ([fdo#111870]) +1 similar issue
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7034/shard-snb4/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/shard-snb5/igt@[email protected]

* igt@i915_pm_rps@waitboost:
- shard-apl: [PASS][11] -> [FAIL][12] ([fdo#102250])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7034/shard-apl2/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/shard-apl3/igt@[email protected]

* igt@kms_cursor_crc@pipe-b-cursor-128x42-sliding:
- shard-kbl: [PASS][13] -> [FAIL][14] ([fdo#103232])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7034/shard-kbl4/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/shard-kbl3/igt@[email protected]
- shard-apl: [PASS][15] -> [FAIL][16] ([fdo#103232])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7034/shard-apl8/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/shard-apl6/igt@[email protected]

* igt@kms_flip@flip-vs-expired-vblank:
- shard-glk: [PASS][17] -> [FAIL][18] ([fdo#105363])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7034/shard-glk7/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/shard-glk6/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-pwrite:
- shard-iclb: [PASS][19] -> [FAIL][20] ([fdo#103167]) +1 similar issue
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7034/shard-iclb2/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-pwrite.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/shard-iclb6/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-pwrite.html

* igt@kms_frontbuffer_tracking@fbc-1p-rte:
- shard-iclb: [PASS][21] -> [FAIL][22] ([fdo#103167] / [fdo#110378])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7034/shard-iclb6/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/shard-iclb1/igt@[email protected]

* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes:
- shard-apl: [PASS][23] -> [DMESG-WARN][24] ([fdo#108566]) +1 similar issue
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7034/shard-apl1/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/shard-apl3/igt@[email protected]

* igt@kms_plane_lowres@pipe-a-tiling-y:
- shard-iclb: [PASS][25] -> [FAIL][26] ([fdo#103166])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7034/shard-iclb1/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/shard-iclb4/igt@[email protected]

* igt@kms_psr@psr2_cursor_mmap_cpu:
- shard-iclb: [PASS][27] -> [SKIP][28] ([fdo#109441])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7034/shard-iclb2/igt@kms_psr@psr2_cursor_mmap_cpu.html
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/shard-iclb7/igt@kms_psr@psr2_cursor_mmap_cpu.html

* igt@kms_setmode@basic:
- shard-apl: [PASS][29] -> [FAIL][30] ([fdo#99912])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7034/shard-apl7/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/shard-apl2/igt@[email protected]

#### Possible fixes ####

* igt@gem_ctx_shared@exec-single-timeline-bsd:
- shard-iclb: [SKIP][31] ([fdo#110841]) -> [PASS][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7034/shard-iclb1/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/shard-iclb3/igt@[email protected]

* igt@gem_exec_balancer@smoke:
- shard-iclb: [SKIP][33] ([fdo#110854]) -> [PASS][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7034/shard-iclb8/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/shard-iclb1/igt@[email protected]

* igt@gem_exec_schedule@preempt-queue-contexts-chain-bsd:
- shard-iclb: [SKIP][35] ([fdo#111325]) -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7034/shard-iclb2/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/shard-iclb3/igt@[email protected]

* igt@gem_userptr_blits@sync-unmap:
- shard-snb: [DMESG-WARN][37] ([fdo#111870]) -> [PASS][38] +1 similar issue
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7034/shard-snb4/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/shard-snb4/igt@[email protected]

* igt@gem_userptr_blits@sync-unmap-after-close:
- shard-hsw: [DMESG-WARN][39] ([fdo#111870]) -> [PASS][40] +3 similar issues
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7034/shard-hsw8/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/shard-hsw8/igt@[email protected]

* igt@i915_pm_rpm@system-suspend:
- {shard-tglb}: [INCOMPLETE][41] ([fdo#111747]) -> [PASS][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7034/shard-tglb1/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/shard-tglb6/igt@[email protected]

* igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
- shard-glk: [FAIL][43] ([fdo#105363]) -> [PASS][44]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7034/shard-glk9/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/shard-glk3/igt@[email protected]

* igt@kms_flip@flip-vs-suspend-interruptible:
- shard-hsw: [INCOMPLETE][45] ([fdo#103540]) -> [PASS][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7034/shard-hsw4/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/shard-hsw7/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-badstride:
- shard-iclb: [FAIL][47] ([fdo#103167]) -> [PASS][48] +2 similar issues
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7034/shard-iclb7/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/shard-iclb6/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-suspend:
- shard-apl: [DMESG-WARN][49] ([fdo#108566]) -> [PASS][50] +6 similar issues
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7034/shard-apl6/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/shard-apl3/igt@[email protected]

* igt@kms_plane_lowres@pipe-a-tiling-x:
- shard-iclb: [FAIL][51] ([fdo#103166]) -> [PASS][52]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7034/shard-iclb6/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/shard-iclb3/igt@[email protected]

* igt@kms_psr@psr2_no_drrs:
- shard-iclb: [SKIP][53] ([fdo#109441]) -> [PASS][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7034/shard-iclb1/igt@kms_psr@psr2_no_drrs.html
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/shard-iclb2/igt@kms_psr@psr2_no_drrs.html

* igt@kms_vblank@pipe-c-wait-forked-busy-hang:
- {shard-tglb}: [INCOMPLETE][55] -> [PASS][56]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7034/shard-tglb1/igt@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/shard-tglb4/igt@[email protected]

* igt@prime_vgem@fence-wait-bsd2:
- shard-iclb: [SKIP][57] ([fdo#109276]) -> [PASS][58] +20 similar issues
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7034/shard-iclb3/igt@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/shard-iclb4/igt@[email protected]

#### Warnings ####

* igt@gem_mocs_settings@mocs-isolation-bsd2:
- shard-iclb: [SKIP][59] ([fdo#109276]) -> [FAIL][60] ([fdo#111330])
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7034/shard-iclb8/igt@[email protected]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/shard-iclb1/igt@[email protected]

* igt@gem_mocs_settings@mocs-rc6-bsd2:
- shard-iclb: [FAIL][61] ([fdo#111330]) -> [SKIP][62] ([fdo#109276])
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7034/shard-iclb2/igt@[email protected]
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/shard-iclb3/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#102250]: https://bugs.freedesktop.org/show_bug.cgi?id=102250
[fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#110378]: https://bugs.freedesktop.org/show_bug.cgi?id=110378
[fdo#110841]: https://bugs.freedesktop.org/show_bug.cgi?id=110841
[fdo#110854]: https://bugs.freedesktop.org/show_bug.cgi?id=110854
[fdo#111325]: https://bugs.freedesktop.org/show_bug.cgi?id=111325
[fdo#111329]: https://bugs.freedesktop.org/show_bug.cgi?id=111329
[fdo#111330]: https://bugs.freedesktop.org/show_bug.cgi?id=111330
[fdo#111747]: https://bugs.freedesktop.org/show_bug.cgi?id=111747
[fdo#111781]: https://bugs.freedesktop.org/show_bug.cgi?id=111781
[fdo#111832]: https://bugs.freedesktop.org/show_bug.cgi?id=111832
[fdo#111870]: https://bugs.freedesktop.org/show_bug.cgi?id=111870
[fdo#111925]: https://bugs.freedesktop.org/show_bug.cgi?id=111925
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912

Participating hosts (11 -> 7)
------------------------------

Missing (4): pig-skl-6260u shard-skl pig-hsw-4770r pig-glk-j5005

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

* CI: CI-20190529 -> None
* IGT: IGT_5218 -> IGTPW_3553
* Piglit: piglit_4509 -> None

CI-20190529: 20190529
CI_DRM_7034: ed62a5500342bb02d735d35d6a0fea5cf27a6e23 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_3553: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3553/index.html
IGT_5218: 869ed1ee0b71ce17f0a864512488f8b1a6cb8545 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

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

#3 lore raw
In reply to [email protected]
Quoted 25 lines · On Tue, Oct 08, 2019 at 09:07:50AM -0700, [email protected] wrote:

From: Don Hiatt <[email protected]>

Display the runtime pm status if we timeout waiting for status.

---
 lib/igt_pm.c | 16 ++++++++++++----
 lib/igt_pm.h |  2 +-
 2 files changed, 13 insertions(+), 5 deletions(-)
lib/igt_pm.c +2 -1
index 64ce240e093f..0d3561fdf821 100644
@@ -658,16 +658,17 @@ void igt_disable_runtime_pm(void)
 
 /**
  * igt_get_runtime_pm_status:
+ * @buf: buffer to place pm status string in
+ * @len: length of buf
  *
  * Returns: The current runtime PM status.
  */
-enum igt_runtime_pm_status igt_get_runtime_pm_status(void)

lib/igt_pm.c void igt_disable_runtime_pm(void) · line 673

Quoted 10 lines
lib/igt_pm.c +2 -2
+enum igt_runtime_pm_status igt_get_runtime_pm_status(char *buf, int len)
 {
 	ssize_t n_read;
-	char buf[32];
 
 	lseek(pm_status_fd, 0, SEEK_SET);
-	n_read = read(pm_status_fd, buf, ARRAY_SIZE(buf) - 1);
+	n_read = read(pm_status_fd, buf, len - 1);
 	igt_assert(n_read >= 0);
 	buf[n_read] = '\0';

Hey,

Adding extra logging here is a good idea, but I think we should improve on implementation.

Now we return pm status in two ways - as a string and as a enum value.

My suggestion is to add a helper that would map enum back to a string (some examples are in igt_kms.c, like mode_stereo_name()):

ret = igt_wait((status = igt_get_runtime_pm_status(buf, ARRAY_SIZE(buf))) == expected, 10000, 100); if (!ret)

	igt_warn("timeout: pm_status expected: %s, got: %s\n",
		 _pm_status_name(expected),
		 _pm_status_name(status));

This also improves the logging, as we know the expected state immediately.

You can try to tackle it in a different way, e.g.: by returning the status only as "char buf[static 32]" and doing the str->enum mapping in another helper, but that would be IMO too complicated...

lib/igt_pm.c enum igt_runtime_pm_status igt_get_runtime_pm_status(void) · line 706

Quoted 11 lines
lib/igt_pm.c +6 -1
@@ -697,7 +698,14 @@ enum igt_runtime_pm_status igt_get_runtime_pm_status(void)
  */
 bool igt_wait_for_pm_status(enum igt_runtime_pm_status status)
 {
-	return igt_wait(igt_get_runtime_pm_status() == status, 10000, 100);
+	bool ret;
+	char buf[32];
+
+	ret = igt_wait(igt_get_runtime_pm_status(buf, ARRAY_SIZE(buf)) == status, 10000, 100);
+	if (!ret)
+		igt_warn("timeout: pm_status=%s", buf);

missing \n

--
Cheers,
Arek
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev