* [Intel-gfx] [PATCH] drm/i915/hwmon: Use 0 to designate disabled PL1 power limit
@ 2023-03-28 23:35 Ashutosh Dixit
2023-03-29 0:22 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Ashutosh Dixit @ 2023-03-28 23:35 UTC (permalink / raw)
To: intel-gfx; +Cc: dri-devel, Rodrigo Vivi
On ATSM the PL1 limit is disabled at power up. The previous uapi assumed
that the PL1 limit is always enabled and therefore did not have a notion of
a disabled PL1 limit. This results in erroneous PL1 limit values when the
PL1 limit is disabled. For example at power up, the disabled ATSM PL1 limit
was previously shown as 0 which means a low PL1 limit whereas the limit
being disabled actually implies a high effective PL1 limit value.
To get round this problem, the PL1 limit uapi is expanded to include a
special value 0 to designate a disabled PL1 limit.
Bug: https://gitlab.freedesktop.org/drm/intel/-/issues/8062
Bug: https://gitlab.freedesktop.org/drm/intel/-/issues/8060
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
.../ABI/testing/sysfs-driver-intel-i915-hwmon | 3 ++-
drivers/gpu/drm/i915/i915_hwmon.c | 24 +++++++++++++++++++
2 files changed, 26 insertions(+), 1 deletion(-)
diff --git a/Documentation/ABI/testing/sysfs-driver-intel-i915-hwmon b/Documentation/ABI/testing/sysfs-driver-intel-i915-hwmon
index 2d6a472eef885..96fec0bb74c2c 100644
--- a/Documentation/ABI/testing/sysfs-driver-intel-i915-hwmon
+++ b/Documentation/ABI/testing/sysfs-driver-intel-i915-hwmon
@@ -14,7 +14,8 @@ Description: RW. Card reactive sustained (PL1/Tau) power limit in microwatts.
The power controller will throttle the operating frequency
if the power averaged over a window (typically seconds)
- exceeds this limit.
+ exceeds this limit. A read value of 0 means that the PL1 power
+ limit is disabled. Writing 0 disables the limit if possible.
Only supported for particular Intel i915 graphics platforms.
diff --git a/drivers/gpu/drm/i915/i915_hwmon.c b/drivers/gpu/drm/i915/i915_hwmon.c
index 596dd2c070106..c099057888914 100644
--- a/drivers/gpu/drm/i915/i915_hwmon.c
+++ b/drivers/gpu/drm/i915/i915_hwmon.c
@@ -349,6 +349,8 @@ hwm_power_is_visible(const struct hwm_drvdata *ddat, u32 attr, int chan)
}
}
+#define PL1_DISABLE 0
+
/*
* HW allows arbitrary PL1 limits to be set but silently clamps these values to
* "typical but not guaranteed" min/max values in rg.pkg_power_sku. Follow the
@@ -362,6 +364,14 @@ hwm_power_max_read(struct hwm_drvdata *ddat, long *val)
intel_wakeref_t wakeref;
u64 r, min, max;
+ /* Check if PL1 limit is disabled */
+ with_intel_runtime_pm(ddat->uncore->rpm, wakeref)
+ r = intel_uncore_read(ddat->uncore, hwmon->rg.pkg_rapl_limit);
+ if (!(r & PKG_PWR_LIM_1_EN)) {
+ *val = PL1_DISABLE;
+ return 0;
+ }
+
*val = hwm_field_read_and_scale(ddat,
hwmon->rg.pkg_rapl_limit,
PKG_PWR_LIM_1,
@@ -385,8 +395,22 @@ static int
hwm_power_max_write(struct hwm_drvdata *ddat, long val)
{
struct i915_hwmon *hwmon = ddat->hwmon;
+ intel_wakeref_t wakeref;
u32 nval;
+ if (val == PL1_DISABLE) {
+ /* Disable PL1 limit */
+ hwm_locked_with_pm_intel_uncore_rmw(ddat, hwmon->rg.pkg_rapl_limit,
+ PKG_PWR_LIM_1_EN, 0);
+
+ /* Verify, because PL1 limit cannot be disabled on all platforms */
+ with_intel_runtime_pm(ddat->uncore->rpm, wakeref)
+ nval = intel_uncore_read(ddat->uncore, hwmon->rg.pkg_rapl_limit);
+ if (nval & PKG_PWR_LIM_1_EN)
+ return -EPERM;
+ return 0;
+ }
+
/* Computation in 64-bits to avoid overflow. Round to nearest. */
nval = DIV_ROUND_CLOSEST_ULL((u64)val << hwmon->scl_shift_power, SF_POWER);
nval = PKG_PWR_LIM_1_EN | REG_FIELD_PREP(PKG_PWR_LIM_1, nval);
--
2.38.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/hwmon: Use 0 to designate disabled PL1 power limit
2023-03-28 23:35 [Intel-gfx] [PATCH] drm/i915/hwmon: Use 0 to designate disabled PL1 power limit Ashutosh Dixit
@ 2023-03-29 0:22 ` Patchwork
2023-03-29 0:36 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2023-03-29 0:22 UTC (permalink / raw)
To: Ashutosh Dixit; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/hwmon: Use 0 to designate disabled PL1 power limit
URL : https://patchwork.freedesktop.org/series/115749/
State : warning
== Summary ==
Error: dim checkpatch failed
53e9cd9d9794 drm/i915/hwmon: Use 0 to designate disabled PL1 power limit
-:16: WARNING:COMMIT_LOG_USE_LINK: Unknown link reference 'Bug:', use 'Link:' instead
#16:
Bug: https://gitlab.freedesktop.org/drm/intel/-/issues/8062
-:17: WARNING:COMMIT_LOG_USE_LINK: Unknown link reference 'Bug:', use 'Link:' instead
#17:
Bug: https://gitlab.freedesktop.org/drm/intel/-/issues/8060
total: 0 errors, 2 warnings, 0 checks, 53 lines checked
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/hwmon: Use 0 to designate disabled PL1 power limit
2023-03-28 23:35 [Intel-gfx] [PATCH] drm/i915/hwmon: Use 0 to designate disabled PL1 power limit Ashutosh Dixit
2023-03-29 0:22 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
@ 2023-03-29 0:36 ` Patchwork
2023-03-29 13:46 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2023-03-30 5:50 ` [Intel-gfx] [PATCH] " Dixit, Ashutosh
3 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2023-03-29 0:36 UTC (permalink / raw)
To: Ashutosh Dixit; +Cc: intel-gfx
[-- Attachment #1: Type: text/plain, Size: 5853 bytes --]
== Series Details ==
Series: drm/i915/hwmon: Use 0 to designate disabled PL1 power limit
URL : https://patchwork.freedesktop.org/series/115749/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_12931 -> Patchwork_115749v1
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115749v1/index.html
Participating hosts (36 -> 37)
------------------------------
Additional (1): fi-kbl-soraka
Known issues
------------
Here are the changes found in Patchwork_115749v1 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_suspend@basic-s0@smem:
- bat-rpls-2: [PASS][1] -> [ABORT][2] ([i915#6687])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12931/bat-rpls-2/igt@gem_exec_suspend@basic-s0@smem.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115749v1/bat-rpls-2/igt@gem_exec_suspend@basic-s0@smem.html
* igt@gem_exec_suspend@basic-s3@smem:
- bat-rpls-1: [PASS][3] -> [ABORT][4] ([i915#6687] / [i915#7978])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12931/bat-rpls-1/igt@gem_exec_suspend@basic-s3@smem.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115749v1/bat-rpls-1/igt@gem_exec_suspend@basic-s3@smem.html
* igt@gem_huc_copy@huc-copy:
- fi-kbl-soraka: NOTRUN -> [SKIP][5] ([fdo#109271] / [i915#2190])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115749v1/fi-kbl-soraka/igt@gem_huc_copy@huc-copy.html
* igt@gem_lmem_swapping@basic:
- fi-skl-guc: NOTRUN -> [SKIP][6] ([fdo#109271] / [i915#4613]) +3 similar issues
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115749v1/fi-skl-guc/igt@gem_lmem_swapping@basic.html
- fi-kbl-soraka: NOTRUN -> [SKIP][7] ([fdo#109271] / [i915#4613]) +3 similar issues
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115749v1/fi-kbl-soraka/igt@gem_lmem_swapping@basic.html
* igt@i915_selftest@live@gt_lrc:
- bat-dg2-11: [PASS][8] -> [INCOMPLETE][9] ([i915#7609] / [i915#7913])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12931/bat-dg2-11/igt@i915_selftest@live@gt_lrc.html
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115749v1/bat-dg2-11/igt@i915_selftest@live@gt_lrc.html
* igt@i915_selftest@live@gt_pm:
- fi-kbl-soraka: NOTRUN -> [DMESG-FAIL][10] ([i915#1886])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115749v1/fi-kbl-soraka/igt@i915_selftest@live@gt_pm.html
* igt@i915_selftest@live@mman:
- bat-rpls-1: [PASS][11] -> [TIMEOUT][12] ([i915#6794])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12931/bat-rpls-1/igt@i915_selftest@live@mman.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115749v1/bat-rpls-1/igt@i915_selftest@live@mman.html
* igt@kms_chamelium_frames@hdmi-crc-fast:
- fi-kbl-soraka: NOTRUN -> [SKIP][13] ([fdo#109271]) +16 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115749v1/fi-kbl-soraka/igt@kms_chamelium_frames@hdmi-crc-fast.html
* igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence:
- bat-dg2-11: NOTRUN -> [SKIP][14] ([i915#5354])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115749v1/bat-dg2-11/igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence.html
* igt@kms_setmode@basic-clone-single-crtc:
- fi-skl-guc: NOTRUN -> [SKIP][15] ([fdo#109271]) +19 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115749v1/fi-skl-guc/igt@kms_setmode@basic-clone-single-crtc.html
#### Possible fixes ####
* igt@i915_module_load@load:
- fi-skl-guc: [ABORT][16] -> [PASS][17]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12931/fi-skl-guc/igt@i915_module_load@load.html
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115749v1/fi-skl-guc/igt@i915_module_load@load.html
#### Warnings ####
* igt@i915_selftest@live@slpc:
- bat-rpls-2: [DMESG-FAIL][18] ([i915#6367] / [i915#7913]) -> [DMESG-FAIL][19] ([i915#6997] / [i915#7913])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12931/bat-rpls-2/igt@i915_selftest@live@slpc.html
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115749v1/bat-rpls-2/igt@i915_selftest@live@slpc.html
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[i915#1886]: https://gitlab.freedesktop.org/drm/intel/issues/1886
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
[i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
[i915#6687]: https://gitlab.freedesktop.org/drm/intel/issues/6687
[i915#6794]: https://gitlab.freedesktop.org/drm/intel/issues/6794
[i915#6997]: https://gitlab.freedesktop.org/drm/intel/issues/6997
[i915#7609]: https://gitlab.freedesktop.org/drm/intel/issues/7609
[i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913
[i915#7978]: https://gitlab.freedesktop.org/drm/intel/issues/7978
Build changes
-------------
* Linux: CI_DRM_12931 -> Patchwork_115749v1
CI-20190529: 20190529
CI_DRM_12931: e1b8055e62c6f94ef94db3e7f125704ac0fab0b5 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7223: 2cbfa210fc95d126edf9a60ae6ab4e96cf4fca7f @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_115749v1: e1b8055e62c6f94ef94db3e7f125704ac0fab0b5 @ git://anongit.freedesktop.org/gfx-ci/linux
### Linux commits
63469035e427 drm/i915/hwmon: Use 0 to designate disabled PL1 power limit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115749v1/index.html
[-- Attachment #2: Type: text/html, Size: 7284 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/hwmon: Use 0 to designate disabled PL1 power limit
2023-03-28 23:35 [Intel-gfx] [PATCH] drm/i915/hwmon: Use 0 to designate disabled PL1 power limit Ashutosh Dixit
2023-03-29 0:22 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2023-03-29 0:36 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
@ 2023-03-29 13:46 ` Patchwork
2023-03-30 5:50 ` [Intel-gfx] [PATCH] " Dixit, Ashutosh
3 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2023-03-29 13:46 UTC (permalink / raw)
To: Ashutosh Dixit; +Cc: intel-gfx
[-- Attachment #1: Type: text/plain, Size: 11340 bytes --]
== Series Details ==
Series: drm/i915/hwmon: Use 0 to designate disabled PL1 power limit
URL : https://patchwork.freedesktop.org/series/115749/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_12931_full -> Patchwork_115749v1_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Participating hosts (7 -> 7)
------------------------------
No changes in participating hosts
Known issues
------------
Here are the changes found in Patchwork_115749v1_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_fair@basic-deadline:
- shard-glk: [PASS][1] -> [FAIL][2] ([i915#2846])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12931/shard-glk2/igt@gem_exec_fair@basic-deadline.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115749v1/shard-glk9/igt@gem_exec_fair@basic-deadline.html
* igt@gem_exec_fair@basic-none-solo@rcs0:
- shard-apl: [PASS][3] -> [FAIL][4] ([i915#2842]) +1 similar issue
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12931/shard-apl6/igt@gem_exec_fair@basic-none-solo@rcs0.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115749v1/shard-apl4/igt@gem_exec_fair@basic-none-solo@rcs0.html
* igt@gem_exec_fair@basic-pace-share@rcs0:
- shard-glk: [PASS][5] -> [FAIL][6] ([i915#2842])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12931/shard-glk9/igt@gem_exec_fair@basic-pace-share@rcs0.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115749v1/shard-glk2/igt@gem_exec_fair@basic-pace-share@rcs0.html
* igt@gem_lmem_swapping@parallel-random-engines:
- shard-glk: NOTRUN -> [SKIP][7] ([fdo#109271] / [i915#4613])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115749v1/shard-glk7/igt@gem_lmem_swapping@parallel-random-engines.html
* igt@gen9_exec_parse@allowed-all:
- shard-glk: [PASS][8] -> [ABORT][9] ([i915#5566]) +1 similar issue
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12931/shard-glk7/igt@gen9_exec_parse@allowed-all.html
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115749v1/shard-glk5/igt@gen9_exec_parse@allowed-all.html
* igt@kms_ccs@pipe-b-bad-rotation-90-y_tiled_gen12_rc_ccs_cc:
- shard-glk: NOTRUN -> [SKIP][10] ([fdo#109271] / [i915#3886])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115749v1/shard-glk7/igt@kms_ccs@pipe-b-bad-rotation-90-y_tiled_gen12_rc_ccs_cc.html
* igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@ab-hdmi-a1-hdmi-a2:
- shard-glk: [PASS][11] -> [FAIL][12] ([i915#79])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12931/shard-glk1/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@ab-hdmi-a1-hdmi-a2.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115749v1/shard-glk8/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@ab-hdmi-a1-hdmi-a2.html
* igt@kms_flip_scaled_crc@flip-64bpp-yftile-to-16bpp-yftile-upscaling@pipe-a-valid-mode:
- shard-glk: NOTRUN -> [SKIP][13] ([fdo#109271]) +52 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115749v1/shard-glk7/igt@kms_flip_scaled_crc@flip-64bpp-yftile-to-16bpp-yftile-upscaling@pipe-a-valid-mode.html
* igt@kms_psr2_su@frontbuffer-xrgb8888:
- shard-glk: NOTRUN -> [SKIP][14] ([fdo#109271] / [i915#658])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115749v1/shard-glk7/igt@kms_psr2_su@frontbuffer-xrgb8888.html
#### Possible fixes ####
* igt@gem_exec_endless@dispatch@vcs1:
- {shard-tglu}: [TIMEOUT][15] ([i915#3778]) -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12931/shard-tglu-9/igt@gem_exec_endless@dispatch@vcs1.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115749v1/shard-tglu-10/igt@gem_exec_endless@dispatch@vcs1.html
* igt@kms_addfb_basic@size-max:
- {shard-dg1}: [DMESG-WARN][17] -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12931/shard-dg1-17/igt@kms_addfb_basic@size-max.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115749v1/shard-dg1-14/igt@kms_addfb_basic@size-max.html
* igt@kms_flip@2x-plain-flip-fb-recreate-interruptible@ac-hdmi-a1-hdmi-a2:
- shard-glk: [FAIL][19] ([i915#2122]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12931/shard-glk3/igt@kms_flip@2x-plain-flip-fb-recreate-interruptible@ac-hdmi-a1-hdmi-a2.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115749v1/shard-glk6/igt@kms_flip@2x-plain-flip-fb-recreate-interruptible@ac-hdmi-a1-hdmi-a2.html
* {igt@perf@stress-open-close@0-rcs0}:
- shard-glk: [ABORT][21] ([i915#5213]) -> [PASS][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12931/shard-glk3/igt@perf@stress-open-close@0-rcs0.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115749v1/shard-glk7/igt@perf@stress-open-close@0-rcs0.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[IGT#2]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/2
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109307]: https://bugs.freedesktop.org/show_bug.cgi?id=109307
[fdo#109309]: https://bugs.freedesktop.org/show_bug.cgi?id=109309
[fdo#109506]: https://bugs.freedesktop.org/show_bug.cgi?id=109506
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615
[fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1755]: https://gitlab.freedesktop.org/drm/intel/issues/1755
[i915#1839]: https://gitlab.freedesktop.org/drm/intel/issues/1839
[i915#2122]: https://gitlab.freedesktop.org/drm/intel/issues/2122
[i915#2434]: https://gitlab.freedesktop.org/drm/intel/issues/2434
[i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
[i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
[i915#2587]: https://gitlab.freedesktop.org/drm/intel/issues/2587
[i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
[i915#280]: https://gitlab.freedesktop.org/drm/intel/issues/280
[i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
[i915#2846]: https://gitlab.freedesktop.org/drm/intel/issues/2846
[i915#3281]: https://gitlab.freedesktop.org/drm/intel/issues/3281
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3297]: https://gitlab.freedesktop.org/drm/intel/issues/3297
[i915#3318]: https://gitlab.freedesktop.org/drm/intel/issues/3318
[i915#3359]: https://gitlab.freedesktop.org/drm/intel/issues/3359
[i915#3458]: https://gitlab.freedesktop.org/drm/intel/issues/3458
[i915#3528]: https://gitlab.freedesktop.org/drm/intel/issues/3528
[i915#3539]: https://gitlab.freedesktop.org/drm/intel/issues/3539
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3638]: https://gitlab.freedesktop.org/drm/intel/issues/3638
[i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#3778]: https://gitlab.freedesktop.org/drm/intel/issues/3778
[i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
[i915#3989]: https://gitlab.freedesktop.org/drm/intel/issues/3989
[i915#404]: https://gitlab.freedesktop.org/drm/intel/issues/404
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
[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#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
[i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213
[i915#426]: https://gitlab.freedesktop.org/drm/intel/issues/426
[i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
[i915#4387]: https://gitlab.freedesktop.org/drm/intel/issues/4387
[i915#4538]: https://gitlab.freedesktop.org/drm/intel/issues/4538
[i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
[i915#4565]: https://gitlab.freedesktop.org/drm/intel/issues/4565
[i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4771]: https://gitlab.freedesktop.org/drm/intel/issues/4771
[i915#4812]: https://gitlab.freedesktop.org/drm/intel/issues/4812
[i915#4818]: https://gitlab.freedesktop.org/drm/intel/issues/4818
[i915#4833]: https://gitlab.freedesktop.org/drm/intel/issues/4833
[i915#4852]: https://gitlab.freedesktop.org/drm/intel/issues/4852
[i915#4880]: https://gitlab.freedesktop.org/drm/intel/issues/4880
[i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176
[i915#5213]: https://gitlab.freedesktop.org/drm/intel/issues/5213
[i915#5286]: https://gitlab.freedesktop.org/drm/intel/issues/5286
[i915#5289]: https://gitlab.freedesktop.org/drm/intel/issues/5289
[i915#5325]: https://gitlab.freedesktop.org/drm/intel/issues/5325
[i915#5563]: https://gitlab.freedesktop.org/drm/intel/issues/5563
[i915#5566]: https://gitlab.freedesktop.org/drm/intel/issues/5566
[i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
[i915#6227]: https://gitlab.freedesktop.org/drm/intel/issues/6227
[i915#6301]: https://gitlab.freedesktop.org/drm/intel/issues/6301
[i915#6334]: https://gitlab.freedesktop.org/drm/intel/issues/6334
[i915#6433]: https://gitlab.freedesktop.org/drm/intel/issues/6433
[i915#6493]: https://gitlab.freedesktop.org/drm/intel/issues/6493
[i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
[i915#7116]: https://gitlab.freedesktop.org/drm/intel/issues/7116
[i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
[i915#7697]: https://gitlab.freedesktop.org/drm/intel/issues/7697
[i915#7711]: https://gitlab.freedesktop.org/drm/intel/issues/7711
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
[i915#8011]: https://gitlab.freedesktop.org/drm/intel/issues/8011
[i915#8292]: https://gitlab.freedesktop.org/drm/intel/issues/8292
Build changes
-------------
* Linux: CI_DRM_12931 -> Patchwork_115749v1
CI-20190529: 20190529
CI_DRM_12931: e1b8055e62c6f94ef94db3e7f125704ac0fab0b5 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7223: 2cbfa210fc95d126edf9a60ae6ab4e96cf4fca7f @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_115749v1: e1b8055e62c6f94ef94db3e7f125704ac0fab0b5 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115749v1/index.html
[-- Attachment #2: Type: text/html, Size: 7779 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915/hwmon: Use 0 to designate disabled PL1 power limit
2023-03-28 23:35 [Intel-gfx] [PATCH] drm/i915/hwmon: Use 0 to designate disabled PL1 power limit Ashutosh Dixit
` (2 preceding siblings ...)
2023-03-29 13:46 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
@ 2023-03-30 5:50 ` Dixit, Ashutosh
2023-03-30 15:44 ` Rodrigo Vivi
3 siblings, 1 reply; 7+ messages in thread
From: Dixit, Ashutosh @ 2023-03-30 5:50 UTC (permalink / raw)
To: intel-gfx; +Cc: dri-devel, Rodrigo Vivi
On Tue, 28 Mar 2023 16:35:43 -0700, Ashutosh Dixit wrote:
>
> On ATSM the PL1 limit is disabled at power up. The previous uapi assumed
> that the PL1 limit is always enabled and therefore did not have a notion of
> a disabled PL1 limit. This results in erroneous PL1 limit values when the
> PL1 limit is disabled. For example at power up, the disabled ATSM PL1 limit
> was previously shown as 0 which means a low PL1 limit whereas the limit
> being disabled actually implies a high effective PL1 limit value.
>
> To get round this problem, the PL1 limit uapi is expanded to include a
> special value 0 to designate a disabled PL1 limit.
This patch is another attempt to show when the PL1 power limit is disabled
and to disable it when it needs to. Previous abandoned attempts to do this
are [1] and [2].
The preferred way to do this was [2] but that was NAK'd by hwmon folks (see
[2]). That is why here we fall back on the approach in [1].
This patch is identical to [1] except that the value used to disable the
PL1 limit has been changed to 0 (from -1 in [1]) as was suggested in [2]
(both -1 and 0 seem ok for the purpose).
> Bug: https://gitlab.freedesktop.org/drm/intel/-/issues/8062
> Bug: https://gitlab.freedesktop.org/drm/intel/-/issues/8060
The link between this patch and these pretty serious bugs might not be
immediately clear so here's an explanation:
* Because on ATSM the PL1 power limit is disabled on power up and there
were no means to enable it, in 6fd3d8bf89fc we implemented the means to
enable the limit when the PL1 hwmon entry (power1_max) was written to.
* Now there is an IGT igt@i915_hwmon@hwmon_write which (a) reads orig value
from all hwmon sysfs (b) does a bunch of random writes and finally (c)
restores the orig value read. On ATSM since the orig value was 0, when
the IGT restores the 0 value, the PL1 limit is now enabled with a value
of 0.
* PL1 limit of 0 implies a low PL1 limit which causes GPU freq to fall to
100 MHz. This causes GuC FW load and several IGT's to start timing out
and gives rise the above (and even more) bugs about GuC FW load timing
out.
* After this patch, writing 0 would disable the PL1 limit instead of
enabling it, avoiding the freq drop issue above, and resolving this Intel
CI issue.
Thanks.
--
Ashutosh
[1] https://patchwork.freedesktop.org/patch/522612/?series=113972&rev=1
[2] https://patchwork.freedesktop.org/patch/522652/?series=113984&rev=1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915/hwmon: Use 0 to designate disabled PL1 power limit
2023-03-30 5:50 ` [Intel-gfx] [PATCH] " Dixit, Ashutosh
@ 2023-03-30 15:44 ` Rodrigo Vivi
2023-03-31 2:17 ` Dixit, Ashutosh
0 siblings, 1 reply; 7+ messages in thread
From: Rodrigo Vivi @ 2023-03-30 15:44 UTC (permalink / raw)
To: Dixit, Ashutosh; +Cc: dri-devel, intel-gfx
On Wed, Mar 29, 2023 at 10:50:09PM -0700, Dixit, Ashutosh wrote:
> On Tue, 28 Mar 2023 16:35:43 -0700, Ashutosh Dixit wrote:
> >
> > On ATSM the PL1 limit is disabled at power up. The previous uapi assumed
> > that the PL1 limit is always enabled and therefore did not have a notion of
> > a disabled PL1 limit. This results in erroneous PL1 limit values when the
> > PL1 limit is disabled. For example at power up, the disabled ATSM PL1 limit
> > was previously shown as 0 which means a low PL1 limit whereas the limit
> > being disabled actually implies a high effective PL1 limit value.
> >
> > To get round this problem, the PL1 limit uapi is expanded to include a
> > special value 0 to designate a disabled PL1 limit.
>
> This patch is another attempt to show when the PL1 power limit is disabled
> and to disable it when it needs to. Previous abandoned attempts to do this
> are [1] and [2].
>
> The preferred way to do this was [2] but that was NAK'd by hwmon folks (see
> [2]). That is why here we fall back on the approach in [1].
I still don't get it, but let's move on...
>
> This patch is identical to [1] except that the value used to disable the
> PL1 limit has been changed to 0 (from -1 in [1]) as was suggested in [2]
> (both -1 and 0 seem ok for the purpose).
>
> > Bug: https://gitlab.freedesktop.org/drm/intel/-/issues/8062
> > Bug: https://gitlab.freedesktop.org/drm/intel/-/issues/8060
>
> The link between this patch and these pretty serious bugs might not be
> immediately clear so here's an explanation:
>
> * Because on ATSM the PL1 power limit is disabled on power up and there
> were no means to enable it, in 6fd3d8bf89fc we implemented the means to
> enable the limit when the PL1 hwmon entry (power1_max) was written to.
>
> * Now there is an IGT igt@i915_hwmon@hwmon_write which (a) reads orig value
> from all hwmon sysfs (b) does a bunch of random writes and finally (c)
> restores the orig value read. On ATSM since the orig value was 0, when
> the IGT restores the 0 value, the PL1 limit is now enabled with a value
> of 0.
>
> * PL1 limit of 0 implies a low PL1 limit which causes GPU freq to fall to
> 100 MHz. This causes GuC FW load and several IGT's to start timing out
> and gives rise the above (and even more) bugs about GuC FW load timing
> out.
I believe these 3 bullets are key information that deserves to be in
the commit message itself.
With that there,
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
>
> * After this patch, writing 0 would disable the PL1 limit instead of
> enabling it, avoiding the freq drop issue above, and resolving this Intel
> CI issue.
>
> Thanks.
> --
> Ashutosh
>
> [1] https://patchwork.freedesktop.org/patch/522612/?series=113972&rev=1
> [2] https://patchwork.freedesktop.org/patch/522652/?series=113984&rev=1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915/hwmon: Use 0 to designate disabled PL1 power limit
2023-03-30 15:44 ` Rodrigo Vivi
@ 2023-03-31 2:17 ` Dixit, Ashutosh
0 siblings, 0 replies; 7+ messages in thread
From: Dixit, Ashutosh @ 2023-03-31 2:17 UTC (permalink / raw)
To: Rodrigo Vivi; +Cc: intel-gfx, dri-devel
On Thu, 30 Mar 2023 08:44:34 -0700, Rodrigo Vivi wrote:
>
> On Wed, Mar 29, 2023 at 10:50:09PM -0700, Dixit, Ashutosh wrote:
> > On Tue, 28 Mar 2023 16:35:43 -0700, Ashutosh Dixit wrote:
> > >
> > > On ATSM the PL1 limit is disabled at power up. The previous uapi assumed
> > > that the PL1 limit is always enabled and therefore did not have a notion of
> > > a disabled PL1 limit. This results in erroneous PL1 limit values when the
> > > PL1 limit is disabled. For example at power up, the disabled ATSM PL1 limit
> > > was previously shown as 0 which means a low PL1 limit whereas the limit
> > > being disabled actually implies a high effective PL1 limit value.
> > >
> > > To get round this problem, the PL1 limit uapi is expanded to include a
> > > special value 0 to designate a disabled PL1 limit.
> >
> > This patch is another attempt to show when the PL1 power limit is disabled
> > and to disable it when it needs to. Previous abandoned attempts to do this
> > are [1] and [2].
> >
> > The preferred way to do this was [2] but that was NAK'd by hwmon folks (see
> > [2]). That is why here we fall back on the approach in [1].
>
> I still don't get it, but let's move on...
>
> >
> > This patch is identical to [1] except that the value used to disable the
> > PL1 limit has been changed to 0 (from -1 in [1]) as was suggested in [2]
> > (both -1 and 0 seem ok for the purpose).
> >
> > > Bug: https://gitlab.freedesktop.org/drm/intel/-/issues/8062
> > > Bug: https://gitlab.freedesktop.org/drm/intel/-/issues/8060
> >
> > The link between this patch and these pretty serious bugs might not be
> > immediately clear so here's an explanation:
> >
> > * Because on ATSM the PL1 power limit is disabled on power up and there
> > were no means to enable it, in 6fd3d8bf89fc we implemented the means to
> > enable the limit when the PL1 hwmon entry (power1_max) was written to.
> >
> > * Now there is an IGT igt@i915_hwmon@hwmon_write which (a) reads orig value
> > from all hwmon sysfs (b) does a bunch of random writes and finally (c)
> > restores the orig value read. On ATSM since the orig value was 0, when
> > the IGT restores the 0 value, the PL1 limit is now enabled with a value
> > of 0.
> >
> > * PL1 limit of 0 implies a low PL1 limit which causes GPU freq to fall to
> > 100 MHz. This causes GuC FW load and several IGT's to start timing out
> > and gives rise the above (and even more) bugs about GuC FW load timing
> > out.
>
> I believe these 3 bullets are key information that deserves to be in
> the commit message itself.
Done in v2.
>
> With that there,
>
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Thanks.
--
Ashutosh
>
>
> >
> > * After this patch, writing 0 would disable the PL1 limit instead of
> > enabling it, avoiding the freq drop issue above, and resolving this Intel
> > CI issue.
> >
> > Thanks.
> > --
> > Ashutosh
> >
> > [1] https://patchwork.freedesktop.org/patch/522612/?series=113972&rev=1
> > [2] https://patchwork.freedesktop.org/patch/522652/?series=113984&rev=1
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-03-31 2:28 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-28 23:35 [Intel-gfx] [PATCH] drm/i915/hwmon: Use 0 to designate disabled PL1 power limit Ashutosh Dixit
2023-03-29 0:22 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2023-03-29 0:36 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-03-29 13:46 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2023-03-30 5:50 ` [Intel-gfx] [PATCH] " Dixit, Ashutosh
2023-03-30 15:44 ` Rodrigo Vivi
2023-03-31 2:17 ` Dixit, Ashutosh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox