Skip to contentSkip to conversation

drm/i915: Don't enable hwmon for selftests

PATCH New Ashutosh Dixit 2 participants 3 messages Apr 10, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: Don't enable hwmon for selftests

There are no hwmon selftests so there is no need to enable hwmon for selftests. So enable hwmon only for real driver load.

v2: Move the logic inside i915_hwmon.c
v3: Move is_i915_selftest definition to i915_selftest.h (Badal)
v4: s/is_i915_selftest/is_i915_selftest_module/

---
 drivers/gpu/drm/i915/i915_hwmon.c    | 3 ++-
 drivers/gpu/drm/i915/i915_selftest.h | 9 +++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_hwmon.c +2 -1
index 8c3f443c8347..86d7cd1ef45e 100644
@@ -10,6 +10,7 @@
 #include "i915_drv.h"
 #include "i915_hwmon.h"
 #include "i915_reg.h"
+#include "i915_selftest.h"
 #include "intel_mchbar_regs.h"
 #include "intel_pcode.h"
 #include "gt/intel_gt.h"
@@ -789,7 +790,7 @@ void i915_hwmon_register(struct drm_i915_private *i915)
 	int i;
 
 	/* hwmon is available only for dGfx */
-	if (!IS_DGFX(i915))
+	if (!IS_DGFX(i915) || is_i915_selftest_module())
 		return;
 
 	hwmon = devm_kzalloc(dev, sizeof(*hwmon), GFP_KERNEL);
drivers/gpu/drm/i915/i915_selftest.h +9 -0
index bdf3e22c0a34..bba3fafaac8d 100644
@@ -123,6 +123,15 @@ static inline int i915_perf_selftests(struct pci_dev *pdev) { return 0; }
 
 #endif
 
+static inline bool is_i915_selftest_module(void)
+{
+#if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
+	return i915_selftest.live || i915_selftest.perf || i915_selftest.mock;
+#else
+	return false;
+#endif
+}
+
 /* Using the i915_selftest_ prefix becomes a little unwieldy with the helpers.
  * Instead we use the igt_ shorthand, in reference to the intel-gpu-tools
  * suite of uabi test cases (which includes a test runner for our selftests).
Signature · 1 line
2.41.0
#1 lore raw

✗ Fi.CI.SPARSE: warning for drm/i915: Don't enable hwmon for selftests (rev4)

== Series Details ==

== Series Details ==

Series: drm/i915: Don't enable hwmon for selftests (rev4)
URL : https://patchwork.freedesktop.org/series/132243/
State : warning

== Summary ==

Error: dim sparse failed
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.

#2 lore raw

✗ Fi.CI.BAT: failure for drm/i915: Don't enable hwmon for selftests (rev4)

In reply to Ashutosh Dixit
== Series Details ==

== Series Details ==

Series: drm/i915: Don't enable hwmon for selftests (rev4)
URL : https://patchwork.freedesktop.org/series/132243/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14561 -> Patchwork_132243v4
====================================================

Summary
-------

**FAILURE**

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

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

Participating hosts (39 -> 38)
------------------------------

Additional (2): bat-jsl-1 bat-arls-3
Missing (3): bat-dg2-11 bat-atsm-1 fi-snb-2520m

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

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

### IGT changes ###

#### Possible regressions ####

* igt@i915_selftest@live@active:
- bat-jsl-1: NOTRUN -> [DMESG-FAIL][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v4/bat-jsl-1/igt@i915_selftest@[email protected]

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

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

### IGT changes ###

#### Issues hit ####

* igt@debugfs_test@basic-hwmon:
- bat-jsl-1: NOTRUN -> [SKIP][2] ([i915#9318])
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v4/bat-jsl-1/igt@[email protected]
- bat-arls-3: NOTRUN -> [SKIP][3] ([i915#9318])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v4/bat-arls-3/igt@[email protected]

* igt@gem_huc_copy@huc-copy:
- bat-jsl-1: NOTRUN -> [SKIP][4] ([i915#2190])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v4/bat-jsl-1/igt@[email protected]

* igt@gem_lmem_swapping@parallel-random-engines:
- bat-arls-3: NOTRUN -> [SKIP][5] ([i915#10213]) +3 other tests skip
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v4/bat-arls-3/igt@[email protected]

* igt@gem_lmem_swapping@verify-random:
- bat-jsl-1: NOTRUN -> [SKIP][6] ([i915#4613]) +3 other tests skip
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v4/bat-jsl-1/igt@[email protected]

* igt@gem_mmap@basic:
- bat-arls-3: NOTRUN -> [SKIP][7] ([i915#4083])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v4/bat-arls-3/igt@[email protected]

* igt@gem_render_tiled_blits@basic:
- bat-arls-3: NOTRUN -> [SKIP][8] ([i915#10197] / [i915#10211] / [i915#4079])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v4/bat-arls-3/igt@[email protected]

* igt@gem_tiled_blits@basic:
- bat-arls-3: NOTRUN -> [SKIP][9] ([i915#10196] / [i915#4077]) +2 other tests skip
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v4/bat-arls-3/igt@[email protected]

* igt@gem_tiled_pread_basic:
- bat-arls-3: NOTRUN -> [SKIP][10] ([i915#10206] / [i915#4079])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v4/bat-arls-3/igt@gem_tiled_pread_basic.html

* igt@i915_pm_rps@basic-api:
- bat-arls-3: NOTRUN -> [SKIP][11] ([i915#10209])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v4/bat-arls-3/igt@[email protected]

* igt@kms_addfb_basic@addfb25-x-tiled-legacy:
- bat-arls-3: NOTRUN -> [SKIP][12] ([i915#10200]) +9 other tests skip
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v4/bat-arls-3/igt@[email protected]

* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
- bat-arls-3: NOTRUN -> [SKIP][13] ([i915#10202]) +1 other test skip
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v4/bat-arls-3/igt@[email protected]

* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- bat-jsl-1: NOTRUN -> [SKIP][14] ([i915#4103]) +1 other test skip
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v4/bat-jsl-1/igt@[email protected]

* igt@kms_dsc@dsc-basic:
- bat-arls-3: NOTRUN -> [SKIP][15] ([i915#9886])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v4/bat-arls-3/igt@[email protected]
- bat-jsl-1: NOTRUN -> [SKIP][16] ([i915#3555] / [i915#9886])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v4/bat-jsl-1/igt@[email protected]

* igt@kms_force_connector_basic@force-load-detect:
- bat-arls-3: NOTRUN -> [SKIP][17] ([i915#10207])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v4/bat-arls-3/igt@[email protected]
- bat-jsl-1: NOTRUN -> [SKIP][18]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v4/bat-jsl-1/igt@[email protected]

* igt@kms_pm_backlight@basic-brightness:
- bat-arls-3: NOTRUN -> [SKIP][19] ([i915#9812])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v4/bat-arls-3/igt@[email protected]

* igt@kms_psr@psr-primary-mmap-gtt:
- bat-arls-3: NOTRUN -> [SKIP][20] ([i915#9732]) +3 other tests skip
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v4/bat-arls-3/igt@[email protected]

* igt@kms_setmode@basic-clone-single-crtc:
- bat-jsl-1: NOTRUN -> [SKIP][21] ([i915#3555])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v4/bat-jsl-1/igt@[email protected]
- bat-arls-3: NOTRUN -> [SKIP][22] ([i915#10208] / [i915#8809])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v4/bat-arls-3/igt@[email protected]

* igt@prime_vgem@basic-fence-mmap:
- bat-arls-3: NOTRUN -> [SKIP][23] ([i915#10196] / [i915#3708] / [i915#4077]) +1 other test skip
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v4/bat-arls-3/igt@[email protected]

* igt@prime_vgem@basic-fence-read:
- bat-arls-3: NOTRUN -> [SKIP][24] ([i915#10212] / [i915#3708])
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v4/bat-arls-3/igt@[email protected]

* igt@prime_vgem@basic-read:
- bat-arls-3: NOTRUN -> [SKIP][25] ([i915#10214] / [i915#3708])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v4/bat-arls-3/igt@[email protected]

* igt@prime_vgem@basic-write:
- bat-arls-3: NOTRUN -> [SKIP][26] ([i915#10216] / [i915#3708])
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v4/bat-arls-3/igt@[email protected]

#### Possible fixes ####

* igt@gem_lmem_swapping@basic@lmem0:
- bat-dg2-9: [FAIL][27] ([i915#10378]) -> [PASS][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14561/bat-dg2-9/igt@gem_lmem_swapping@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v4/bat-dg2-9/igt@gem_lmem_swapping@[email protected]

* igt@i915_selftest@live@gt_mocs:
- bat-dg2-8: [ABORT][29] ([i915#10366]) -> [PASS][30]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14561/bat-dg2-8/igt@i915_selftest@live@gt_mocs.html
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v4/bat-dg2-8/igt@i915_selftest@live@gt_mocs.html

* igt@kms_cursor_legacy@basic-flip-after-cursor-legacy:
- {bat-mtlp-9}: [DMESG-WARN][31] ([i915#10435] / [i915#9157]) -> [PASS][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14561/bat-mtlp-9/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v4/bat-mtlp-9/igt@[email protected]

* igt@kms_force_connector_basic@force-connector-state:
- {bat-mtlp-9}: [DMESG-WARN][33] ([i915#10435]) -> [PASS][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14561/bat-mtlp-9/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v4/bat-mtlp-9/igt@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[i915#10196]: https://gitlab.freedesktop.org/drm/intel/issues/10196
[i915#10197]: https://gitlab.freedesktop.org/drm/intel/issues/10197
[i915#10200]: https://gitlab.freedesktop.org/drm/intel/issues/10200
[i915#10202]: https://gitlab.freedesktop.org/drm/intel/issues/10202
[i915#10206]: https://gitlab.freedesktop.org/drm/intel/issues/10206
[i915#10207]: https://gitlab.freedesktop.org/drm/intel/issues/10207
[i915#10208]: https://gitlab.freedesktop.org/drm/intel/issues/10208
[i915#10209]: https://gitlab.freedesktop.org/drm/intel/issues/10209
[i915#10211]: https://gitlab.freedesktop.org/drm/intel/issues/10211
[i915#10212]: https://gitlab.freedesktop.org/drm/intel/issues/10212
[i915#10213]: https://gitlab.freedesktop.org/drm/intel/issues/10213
[i915#10214]: https://gitlab.freedesktop.org/drm/intel/issues/10214
[i915#10216]: https://gitlab.freedesktop.org/drm/intel/issues/10216
[i915#10366]: https://gitlab.freedesktop.org/drm/intel/issues/10366
[i915#10378]: https://gitlab.freedesktop.org/drm/intel/issues/10378
[i915#10435]: https://gitlab.freedesktop.org/drm/intel/issues/10435
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#8809]: https://gitlab.freedesktop.org/drm/intel/issues/8809
[i915#9157]: https://gitlab.freedesktop.org/drm/intel/issues/9157
[i915#9318]: https://gitlab.freedesktop.org/drm/intel/issues/9318
[i915#9732]: https://gitlab.freedesktop.org/drm/intel/issues/9732
[i915#9812]: https://gitlab.freedesktop.org/drm/intel/issues/9812
[i915#9886]: https://gitlab.freedesktop.org/drm/intel/issues/9886

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

* Linux: CI_DRM_14561 -> Patchwork_132243v4

CI-20190529: 20190529
CI_DRM_14561: 72c79c9b20ced92d5c10230bb50fca29c9f387f9 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7804: 7804
Patchwork_132243v4: 72c79c9b20ced92d5c10230bb50fca29c9f387f9 @ git://anongit.freedesktop.org/gfx-ci/linux

### Linux commits

d7ecc12558fe drm/i915: Don't enable hwmon for selftests

== Logs ==

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