Skip to contentSkip to conversation

drm/i915/selftests: Implement frequency logging for energy reading validation

PATCH Superseded [email protected] 2 participants 2 messages Sep 27, 2024

Subsystems (2)

v4 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 drm/i915/selftests: Implement frequency logging for energy reading validation

From: Sk Anirban <[email protected]>

Introduce RC6 & RC0 frequency logging mechanism aimed at ensuring the accuracy of energy readings in case of GPU energy leak.

v2:
- Improved commit message.
v3:
- Used pr_err log to display frequency. (Anshuman)
- Sorted headers alphabetically. (Sai Teja)
v4:
- Improved commit message.
- Fix pr_err log. (Sai Teja)

---
 drivers/gpu/drm/i915/gt/selftest_rc6.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/gt/selftest_rc6.c +7 -1
index 1aa1446c8fb0..cf7d38d10dc2 100644
@@ -8,6 +8,7 @@
 #include "intel_gpu_commands.h"
 #include "intel_gt_requests.h"
 #include "intel_ring.h"
+#include "intel_rps.h"
 #include "selftest_rc6.h"
 
 #include "selftests/i915_random.h"
@@ -38,6 +39,8 @@ int live_rc6_manual(void *arg)
 	ktime_t dt;
 	u64 res[2];
 	int err = 0;
+	u32 rc0_freq, rc6_freq;
+	struct intel_rps *rps = &gt->rps;
 
 	/*
 	 * Our claim is that we can "encourage" the GPU to enter rc6 at will.
@@ -66,6 +69,7 @@ int live_rc6_manual(void *arg)
 	rc0_power = librapl_energy_uJ() - rc0_power;
 	dt = ktime_sub(ktime_get(), dt);
 	res[1] = rc6_residency(rc6);
+	rc0_freq = intel_rps_read_actual_frequency(rps);
 	if ((res[1] - res[0]) >> 10) {
 		pr_err("RC6 residency increased by %lldus while disabled for 1000ms!\n",
 		       (res[1] - res[0]) >> 10);
@@ -91,6 +95,7 @@ int live_rc6_manual(void *arg)
 	dt = ktime_get();
 	rc6_power = librapl_energy_uJ();
 	msleep(100);
+	rc6_freq = intel_rps_read_actual_frequency(rps);
 	rc6_power = librapl_energy_uJ() - rc6_power;
 	dt = ktime_sub(ktime_get(), dt);
 	res[1] = rc6_residency(rc6);
@@ -108,7 +113,8 @@ int live_rc6_manual(void *arg)
 		pr_info("GPU consumed %llduW in RC0 and %llduW in RC6\n",
 			rc0_power, rc6_power);
 		if (2 * rc6_power > rc0_power) {
-			pr_err("GPU leaked energy while in RC6!\n");
+			pr_err("GPU leaked energy while in RC6! GPU Freq: %u in RC6 and %u in RC0\n",
+			       rc6_freq, rc0_freq);
 			err = -EINVAL;
 			goto out_unlock;
 		}
Signature · 1 line
2.34.1
#1 lore raw

✗ Fi.CI.BAT: failure for drm/i915/selftests: Implement frequency logging for energy reading validation

== Series Details ==

== Series Details ==

Series: drm/i915/selftests: Implement frequency logging for energy reading validation
URL : https://patchwork.freedesktop.org/series/139235/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_15453 -> Patchwork_139235v1
====================================================

Summary
-------

**FAILURE**

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

If you think the reported changes have nothing to do with the changes
introduced in Patchwork_139235v1, please notify your bug team ([email protected]) 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_139235v1/index.html

Participating hosts (37 -> 36)
------------------------------

Missing (1): fi-snb-2520m

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

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

### IGT changes ###

#### Possible regressions ####

* igt@i915_selftest@live@workarounds:
- bat-dg2-11: [PASS][1] -> [DMESG-FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_15453/bat-dg2-11/igt@i915_selftest@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_139235v1/bat-dg2-11/igt@i915_selftest@[email protected]

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

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

### IGT changes ###

#### Issues hit ####

* igt@i915_selftest@live:
- bat-mtlp-8: [PASS][3] -> [ABORT][4] ([i915#12216]) +1 other test abort
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_15453/bat-mtlp-8/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_139235v1/bat-mtlp-8/igt@[email protected]
- bat-dg2-11: [PASS][5] -> [DMESG-FAIL][6] ([i915#12133])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_15453/bat-dg2-11/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_139235v1/bat-dg2-11/igt@[email protected]

* igt@i915_selftest@live@hangcheck:
- bat-arls-2: NOTRUN -> [DMESG-WARN][7] ([i915#11349])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_139235v1/bat-arls-2/igt@i915_selftest@[email protected]

#### Possible fixes ####

* igt@i915_selftest@live:
- bat-arls-1: [DMESG-WARN][8] ([i915#10341] / [i915#12133]) -> [PASS][9]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_15453/bat-arls-1/igt@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_139235v1/bat-arls-1/igt@[email protected]
- bat-mtlp-6: [DMESG-WARN][10] ([i915#10341]) -> [PASS][11]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_15453/bat-mtlp-6/igt@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_139235v1/bat-mtlp-6/igt@[email protected]

* igt@i915_selftest@live@hangcheck:
- bat-arls-1: [DMESG-WARN][12] ([i915#11349]) -> [PASS][13]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_15453/bat-arls-1/igt@i915_selftest@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_139235v1/bat-arls-1/igt@i915_selftest@[email protected]
- bat-mtlp-6: [DMESG-WARN][14] ([i915#11349]) -> [PASS][15]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_15453/bat-mtlp-6/igt@i915_selftest@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_139235v1/bat-mtlp-6/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@workarounds:
- bat-arls-2: [ABORT][16] ([i915#12061]) -> [PASS][17]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_15453/bat-arls-2/igt@i915_selftest@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_139235v1/bat-arls-2/igt@i915_selftest@[email protected]

#### Warnings ####

* igt@i915_module_load@reload:
- bat-arls-5: [DMESG-WARN][18] ([i915#11637]) -> [DMESG-WARN][19] ([i915#11637] / [i915#1982])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_15453/bat-arls-5/igt@[email protected]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_139235v1/bat-arls-5/igt@[email protected]

* igt@i915_selftest@live:
- bat-arls-2: [ABORT][20] ([i915#12061] / [i915#12133]) -> [DMESG-WARN][21] ([i915#10341] / [i915#12133])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_15453/bat-arls-2/igt@[email protected]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_139235v1/bat-arls-2/igt@[email protected]

[i915#10341]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10341
[i915#11349]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11349
[i915#11637]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11637
[i915#12061]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12061
[i915#12133]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12133
[i915#12216]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12216
[i915#1982]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/1982

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

* Linux: CI_DRM_15453 -> Patchwork_139235v1

CI-20190529: 20190529
CI_DRM_15453: 1522f131505272ed86f58e937f2481e4e3e144c1 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_8036: 5aa244179b574e949a07ab1c7494033081735718 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_139235v1: 1522f131505272ed86f58e937f2481e4e3e144c1 @ git://anongit.freedesktop.org/gfx-ci/linux

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_139235v1/index.html