drm/i915: Don't enable hwmon for selftests
Subsystems (2)
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)
--- drivers/gpu/drm/i915/i915_hwmon.c | 3 ++- drivers/gpu/drm/i915/i915_selftest.h | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_hwmon.c +2 -1
@@ -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 ())return ; hwmon =devm_kzalloc (dev,sizeof (*hwmon),GFP_KERNEL );
drivers/gpu/drm/i915/i915_selftest.h +10 -0
@@ -111,6 +111,11 @@ int __i915_subtests(const char *caller,#define I915_SELFTEST_ONLY (x) unlikely(x)#define I915_SELFTEST_EXPORT +static inline bool is_i915_selftest (void ) +{ +return i915_selftest.live || i915_selftest.perf || i915_selftest.mock; +} +#else /* !IS_ENABLED(CONFIG_DRM_I915_SELFTEST) */ static inline int i915_mock_selftests (void ) {return 0 ; }
@@ -121,6 +126,11 @@ static inline int i915_perf_selftests(struct pci_dev *pdev) { return 0; }#define I915_SELFTEST_ONLY (x) 0#define I915_SELFTEST_EXPORT static +static inline bool is_i915_selftest (void ) +{ +return false; +} +#endif /* Using the i915_selftest_ prefix becomes a little unwieldy with the helpers.
Signature · 1 line
2.41.0
Patchwork
CI✗ Fi.CI.SPARSE: warning for drm/i915: Don't enable hwmon for selftests (rev3)
== Series Details ==
== Series Details ==
Series: drm/i915: Don't enable hwmon for selftests (rev3)
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.
Quoted 51 lines · Ashutosh Dixit
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: Moveis_i915_selftestdefinition toi915_selftest.h(Badal)Signed-off-by Ashutosh Dixit <[email protected]>--- drivers/gpu/drm/i915/i915_hwmon.c | 3 ++- drivers/gpu/drm/i915/i915_selftest.h | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/i915_hwmon.c +2
-1@@ -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 ())return ; hwmon =devm_kzalloc (dev,sizeof (*hwmon),GFP_KERNEL );drivers/gpu/drm/i915/i915_selftest.h +5
-0@@ -111,6 +111,11 @@ int __i915_subtests(const char *caller,#define I915_SELFTEST_ONLY (x) unlikely(x)#define I915_SELFTEST_EXPORT +static inline bool is_i915_selftest (void ) +{ +return i915_selftest.live || i915_selftest.perf || i915_selftest.mock; +} +#else /* !IS_ENABLED(CONFIG_DRM_I915_SELFTEST) */ static inline int i915_mock_selftests (void ) {return 0 ; }
drivers/gpu/drm/i915/i915_selftest.h static inline int i915_perf_selftests(struct pci_dev *pdev) { return 0; } · line 133
Quoted 8 lines
drivers/gpu/drm/i915/i915_selftest.h +5
-0@@ -121,6 +126,11 @@ static inline int i915_perf_selftests(struct pci_dev *pdev) { return 0; }#define I915_SELFTEST_ONLY (x) 0#define I915_SELFTEST_EXPORT static +static inline bool is_i915_selftest (void ) +{ +return false; +} +
Looks good to me.
Quoted 3 lines
drivers/gpu/drm/i915/i915_selftest.h +0
-0#endif /* Using the i915_selftest_ prefix becomes a little unwieldy with the helpers.
Patchwork
CI✗ Fi.CI.BAT: failure for drm/i915: Don't enable hwmon for selftests (rev3)
In reply to Ashutosh Dixit== Series Details ==
== Series Details ==
Series: drm/i915: Don't enable hwmon for selftests (rev3)
URL : https://patchwork.freedesktop.org/series/132243/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_14552 -> Patchwork_132243v3
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_132243v3 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_132243v3, 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_132243v3/index.html
Participating hosts (37 -> 35)
------------------------------
Additional (3): bat-kbl-2 fi-rkl-11600 fi-cfl-8109u
Missing (5): bat-dg1-7 fi-bsw-n3050 fi-glk-j4005 fi-kbl-8809g bat-dg2-11
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_132243v3:
### IGT changes ###
#### Possible regressions ####
* igt@gem_exec_gttfill@basic:
- bat-arls-2: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14552/bat-arls-2/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v3/bat-arls-2/igt@[email protected]
* igt@gem_exec_parallel@engines@fds:
- bat-mtlp-8: [PASS][3] -> [INCOMPLETE][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14552/bat-mtlp-8/igt@gem_exec_parallel@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v3/bat-mtlp-8/igt@gem_exec_parallel@[email protected]
Known issues
------------
Here are the changes found in Patchwork_132243v3 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@debugfs_test@basic-hwmon:
- fi-rkl-11600: NOTRUN -> [SKIP][5] ([i915#9318])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v3/fi-rkl-11600/igt@[email protected]
* igt@fbdev@info:
- bat-kbl-2: NOTRUN -> [SKIP][6] ([i915#1849])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v3/bat-kbl-2/igt@[email protected]
* igt@gem_huc_copy@huc-copy:
- fi-cfl-8109u: NOTRUN -> [SKIP][7] ([i915#2190])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v3/fi-cfl-8109u/igt@[email protected]
- fi-rkl-11600: NOTRUN -> [SKIP][8] ([i915#2190])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v3/fi-rkl-11600/igt@[email protected]
* igt@gem_lmem_swapping@parallel-random-engines:
- bat-kbl-2: NOTRUN -> [SKIP][9] +39 other tests skip
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v3/bat-kbl-2/igt@[email protected]
- fi-rkl-11600: NOTRUN -> [SKIP][10] ([i915#4613]) +3 other tests skip
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v3/fi-rkl-11600/igt@[email protected]
* igt@gem_lmem_swapping@verify-random:
- fi-cfl-8109u: NOTRUN -> [SKIP][11] ([i915#4613]) +3 other tests skip
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v3/fi-cfl-8109u/igt@[email protected]
* igt@gem_tiled_pread_basic:
- fi-rkl-11600: NOTRUN -> [SKIP][12] ([i915#3282])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v3/fi-rkl-11600/igt@gem_tiled_pread_basic.html
* igt@i915_selftest@live@hangcheck:
- bat-adln-1: [PASS][13] -> [ABORT][14] ([i915#10021])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14552/bat-adln-1/igt@i915_selftest@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v3/bat-adln-1/igt@i915_selftest@[email protected]
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- fi-rkl-11600: NOTRUN -> [SKIP][15] ([i915#4103]) +1 other test skip
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v3/fi-rkl-11600/igt@[email protected]
* igt@kms_dsc@dsc-basic:
- fi-rkl-11600: NOTRUN -> [SKIP][16] ([i915#3555] / [i915#3840])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v3/fi-rkl-11600/igt@[email protected]
* igt@kms_force_connector_basic@force-load-detect:
- fi-rkl-11600: NOTRUN -> [SKIP][17]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v3/fi-rkl-11600/igt@[email protected]
* igt@kms_pm_backlight@basic-brightness:
- fi-rkl-11600: NOTRUN -> [SKIP][18] ([i915#5354])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v3/fi-rkl-11600/igt@[email protected]
- fi-cfl-8109u: NOTRUN -> [SKIP][19] +11 other tests skip
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v3/fi-cfl-8109u/igt@[email protected]
* igt@kms_psr@psr-sprite-plane-onoff:
- fi-rkl-11600: NOTRUN -> [SKIP][20] ([i915#1072] / [i915#9732]) +3 other tests skip
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v3/fi-rkl-11600/igt@[email protected]
* igt@kms_setmode@basic-clone-single-crtc:
- fi-rkl-11600: NOTRUN -> [SKIP][21] ([i915#3555])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v3/fi-rkl-11600/igt@[email protected]
* igt@prime_vgem@basic-read:
- fi-rkl-11600: NOTRUN -> [SKIP][22] ([i915#3291] / [i915#3708]) +2 other tests skip
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v3/fi-rkl-11600/igt@[email protected]
#### Possible fixes ####
* igt@gem_lmem_swapping@basic@lmem0:
- bat-dg2-9: [FAIL][23] ([i915#10378]) -> [PASS][24]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14552/bat-dg2-9/igt@gem_lmem_swapping@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v3/bat-dg2-9/igt@gem_lmem_swapping@[email protected]
* igt@i915_selftest@live@gt_contexts:
- bat-dg2-8: [ABORT][25] ([i915#10366]) -> [PASS][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14552/bat-dg2-8/igt@i915_selftest@live@gt_contexts.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v3/bat-dg2-8/igt@i915_selftest@live@gt_contexts.html
[i915#10021]: https://gitlab.freedesktop.org/drm/intel/issues/10021
[i915#10366]: https://gitlab.freedesktop.org/drm/intel/issues/10366
[i915#10378]: https://gitlab.freedesktop.org/drm/intel/issues/10378
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#3840]: https://gitlab.freedesktop.org/drm/intel/issues/3840
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
[i915#9318]: https://gitlab.freedesktop.org/drm/intel/issues/9318
[i915#9732]: https://gitlab.freedesktop.org/drm/intel/issues/9732
Build changes
-------------
* Linux: CI_DRM_14552 -> Patchwork_132243v3
CI-20190529: 20190529
CI_DRM_14552: 057ec21a54cddd595a7725fa8731eb4c5bd5abff @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7803: 9669a17ae56f1dcd22ba4c5cb39b3cd334a46862 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_132243v3: 057ec21a54cddd595a7725fa8731eb4c5bd5abff @ git://anongit.freedesktop.org/gfx-ci/linux
### Linux commits
2ad2f0d902a8 drm/i915: Don't enable hwmon for selftests
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132243v3/index.html
Hi Ashutosh,
please use "git format-patch -v 3 ..." which generates subject [PATCH v3] ...". Otherwise it gets confusing to see the patch that needs to be reviewed.
Quoted 26 lines · Ashutosh Dixit
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: Moveis_i915_selftestdefinition toi915_selftest.h(Badal)Signed-off-by Ashutosh Dixit <[email protected]>--- drivers/gpu/drm/i915/i915_hwmon.c | 3 ++- drivers/gpu/drm/i915/i915_selftest.h | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/i915_hwmon.c +1
-0@@ -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"
drivers/gpu/drm/i915/i915_hwmon.c void i915_hwmon_register(struct drm_i915_private *i915) · line 794
Quoted 6 lines
drivers/gpu/drm/i915/i915_hwmon.c +1
-1@@ -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 ())return ;
I wonder if this is the right place to put it or rather place it in i915_driver.c and avoid calling i915_hwmon_register() at all.
In any case, it's good:
Thanks,
Andi
Quoted 1 line · Andi Shyti
Hi Andi,
Quoted 3 lines
please use "git format-patch -v 3 ..." which generates subject [PATCH v3] ...". Otherwise it gets confusing to see the patch that needs to be reviewed.
Sure, sorry!
Quoted 30 lines · Ashutosh Dixit
Quoted 28 lines
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: Moveis_i915_selftestdefinition toi915_selftest.h(Badal)Signed-off-by Ashutosh Dixit <[email protected]>--- drivers/gpu/drm/i915/i915_hwmon.c | 3 ++- drivers/gpu/drm/i915/i915_selftest.h | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/i915_hwmon.c +1
-0@@ -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;
Quoted 7 lines
drivers/gpu/drm/i915/i915_hwmon.c void i915_hwmon_register(struct drm_i915_private *i915) · line 794
Quoted 4 lines
drivers/gpu/drm/i915/i915_hwmon.c +1
-1/* hwmon is available only for dGfx */ -if (!IS_DGFX (i915)) +if (!IS_DGFX (i915) ||is_i915_selftest ())return ;I wonder if this is the right place to put it or rather place it in
i915_driver.cand avoid callingi915_hwmon_register()at all.
I thought it was better put it here rather than clutter up common code in i915_driver.c.
Quoted 4 lines
In any case, it's good:
Reviewed-by Andi Shyti <[email protected]>
Thanks.
--
Ashutosh