Message ID | 20221215191727.2468770-1-ashutosh.dixit@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/i915/hwmon: Display clamped PL1 limit | expand |
On 12/16/2022 12:47 AM, Ashutosh Dixit wrote: > HW allows arbitrary PL1 limits to be set but silently clamps these values > to "typical but not guaranteed" min/max values in pkg_power_sku > register. Follow the same pattern for sysfs, allow arbitrary PL1 limits to > be set but display clamped values when read, so that users see PL1 limits > HW is likely using. Otherwise users think HW is using arbitrarily high/low > PL1 limits they might have set. The previous write/read I1 power1_crit > limit also follows the same clamping pattern. > > v2: Explain "why" in commit message and include bug link (Jani Nikula) > > Bug: https://gitlab.freedesktop.org/drm/intel/-/issues/7704 > Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Looks good to me. Reviewed-by: Anshuman Gupta <anshuman.gupta@intel.com> > --- > drivers/gpu/drm/i915/i915_hwmon.c | 39 ++++++++++++++++++++---- > drivers/gpu/drm/i915/intel_mchbar_regs.h | 2 ++ > 2 files changed, 35 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_hwmon.c b/drivers/gpu/drm/i915/i915_hwmon.c > index cca7a4350ec8f..1225bc432f0d5 100644 > --- a/drivers/gpu/drm/i915/i915_hwmon.c > +++ b/drivers/gpu/drm/i915/i915_hwmon.c > @@ -359,6 +359,38 @@ hwm_power_is_visible(const struct hwm_drvdata *ddat, u32 attr, int chan) > } > } > > +/* > + * 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 > + * same pattern for sysfs, allow arbitrary PL1 limits to be set but display > + * clamped values when read. Write/read I1 also follows the same pattern. > + */ > +static int > +hwm_power_max_read(struct hwm_drvdata *ddat, long *val) > +{ > + struct i915_hwmon *hwmon = ddat->hwmon; > + intel_wakeref_t wakeref; > + u64 r, min, max; > + > + *val = hwm_field_read_and_scale(ddat, > + hwmon->rg.pkg_rapl_limit, > + PKG_PWR_LIM_1, > + hwmon->scl_shift_power, > + SF_POWER); > + > + with_intel_runtime_pm(ddat->uncore->rpm, wakeref) > + r = intel_uncore_read64(ddat->uncore, hwmon->rg.pkg_power_sku); > + min = REG_FIELD_GET(PKG_MIN_PWR, r); > + min = mul_u64_u32_shr(min, SF_POWER, hwmon->scl_shift_power); > + max = REG_FIELD_GET(PKG_MAX_PWR, r); > + max = mul_u64_u32_shr(max, SF_POWER, hwmon->scl_shift_power); > + > + if (min && max) > + *val = clamp_t(u64, *val, min, max); > + > + return 0; > +} > + > static int > hwm_power_read(struct hwm_drvdata *ddat, u32 attr, int chan, long *val) > { > @@ -368,12 +400,7 @@ hwm_power_read(struct hwm_drvdata *ddat, u32 attr, int chan, long *val) > > switch (attr) { > case hwmon_power_max: > - *val = hwm_field_read_and_scale(ddat, > - hwmon->rg.pkg_rapl_limit, > - PKG_PWR_LIM_1, > - hwmon->scl_shift_power, > - SF_POWER); > - return 0; > + return hwm_power_max_read(ddat, val); > case hwmon_power_rated_max: > *val = hwm_field_read_and_scale(ddat, > hwmon->rg.pkg_power_sku, > diff --git a/drivers/gpu/drm/i915/intel_mchbar_regs.h b/drivers/gpu/drm/i915/intel_mchbar_regs.h > index f93e9af43ac35..73900c098d591 100644 > --- a/drivers/gpu/drm/i915/intel_mchbar_regs.h > +++ b/drivers/gpu/drm/i915/intel_mchbar_regs.h > @@ -194,6 +194,8 @@ > */ > #define PCU_PACKAGE_POWER_SKU _MMIO(MCHBAR_MIRROR_BASE_SNB + 0x5930) > #define PKG_PKG_TDP GENMASK_ULL(14, 0) > +#define PKG_MIN_PWR GENMASK_ULL(30, 16) > +#define PKG_MAX_PWR GENMASK_ULL(46, 32) > #define PKG_MAX_WIN GENMASK_ULL(54, 48) > #define PKG_MAX_WIN_X GENMASK_ULL(54, 53) > #define PKG_MAX_WIN_Y GENMASK_ULL(52, 48)
On 12/16/2022 8:46 PM, Patchwork wrote: > *Patch Details* > *Series:* drm/i915/hwmon: Display clamped PL1 limit (rev2) > *URL:* https://patchwork.freedesktop.org/series/111981/ > <https://patchwork.freedesktop.org/series/111981/> > *State:* success > *Details:* > https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/index.html > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/index.html> > > > CI Bug Log - changes from CI_DRM_12511_full -> Patchwork_111981v2_full > > > Summary > > *SUCCESS* Pushed to drm-intel-gt-next. Thanks for patch. Br, Anshuman Gupta. > > No regressions found. > > > Participating hosts (14 -> 9) > > Missing (5): shard-tglu-9 shard-tglu-10 shard-tglu shard-rkl shard-dg1 > > > Known issues > > Here are the changes found in Patchwork_111981v2_full that come from > known issues: > > > CI changes > > > Possible fixes > > * boot: > o shard-apl: (PASS > <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-apl3/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-apl2/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-apl2/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-apl3/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-apl3/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-apl3/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-apl8/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-apl8/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-apl1/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-apl8/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-apl8/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-apl6/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-apl6/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-apl1/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-apl6/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-apl1/boot.html>, FAIL <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-apl1/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-apl6/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-apl1/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-apl6/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-apl3/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-apl1/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-apl2/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-apl2/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-apl2/boot.html>) (i915#4386 <https://gitlab.freedesktop.org/drm/intel/issues/4386>) -> (PASS <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-apl8/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-apl8/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-apl3/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-apl3/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-apl3/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-apl3/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-apl2/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-apl2/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-apl2/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-apl2/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-apl2/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-apl1/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-apl1/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-apl1/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-apl8/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-apl8/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-apl8/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-apl8/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-apl6/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-apl6/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-apl6/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-apl6/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-apl6/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-apl6/boot.html>, PASS <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-apl3/boot.html>) > > > IGT changes > > > Issues hit > > * > > igt@gem_ctx_param@set-priority-not-supported: > > o shard-iclb: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb7/igt@gem_ctx_param@set-priority-not-supported.html> (fdo#109314 <https://bugs.freedesktop.org/show_bug.cgi?id=109314>) > * > > igt@gem_exec_balancer@parallel: > > o shard-iclb: PASS > <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-iclb1/igt@gem_exec_balancer@parallel.html> -> SKIP <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb3/igt@gem_exec_balancer@parallel.html> (i915#4525 <https://gitlab.freedesktop.org/drm/intel/issues/4525>) > * > > igt@gem_exec_fair@basic-pace-share@rcs0: > > o shard-tglb: PASS > <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-tglb6/igt@gem_exec_fair@basic-pace-share@rcs0.html> -> FAIL <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-tglb6/igt@gem_exec_fair@basic-pace-share@rcs0.html> (i915#2842 <https://gitlab.freedesktop.org/drm/intel/issues/2842>) > * > > igt@gem_exec_whisper@basic-fds-forked-all: > > o shard-iclb: PASS > <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-iclb8/igt@gem_exec_whisper@basic-fds-forked-all.html> -> INCOMPLETE <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb8/igt@gem_exec_whisper@basic-fds-forked-all.html> (i915#6755 <https://gitlab.freedesktop.org/drm/intel/issues/6755>) > * > > igt@gem_huc_copy@huc-copy: > > o shard-apl: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-apl8/igt@gem_huc_copy@huc-copy.html> (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271> / i915#2190 <https://gitlab.freedesktop.org/drm/intel/issues/2190>) > * > > igt@gem_lmem_swapping@verify-random-ccs: > > o shard-iclb: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb7/igt@gem_lmem_swapping@verify-random-ccs.html> (i915#4613 <https://gitlab.freedesktop.org/drm/intel/issues/4613>) > * > > igt@gem_pwrite@basic-exhaustion: > > o shard-iclb: NOTRUN -> WARN > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb7/igt@gem_pwrite@basic-exhaustion.html> (i915#2658 <https://gitlab.freedesktop.org/drm/intel/issues/2658>) > * > > igt@gem_render_copy@y-tiled-to-vebox-x-tiled: > > o shard-iclb: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb7/igt@gem_render_copy@y-tiled-to-vebox-x-tiled.html> (i915#768 <https://gitlab.freedesktop.org/drm/intel/issues/768>) > * > > igt@gem_userptr_blits@access-control: > > o shard-iclb: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb7/igt@gem_userptr_blits@access-control.html> (i915#3297 <https://gitlab.freedesktop.org/drm/intel/issues/3297>) +1 similar issue > * > > igt@gem_userptr_blits@dmabuf-unsync: > > o shard-tglb: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-tglb6/igt@gem_userptr_blits@dmabuf-unsync.html> (i915#3297 <https://gitlab.freedesktop.org/drm/intel/issues/3297>) > * > > igt@gen7_exec_parse@chained-batch: > > o shard-iclb: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb7/igt@gen7_exec_parse@chained-batch.html> (fdo#109289 <https://bugs.freedesktop.org/show_bug.cgi?id=109289>) > * > > igt@gen9_exec_parse@bb-start-out: > > o shard-iclb: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb7/igt@gen9_exec_parse@bb-start-out.html> (i915#2856 <https://gitlab.freedesktop.org/drm/intel/issues/2856>) > * > > igt@gen9_exec_parse@secure-batches: > > o shard-tglb: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-tglb6/igt@gen9_exec_parse@secure-batches.html> (i915#2527 <https://gitlab.freedesktop.org/drm/intel/issues/2527> / i915#2856 <https://gitlab.freedesktop.org/drm/intel/issues/2856>) > * > > igt@i915_pm_dc@dc3co-vpb-simulation: > > o shard-apl: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-apl8/igt@i915_pm_dc@dc3co-vpb-simulation.html> (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271> / i915#658 <https://gitlab.freedesktop.org/drm/intel/issues/658>) +1 similar issue > * > > igt@kms_big_fb@4-tiled-max-hw-stride-64bpp-rotate-180-hflip: > > o shard-iclb: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb7/igt@kms_big_fb@4-tiled-max-hw-stride-64bpp-rotate-180-hflip.html> (i915#5286 <https://gitlab.freedesktop.org/drm/intel/issues/5286>) +1 similar issue > * > > igt@kms_big_fb@yf-tiled-8bpp-rotate-270: > > o shard-iclb: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb7/igt@kms_big_fb@yf-tiled-8bpp-rotate-270.html> (fdo#110723 <https://bugs.freedesktop.org/show_bug.cgi?id=110723>) > * > > igt@kms_ccs@pipe-a-crc-primary-basic-y_tiled_ccs: > > o shard-tglb: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-tglb6/igt@kms_ccs@pipe-a-crc-primary-basic-y_tiled_ccs.html> (i915#3689 <https://gitlab.freedesktop.org/drm/intel/issues/3689>) > * > > igt@kms_ccs@pipe-b-bad-aux-stride-y_tiled_ccs: > > o shard-apl: PASS > <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-apl3/igt@kms_ccs@pipe-b-bad-aux-stride-y_tiled_ccs.html> -> DMESG-WARN <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-apl2/igt@kms_ccs@pipe-b-bad-aux-stride-y_tiled_ccs.html> (i915#62 <https://gitlab.freedesktop.org/drm/intel/issues/62>) +3 similar issues > * > > igt@kms_ccs@pipe-c-bad-pixel-format-y_tiled_gen12_mc_ccs: > > o shard-apl: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-apl8/igt@kms_ccs@pipe-c-bad-pixel-format-y_tiled_gen12_mc_ccs.html> (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271> / i915#3886 <https://gitlab.freedesktop.org/drm/intel/issues/3886>) +1 similar issue > * > > igt@kms_ccs@pipe-c-crc-primary-rotation-180-4_tiled_dg2_mc_ccs: > > o shard-tglb: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-tglb6/igt@kms_ccs@pipe-c-crc-primary-rotation-180-4_tiled_dg2_mc_ccs.html> (i915#6095 <https://gitlab.freedesktop.org/drm/intel/issues/6095>) > * > > igt@kms_ccs@pipe-c-crc-primary-rotation-180-y_tiled_gen12_rc_ccs_cc: > > o shard-iclb: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb7/igt@kms_ccs@pipe-c-crc-primary-rotation-180-y_tiled_gen12_rc_ccs_cc.html> (fdo#109278 <https://bugs.freedesktop.org/show_bug.cgi?id=109278> / i915#3886 <https://gitlab.freedesktop.org/drm/intel/issues/3886>) +1 similar issue > * > > igt@kms_ccs@pipe-d-random-ccs-data-y_tiled_ccs: > > o shard-iclb: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb7/igt@kms_ccs@pipe-d-random-ccs-data-y_tiled_ccs.html> (fdo#109278 <https://bugs.freedesktop.org/show_bug.cgi?id=109278>) +7 similar issues > * > > igt@kms_chamelium@hdmi-aspect-ratio: > > o shard-tglb: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-tglb6/igt@kms_chamelium@hdmi-aspect-ratio.html> (fdo#109284 <https://bugs.freedesktop.org/show_bug.cgi?id=109284> / fdo#111827 <https://bugs.freedesktop.org/show_bug.cgi?id=111827>) > * > > igt@kms_chamelium@vga-hpd-without-ddc: > > o shard-apl: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-apl8/igt@kms_chamelium@vga-hpd-without-ddc.html> (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271> / fdo#111827 <https://bugs.freedesktop.org/show_bug.cgi?id=111827>) +1 similar issue > * > > igt@kms_color_chamelium@ctm-limited-range: > > o shard-iclb: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb7/igt@kms_color_chamelium@ctm-limited-range.html> (fdo#109284 <https://bugs.freedesktop.org/show_bug.cgi?id=109284> / fdo#111827 <https://bugs.freedesktop.org/show_bug.cgi?id=111827>) +3 similar issues > * > > igt@kms_cursor_crc@cursor-offscreen-512x170: > > o shard-iclb: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb7/igt@kms_cursor_crc@cursor-offscreen-512x170.html> (fdo#109279 <https://bugs.freedesktop.org/show_bug.cgi?id=109279> / i915#3359 <https://gitlab.freedesktop.org/drm/intel/issues/3359>) > * > > igt@kms_cursor_crc@cursor-rapid-movement-32x32: > > o shard-tglb: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-tglb6/igt@kms_cursor_crc@cursor-rapid-movement-32x32.html> (i915#3555 <https://gitlab.freedesktop.org/drm/intel/issues/3555>) > * > > igt@kms_dither@fb-8bpc-vs-panel-8bpc: > > o shard-tglb: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-tglb6/igt@kms_dither@fb-8bpc-vs-panel-8bpc.html> (i915#1769 <https://gitlab.freedesktop.org/drm/intel/issues/1769> / i915#3555 <https://gitlab.freedesktop.org/drm/intel/issues/3555>) > * > > igt@kms_flip@2x-flip-vs-suspend-interruptible: > > o shard-iclb: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb7/igt@kms_flip@2x-flip-vs-suspend-interruptible.html> (fdo#109274 <https://bugs.freedesktop.org/show_bug.cgi?id=109274>) +4 similar issues > * > > igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs-upscaling@pipe-a-default-mode: > > o shard-iclb: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb3/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs-upscaling@pipe-a-default-mode.html> (i915#2672 <https://gitlab.freedesktop.org/drm/intel/issues/2672>) +5 similar issues > * > > igt@kms_flip_scaled_crc@flip-64bpp-4tile-to-32bpp-4tiledg2rcccs-downscaling@pipe-a-valid-mode: > > o shard-iclb: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb1/igt@kms_flip_scaled_crc@flip-64bpp-4tile-to-32bpp-4tiledg2rcccs-downscaling@pipe-a-valid-mode.html> (i915#2587 <https://gitlab.freedesktop.org/drm/intel/issues/2587> / i915#2672 <https://gitlab.freedesktop.org/drm/intel/issues/2672>) +5 similar issues > * > > igt@kms_flip_scaled_crc@flip-64bpp-linear-to-32bpp-linear-downscaling@pipe-a-default-mode: > > o shard-iclb: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb2/igt@kms_flip_scaled_crc@flip-64bpp-linear-to-32bpp-linear-downscaling@pipe-a-default-mode.html> (i915#3555 <https://gitlab.freedesktop.org/drm/intel/issues/3555>) +1 similar issue > * > > igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-mmap-gtt: > > o shard-tglb: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-tglb6/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-mmap-gtt.html> (fdo#109280 <https://bugs.freedesktop.org/show_bug.cgi?id=109280> / fdo#111825 <https://bugs.freedesktop.org/show_bug.cgi?id=111825>) > * > > igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-pri-shrfb-draw-blt: > > o shard-iclb: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb7/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-pri-shrfb-draw-blt.html> (fdo#109280 <https://bugs.freedesktop.org/show_bug.cgi?id=109280>) +6 similar issues > * > > igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-spr-indfb-onoff: > > o shard-apl: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-apl8/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-spr-indfb-onoff.html> (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>) +43 similar issues > * > > igt@kms_frontbuffer_tracking@fbcpsr-tiling-4: > > o shard-iclb: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb7/igt@kms_frontbuffer_tracking@fbcpsr-tiling-4.html> (i915#5438 <https://gitlab.freedesktop.org/drm/intel/issues/5438>) > * > > igt@kms_plane_alpha_blend@constant-alpha-max@pipe-b-dp-1: > > o shard-apl: NOTRUN -> FAIL > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-apl8/igt@kms_plane_alpha_blend@constant-alpha-max@pipe-b-dp-1.html> (i915#4573 <https://gitlab.freedesktop.org/drm/intel/issues/4573>) +2 similar issues > * > > igt@kms_plane_lowres@tiling-4: > > o shard-iclb: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb7/igt@kms_plane_lowres@tiling-4.html> (i915#5288 <https://gitlab.freedesktop.org/drm/intel/issues/5288>) > * > > igt@kms_plane_scaling@plane-downscale-with-pixel-format-factor-0-5@pipe-b-edp-1: > > o shard-iclb: PASS > <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-iclb6/igt@kms_plane_scaling@plane-downscale-with-pixel-format-factor-0-5@pipe-b-edp-1.html> -> SKIP <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb2/igt@kms_plane_scaling@plane-downscale-with-pixel-format-factor-0-5@pipe-b-edp-1.html> (i915#5176 <https://gitlab.freedesktop.org/drm/intel/issues/5176>) +2 similar issues > * > > igt@kms_plane_scaling@plane-downscale-with-rotation-factor-0-75@pipe-c-edp-1: > > o shard-iclb: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb7/igt@kms_plane_scaling@plane-downscale-with-rotation-factor-0-75@pipe-c-edp-1.html> (i915#5176 <https://gitlab.freedesktop.org/drm/intel/issues/5176>) +2 similar issues > * > > igt@kms_psr2_sf@overlay-plane-move-continuous-exceed-fully-sf: > > o shard-iclb: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb7/igt@kms_psr2_sf@overlay-plane-move-continuous-exceed-fully-sf.html> (i915#658 <https://gitlab.freedesktop.org/drm/intel/issues/658>) > * > > igt@kms_psr2_su@page_flip-p010: > > o shard-iclb: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb1/igt@kms_psr2_su@page_flip-p010.html> (fdo#109642 <https://bugs.freedesktop.org/show_bug.cgi?id=109642> / fdo#111068 <https://bugs.freedesktop.org/show_bug.cgi?id=111068> / i915#658 <https://gitlab.freedesktop.org/drm/intel/issues/658>) > * > > igt@kms_psr@psr2_primary_mmap_cpu: > > o shard-iclb: PASS > <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-iclb2/igt@kms_psr@psr2_primary_mmap_cpu.html> -> SKIP <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb1/igt@kms_psr@psr2_primary_mmap_cpu.html> (fdo#109441 <https://bugs.freedesktop.org/show_bug.cgi?id=109441>) +1 similar issue > * > > igt@kms_psr@psr2_suspend: > > o shard-iclb: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb7/igt@kms_psr@psr2_suspend.html> (fdo#109441 <https://bugs.freedesktop.org/show_bug.cgi?id=109441>) > * > > igt@kms_rotation_crc@primary-yf-tiled-reflect-x-0: > > o shard-tglb: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-tglb6/igt@kms_rotation_crc@primary-yf-tiled-reflect-x-0.html> (fdo#111615 <https://bugs.freedesktop.org/show_bug.cgi?id=111615> / i915#5289 <https://gitlab.freedesktop.org/drm/intel/issues/5289>) > * > > igt@perf_pmu@module-unload: > > o shard-apl: PASS > <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-apl3/igt@perf_pmu@module-unload.html> -> INCOMPLETE <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-apl1/igt@perf_pmu@module-unload.html> (i915#1982 <https://gitlab.freedesktop.org/drm/intel/issues/1982>) > * > > igt@sysfs_clients@sema-25: > > o shard-tglb: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-tglb6/igt@sysfs_clients@sema-25.html> (i915#2994 <https://gitlab.freedesktop.org/drm/intel/issues/2994>) > * > > igt@sysfs_clients@split-25: > > o shard-iclb: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb7/igt@sysfs_clients@split-25.html> (i915#2994 <https://gitlab.freedesktop.org/drm/intel/issues/2994>) > * > > igt@v3d/v3d_mmap@mmap-bad-handle: > > o shard-iclb: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb7/igt@v3d/v3d_mmap@mmap-bad-handle.html> (fdo#109315 <https://bugs.freedesktop.org/show_bug.cgi?id=109315>) > > > Possible fixes > > * > > igt@gem_exec_balancer@parallel-out-fence: > > o shard-iclb: SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-iclb6/igt@gem_exec_balancer@parallel-out-fence.html> (i915#4525 <https://gitlab.freedesktop.org/drm/intel/issues/4525>) -> PASS <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb1/igt@gem_exec_balancer@parallel-out-fence.html> +1 similar issue > * > > igt@i915_pm_dc@dc6-psr: > > o shard-iclb: FAIL > <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-iclb3/igt@i915_pm_dc@dc6-psr.html> (i915#3989 <https://gitlab.freedesktop.org/drm/intel/issues/3989> / i915#454 <https://gitlab.freedesktop.org/drm/intel/issues/454>) -> PASS <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb8/igt@i915_pm_dc@dc6-psr.html> > * > > igt@kms_cursor_edge_walk@right-edge@pipe-b-edp-1-128x128: > > o shard-tglb: INCOMPLETE > <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-tglb6/igt@kms_cursor_edge_walk@right-edge@pipe-b-edp-1-128x128.html> -> PASS <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-tglb6/igt@kms_cursor_edge_walk@right-edge@pipe-b-edp-1-128x128.html> > * > > igt@kms_plane_scaling@plane-scaler-with-clipping-clamping-pixel-formats@pipe-b-edp-1: > > o shard-iclb: SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-iclb3/igt@kms_plane_scaling@plane-scaler-with-clipping-clamping-pixel-formats@pipe-b-edp-1.html> (i915#5176 <https://gitlab.freedesktop.org/drm/intel/issues/5176>) -> PASS <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb8/igt@kms_plane_scaling@plane-scaler-with-clipping-clamping-pixel-formats@pipe-b-edp-1.html> +1 similar issue > * > > igt@kms_psr@psr2_no_drrs: > > o shard-iclb: SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-iclb3/igt@kms_psr@psr2_no_drrs.html> (fdo#109441 <https://bugs.freedesktop.org/show_bug.cgi?id=109441>) -> PASS <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb2/igt@kms_psr@psr2_no_drrs.html> +2 similar issues > * > > igt@kms_psr_stress_test@flip-primary-invalidate-overlay: > > o shard-iclb: SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-iclb5/igt@kms_psr_stress_test@flip-primary-invalidate-overlay.html> (i915#5519 <https://gitlab.freedesktop.org/drm/intel/issues/5519>) -> PASS <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb6/igt@kms_psr_stress_test@flip-primary-invalidate-overlay.html> > > > Warnings > > * > > igt@gem_exec_balancer@parallel-ordering: > > o shard-iclb: SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-iclb7/igt@gem_exec_balancer@parallel-ordering.html> (i915#4525 <https://gitlab.freedesktop.org/drm/intel/issues/4525>) -> FAIL <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb1/igt@gem_exec_balancer@parallel-ordering.html> (i915#6117 <https://gitlab.freedesktop.org/drm/intel/issues/6117>) > * > > igt@i915_pm_rc6_residency@rc6-idle@rcs0: > > o shard-iclb: WARN > <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-iclb3/igt@i915_pm_rc6_residency@rc6-idle@rcs0.html> (i915#2684 <https://gitlab.freedesktop.org/drm/intel/issues/2684>) -> FAIL <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb1/igt@i915_pm_rc6_residency@rc6-idle@rcs0.html> (i915#2684 <https://gitlab.freedesktop.org/drm/intel/issues/2684> / i915#3591 <https://gitlab.freedesktop.org/drm/intel/issues/3591>) > * > > igt@kms_psr2_sf@overlay-plane-move-continuous-sf: > > o shard-iclb: SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-iclb6/igt@kms_psr2_sf@overlay-plane-move-continuous-sf.html> (i915#658 <https://gitlab.freedesktop.org/drm/intel/issues/658>) -> SKIP <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb2/igt@kms_psr2_sf@overlay-plane-move-continuous-sf.html> (i915#2920 <https://gitlab.freedesktop.org/drm/intel/issues/2920>) > * > > igt@kms_psr2_sf@plane-move-sf-dmg-area: > > o shard-iclb: SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-iclb2/igt@kms_psr2_sf@plane-move-sf-dmg-area.html> (i915#2920 <https://gitlab.freedesktop.org/drm/intel/issues/2920>) -> SKIP <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb5/igt@kms_psr2_sf@plane-move-sf-dmg-area.html> (fdo#111068 <https://bugs.freedesktop.org/show_bug.cgi?id=111068> / i915#658 <https://gitlab.freedesktop.org/drm/intel/issues/658>) > * > > igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-big-fb: > > o shard-iclb: SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12511/shard-iclb2/igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-big-fb.html> (i915#2920 <https://gitlab.freedesktop.org/drm/intel/issues/2920>) -> SKIP <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111981v2/shard-iclb5/igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-big-fb.html> (i915#658 <https://gitlab.freedesktop.org/drm/intel/issues/658>) > > {name}: This element is suppressed. This means it is ignored when computing > the status of the difference (SUCCESS, WARNING, or FAILURE). > > > Build changes > > * Linux: CI_DRM_12511 -> Patchwork_111981v2 > > CI-20190529: 20190529 > CI_DRM_12511: 2f1afd3898412b8487d420921f34fb5340e15e5b @ > git://anongit.freedesktop.org/gfx-ci/linux > IGT_7095: 0d821bca4e1086c96bb8928a0d24e707396e9373 @ > https://gitlab.freedesktop.org/drm/igt-gpu-tools.git > Patchwork_111981v2: 2f1afd3898412b8487d420921f34fb5340e15e5b @ > git://anongit.freedesktop.org/gfx-ci/linux > piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ > git://anongit.freedesktop.org/piglit >
diff --git a/drivers/gpu/drm/i915/i915_hwmon.c b/drivers/gpu/drm/i915/i915_hwmon.c index cca7a4350ec8f..1225bc432f0d5 100644 --- a/drivers/gpu/drm/i915/i915_hwmon.c +++ b/drivers/gpu/drm/i915/i915_hwmon.c @@ -359,6 +359,38 @@ hwm_power_is_visible(const struct hwm_drvdata *ddat, u32 attr, int chan) } } +/* + * 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 + * same pattern for sysfs, allow arbitrary PL1 limits to be set but display + * clamped values when read. Write/read I1 also follows the same pattern. + */ +static int +hwm_power_max_read(struct hwm_drvdata *ddat, long *val) +{ + struct i915_hwmon *hwmon = ddat->hwmon; + intel_wakeref_t wakeref; + u64 r, min, max; + + *val = hwm_field_read_and_scale(ddat, + hwmon->rg.pkg_rapl_limit, + PKG_PWR_LIM_1, + hwmon->scl_shift_power, + SF_POWER); + + with_intel_runtime_pm(ddat->uncore->rpm, wakeref) + r = intel_uncore_read64(ddat->uncore, hwmon->rg.pkg_power_sku); + min = REG_FIELD_GET(PKG_MIN_PWR, r); + min = mul_u64_u32_shr(min, SF_POWER, hwmon->scl_shift_power); + max = REG_FIELD_GET(PKG_MAX_PWR, r); + max = mul_u64_u32_shr(max, SF_POWER, hwmon->scl_shift_power); + + if (min && max) + *val = clamp_t(u64, *val, min, max); + + return 0; +} + static int hwm_power_read(struct hwm_drvdata *ddat, u32 attr, int chan, long *val) { @@ -368,12 +400,7 @@ hwm_power_read(struct hwm_drvdata *ddat, u32 attr, int chan, long *val) switch (attr) { case hwmon_power_max: - *val = hwm_field_read_and_scale(ddat, - hwmon->rg.pkg_rapl_limit, - PKG_PWR_LIM_1, - hwmon->scl_shift_power, - SF_POWER); - return 0; + return hwm_power_max_read(ddat, val); case hwmon_power_rated_max: *val = hwm_field_read_and_scale(ddat, hwmon->rg.pkg_power_sku, diff --git a/drivers/gpu/drm/i915/intel_mchbar_regs.h b/drivers/gpu/drm/i915/intel_mchbar_regs.h index f93e9af43ac35..73900c098d591 100644 --- a/drivers/gpu/drm/i915/intel_mchbar_regs.h +++ b/drivers/gpu/drm/i915/intel_mchbar_regs.h @@ -194,6 +194,8 @@ */ #define PCU_PACKAGE_POWER_SKU _MMIO(MCHBAR_MIRROR_BASE_SNB + 0x5930) #define PKG_PKG_TDP GENMASK_ULL(14, 0) +#define PKG_MIN_PWR GENMASK_ULL(30, 16) +#define PKG_MAX_PWR GENMASK_ULL(46, 32) #define PKG_MAX_WIN GENMASK_ULL(54, 48) #define PKG_MAX_WIN_X GENMASK_ULL(54, 53) #define PKG_MAX_WIN_Y GENMASK_ULL(52, 48)
HW allows arbitrary PL1 limits to be set but silently clamps these values to "typical but not guaranteed" min/max values in pkg_power_sku register. Follow the same pattern for sysfs, allow arbitrary PL1 limits to be set but display clamped values when read, so that users see PL1 limits HW is likely using. Otherwise users think HW is using arbitrarily high/low PL1 limits they might have set. The previous write/read I1 power1_crit limit also follows the same clamping pattern. v2: Explain "why" in commit message and include bug link (Jani Nikula) Bug: https://gitlab.freedesktop.org/drm/intel/-/issues/7704 Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> --- drivers/gpu/drm/i915/i915_hwmon.c | 39 ++++++++++++++++++++---- drivers/gpu/drm/i915/intel_mchbar_regs.h | 2 ++ 2 files changed, 35 insertions(+), 6 deletions(-)