drm/i915/pmu: Match frequencies reported by PMU and sysfs
Subsystems (2)
PATCH 1/1 drm/i915/pmu: Match frequencies reported by PMU and sysfs
PMU and sysfs use different wakeref's to "interpret" zero freq. Sysfs uses runtime PM wakeref (see intel_rps_read_punit_req and intel_rps_read_actual_frequency). PMU uses the GT parked/unparked wakeref. In general the GT wakeref is held for less time that the runtime PM wakeref which causes PMU to report a lower average freq than the average freq obtained from sampling sysfs.
To resolve this, use the same freq functions (and wakeref's) in PMU as those used in sysfs.
--- drivers/gpu/drm/i915/i915_pmu.c | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-)
drivers/gpu/drm/i915/i915_pmu.c +2 -25
@@ -371,37 +371,16 @@ static void frequency_sample(struct intel_gt *gt, unsigned int period_ns) { struct drm_i915_private *i915 = gt->i915; -struct intel_uncore *uncore = gt->uncore;struct i915_pmu *pmu = &i915->pmu;struct intel_rps *rps = >->rps;if (!frequency_sampling_enabled (pmu))return ; -/* Report 0/0 (actual/requested) frequency while parked. */ -if (!intel_gt_pm_get_if_awake (gt)) -return ; -if (pmu->enable &config_mask (I915_PMU_ACTUAL_FREQUENCY )) { -u32 val; - -/* -* We take a quick peek here without using forcewake -* so that we don't perturb the system under observation -* (forcewake => !rc6 => increased power use). We expect -* that if the read fails because it is outside of the -* mmio power well, then it will return 0 -- in which -* case we assume the system is running at the intended -* frequency. Fortunately, the read should rarely fail! -*/ - val =intel_uncore_read_fw (uncore,GEN6_RPSTAT1 ); -if (val) - val =intel_rps_get_cagf (rps, val); -else - val = rps->cur_freq; -add_sample_mult (&pmu->sample[__I915_SAMPLE_FREQ_ACT], -intel_gpu_freq (rps, val), period_ns /1000 ); +intel_rps_read_actual_frequency (rps), + period_ns /1000 ); }if (pmu->enable &config_mask (I915_PMU_REQUESTED_FREQUENCY )) {
@@ -409,8 +388,6 @@ frequency_sample(struct intel_gt *gt, unsigned int period_ns)intel_rps_get_requested_frequency (rps), period_ns / 1000); } - -intel_gt_pm_put_async (gt); }static enum hrtimer_restart i915_sample (struct hrtimer *hrtimer)
Signature · 1 line
2.34.1
Patchwork
CI[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/pmu: Match frequencies reported by PMU and sysfs
== Series Details ==
== Series Details ==
Series: drm/i915/pmu: Match frequencies reported by PMU and sysfs
URL : https://patchwork.freedesktop.org/series/109372/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_12206 -> Patchwork_109372v1
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/index.html
Participating hosts (44 -> 43)
------------------------------
Additional (2): fi-hsw-4770 fi-rkl-11600
Missing (3): fi-hsw-4200u fi-bdw-samus bat-dg1-5
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_109372v1:
### IGT changes ###
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.
* igt@gem_huc_copy@huc-copy:
- {bat-atsm-1}: [PASS][1] -> [FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/bat-atsm-1/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/bat-atsm-1/igt@[email protected]
* igt@i915_module_load@load:
- {bat-atsm-1}: [PASS][3] -> [DMESG-WARN][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/bat-atsm-1/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/bat-atsm-1/igt@[email protected]
Known issues
------------
Here are the changes found in Patchwork_109372v1 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_huc_copy@huc-copy:
- fi-rkl-11600: NOTRUN -> [SKIP][5] ([i915#2190])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/fi-rkl-11600/igt@[email protected]
* igt@gem_lmem_swapping@basic:
- fi-rkl-11600: NOTRUN -> [SKIP][6] ([i915#4613]) +3 similar issues
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/fi-rkl-11600/igt@[email protected]
* igt@gem_softpin@allocator-basic-reserve:
- fi-hsw-4770: NOTRUN -> [SKIP][7] ([fdo#109271]) +9 similar issues
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/fi-hsw-4770/igt@[email protected]
* igt@gem_tiled_pread_basic:
- fi-rkl-11600: NOTRUN -> [SKIP][8] ([i915#3282])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/fi-rkl-11600/igt@gem_tiled_pread_basic.html
* igt@i915_pm_backlight@basic-brightness:
- fi-hsw-4770: NOTRUN -> [SKIP][9] ([fdo#109271] / [i915#3012])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/fi-hsw-4770/igt@[email protected]
- fi-rkl-11600: NOTRUN -> [SKIP][10] ([i915#3012])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/fi-rkl-11600/igt@[email protected]
* igt@i915_selftest@live@execlists:
- fi-bdw-gvtdvm: [PASS][11] -> [INCOMPLETE][12] ([i915#2940])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/fi-bdw-gvtdvm/igt@i915_selftest@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/fi-bdw-gvtdvm/igt@i915_selftest@[email protected]
* igt@i915_suspend@basic-s3-without-i915:
- fi-rkl-11600: NOTRUN -> [INCOMPLETE][13] ([i915#5982])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/fi-rkl-11600/igt@[email protected]
* igt@kms_chamelium@dp-crc-fast:
- fi-hsw-4770: NOTRUN -> [SKIP][14] ([fdo#109271] / [fdo#111827]) +8 similar issues
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/fi-hsw-4770/igt@[email protected]
* igt@kms_chamelium@hdmi-edid-read:
- fi-rkl-11600: NOTRUN -> [SKIP][15] ([fdo#111827]) +7 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/fi-rkl-11600/igt@[email protected]
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor:
- fi-rkl-11600: NOTRUN -> [SKIP][16] ([i915#4103])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/fi-rkl-11600/igt@[email protected]
* igt@kms_force_connector_basic@force-load-detect:
- fi-rkl-11600: NOTRUN -> [SKIP][17] ([fdo#109285] / [i915#4098])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/fi-rkl-11600/igt@[email protected]
* igt@kms_psr@primary_page_flip:
- fi-rkl-11600: NOTRUN -> [SKIP][18] ([i915#1072]) +3 similar issues
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/fi-rkl-11600/igt@kms_psr@primary_page_flip.html
* igt@kms_psr@sprite_plane_onoff:
- fi-hsw-4770: NOTRUN -> [SKIP][19] ([fdo#109271] / [i915#1072]) +3 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/fi-hsw-4770/igt@kms_psr@sprite_plane_onoff.html
* igt@kms_setmode@basic-clone-single-crtc:
- fi-rkl-11600: NOTRUN -> [SKIP][20] ([i915#3555] / [i915#4098])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/fi-rkl-11600/igt@[email protected]
* igt@prime_vgem@basic-read:
- fi-rkl-11600: NOTRUN -> [SKIP][21] ([fdo#109295] / [i915#3291] / [i915#3708]) +2 similar issues
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/fi-rkl-11600/igt@[email protected]
* igt@prime_vgem@basic-userptr:
- fi-rkl-11600: NOTRUN -> [SKIP][22] ([fdo#109295] / [i915#3301] / [i915#3708])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/fi-rkl-11600/igt@[email protected]
* igt@runner@aborted:
- fi-bdw-gvtdvm: NOTRUN -> [FAIL][23] ([i915#4312])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/fi-bdw-gvtdvm/igt@[email protected]
#### Possible fixes ####
* igt@fbdev@read:
- {bat-rpls-2}: [SKIP][24] ([i915#2582]) -> [PASS][25] +4 similar issues
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/bat-rpls-2/igt@[email protected]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/bat-rpls-2/igt@[email protected]
* igt@i915_selftest@live@gt_pm:
- {bat-rpls-2}: [DMESG-FAIL][26] ([i915#4258]) -> [PASS][27]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/bat-rpls-2/igt@i915_selftest@live@gt_pm.html
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/bat-rpls-2/igt@i915_selftest@live@gt_pm.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#2867]: https://gitlab.freedesktop.org/drm/intel/issues/2867
[i915#2940]: https://gitlab.freedesktop.org/drm/intel/issues/2940
[i915#3012]: https://gitlab.freedesktop.org/drm/intel/issues/3012
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
[i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4258]: https://gitlab.freedesktop.org/drm/intel/issues/4258
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#5982]: https://gitlab.freedesktop.org/drm/intel/issues/5982
[i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
[i915#6816]: https://gitlab.freedesktop.org/drm/intel/issues/6816
[i915#6997]: https://gitlab.freedesktop.org/drm/intel/issues/6997
Build changes
-------------
* Linux: CI_DRM_12206 -> Patchwork_109372v1
CI-20190529: 20190529
CI_DRM_12206: eeba73dc310025dbbf2edf81098cd114cbcec54b @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_6674: 2df7563a01b0b0242c6dd16c3d80e6713a51b66b @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_109372v1: eeba73dc310025dbbf2edf81098cd114cbcec54b @ git://anongit.freedesktop.org/gfx-ci/linux
### Linux commits
2f8cf0f34575 drm/i915/pmu: Match frequencies reported by PMU and sysfs
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/index.html
Patchwork
CI[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/pmu: Match frequencies reported by PMU and sysfs
In reply to Ashutosh Dixit== Series Details ==
== Series Details ==
Series: drm/i915/pmu: Match frequencies reported by PMU and sysfs
URL : https://patchwork.freedesktop.org/series/109372/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_12206_full -> Patchwork_109372v1_full
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_109372v1_full absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_109372v1_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
Participating hosts (12 -> 9)
------------------------------
Missing (3): shard-rkl shard-dg1 shard-tglu
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_109372v1_full:
### IGT changes ###
#### Possible regressions ####
* igt@perf_pmu@frequency-idle:
- shard-apl: [PASS][1] -> [FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/shard-apl8/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-apl6/igt@[email protected]
- shard-tglb: [PASS][3] -> [FAIL][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/shard-tglb3/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-tglb8/igt@[email protected]
- shard-glk: [PASS][5] -> [FAIL][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/shard-glk1/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-glk9/igt@[email protected]
- shard-iclb: [PASS][7] -> [FAIL][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/shard-iclb2/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-iclb8/igt@[email protected]
Known issues
------------
Here are the changes found in Patchwork_109372v1_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_eio@in-flight-contexts-10ms:
- shard-apl: [PASS][9] -> [TIMEOUT][10] ([i915#3063])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/shard-apl6/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-apl1/igt@[email protected]
* igt@gem_exec_balancer@parallel-bb-first:
- shard-iclb: [PASS][11] -> [SKIP][12] ([i915#4525]) +2 similar issues
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/shard-iclb2/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-iclb7/igt@[email protected]
* igt@gem_exec_fair@basic-none-solo@rcs0:
- shard-apl: [PASS][13] -> [FAIL][14] ([i915#2842])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/shard-apl8/igt@gem_exec_fair@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-apl1/igt@gem_exec_fair@[email protected]
* igt@gem_exec_fair@basic-none@vcs1:
- shard-iclb: NOTRUN -> [FAIL][15] ([i915#2842])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-iclb2/igt@gem_exec_fair@[email protected]
* igt@gem_exec_fair@basic-pace-share@rcs0:
- shard-glk: [PASS][16] -> [FAIL][17] ([i915#2842])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/shard-glk8/igt@gem_exec_fair@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-glk8/igt@gem_exec_fair@[email protected]
* igt@gem_exec_fair@basic-pace@bcs0:
- shard-tglb: [PASS][18] -> [FAIL][19] ([i915#2842]) +1 similar issue
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/shard-tglb5/igt@gem_exec_fair@[email protected]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-tglb5/igt@gem_exec_fair@[email protected]
* igt@gem_workarounds@suspend-resume:
- shard-apl: [PASS][20] -> [DMESG-WARN][21] ([i915#180]) +7 similar issues
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/shard-apl3/igt@[email protected]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-apl1/igt@[email protected]
* igt@gen9_exec_parse@allowed-all:
- shard-glk: [PASS][22] -> [DMESG-WARN][23] ([i915#5566] / [i915#716])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/shard-glk5/igt@[email protected]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-glk6/igt@[email protected]
* igt@i915_pm_dc@dc6-psr:
- shard-iclb: [PASS][24] -> [FAIL][25] ([i915#3989] / [i915#454])
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/shard-iclb2/igt@[email protected]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-iclb7/igt@[email protected]
* igt@i915_selftest@live@hangcheck:
- shard-tglb: [PASS][26] -> [DMESG-WARN][27] ([i915#5591])
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/shard-tglb7/igt@i915_selftest@[email protected]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-tglb1/igt@i915_selftest@[email protected]
* igt@kms_addfb_basic@legacy-format:
- shard-tglb: [PASS][28] -> [INCOMPLETE][29] ([i915#6987])
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/shard-tglb5/igt@[email protected]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-tglb5/igt@[email protected]
* igt@kms_big_fb@x-tiled-8bpp-rotate-90:
- shard-apl: NOTRUN -> [SKIP][30] ([fdo#109271])
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-apl7/igt@[email protected]
* igt@kms_chamelium@dp-edid-change-during-suspend:
- shard-apl: NOTRUN -> [SKIP][31] ([fdo#109271] / [fdo#111827])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-apl7/igt@[email protected]
* igt@kms_flip@flip-vs-suspend@d-edp1:
- shard-tglb: [PASS][32] -> [DMESG-WARN][33] ([i915#2411] / [i915#2867])
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/shard-tglb2/igt@kms_flip@[email protected]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-tglb3/igt@kms_flip@[email protected]
* igt@kms_flip_scaled_crc@flip-64bpp-4tile-to-16bpp-4tile-downscaling@pipe-a-valid-mode:
- shard-iclb: NOTRUN -> [SKIP][34] ([i915#2587] / [i915#2672]) +2 similar issues
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-iclb8/igt@kms_flip_scaled_crc@flip-64bpp-4tile-to-16bpp-4tile-downscaling@pipe-a-valid-mode.html
* igt@kms_flip_scaled_crc@flip-64bpp-yftile-to-32bpp-yftile-upscaling@pipe-a-default-mode:
- shard-iclb: NOTRUN -> [SKIP][35] ([i915#2672]) +4 similar issues
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-iclb2/igt@kms_flip_scaled_crc@flip-64bpp-yftile-to-32bpp-yftile-upscaling@pipe-a-default-mode.html
* igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-32bpp-ytilegen12rcccs-upscaling@pipe-a-default-mode:
- shard-iclb: NOTRUN -> [SKIP][36] ([i915#2672] / [i915#3555])
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-iclb2/igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-32bpp-ytilegen12rcccs-upscaling@pipe-a-default-mode.html
* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-render:
- shard-glk: [PASS][37] -> [FAIL][38] ([i915#1888] / [i915#2546])
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/shard-glk5/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-render.html
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-glk7/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-render.html
* igt@kms_plane_scaling@plane-downscale-with-pixel-format-factor-0-5@pipe-b-edp-1:
- shard-iclb: [PASS][39] -> [SKIP][40] ([i915#5176]) +2 similar issues
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/shard-iclb8/igt@kms_plane_scaling@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-iclb2/igt@kms_plane_scaling@[email protected]
* igt@kms_plane_scaling@planes-unity-scaling-downscale-factor-0-5@pipe-c-edp-1:
- shard-iclb: [PASS][41] -> [SKIP][42] ([i915#5235]) +5 similar issues
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/shard-iclb8/igt@kms_plane_scaling@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-iclb2/igt@kms_plane_scaling@[email protected]
* igt@kms_psr@psr2_sprite_blt:
- shard-iclb: [PASS][43] -> [SKIP][44] ([fdo#109441]) +4 similar issues
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/shard-iclb2/igt@kms_psr@psr2_sprite_blt.html
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-iclb3/igt@kms_psr@psr2_sprite_blt.html
* igt@kms_vblank@pipe-b-ts-continuation-dpms-suspend:
- shard-snb: [PASS][45] -> [FAIL][46] ([fdo#103375])
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/shard-snb6/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-snb5/igt@[email protected]
* igt@sysfs_timeslice_duration@timeout@vecs0:
- shard-tglb: [PASS][47] -> [FAIL][48] ([i915#1755])
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/shard-tglb8/igt@sysfs_timeslice_duration@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-tglb7/igt@sysfs_timeslice_duration@[email protected]
#### Possible fixes ####
* igt@gem_exec_balancer@parallel-keep-in-fence:
- shard-iclb: [SKIP][49] ([i915#4525]) -> [PASS][50] +1 similar issue
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/shard-iclb8/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-iclb2/igt@[email protected]
* igt@gem_exec_fair@basic-pace-solo@rcs0:
- shard-apl: [FAIL][51] ([i915#2842]) -> [PASS][52]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/shard-apl7/igt@gem_exec_fair@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-apl3/igt@gem_exec_fair@[email protected]
* igt@gem_spin_batch@spin-each:
- shard-apl: [FAIL][53] ([i915#2898]) -> [PASS][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/shard-apl8/igt@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-apl6/igt@[email protected]
* igt@i915_pm_dc@dc6-dpms:
- shard-iclb: [FAIL][55] ([i915#3989] / [i915#454]) -> [PASS][56]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/shard-iclb3/igt@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-iclb2/igt@[email protected]
* igt@kms_flip@flip-vs-suspend-interruptible@c-dp1:
- shard-apl: [DMESG-WARN][57] ([i915#180]) -> [PASS][58]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/shard-apl1/igt@kms_flip@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-apl7/igt@kms_flip@[email protected]
* igt@kms_flip_scaled_crc@flip-64bpp-xtile-to-16bpp-xtile-downscaling@pipe-a-default-mode:
- shard-iclb: [SKIP][59] ([i915#3555]) -> [PASS][60] +1 similar issue
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/shard-iclb2/igt@kms_flip_scaled_crc@flip-64bpp-xtile-to-16bpp-xtile-downscaling@pipe-a-default-mode.html
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-iclb3/igt@kms_flip_scaled_crc@flip-64bpp-xtile-to-16bpp-xtile-downscaling@pipe-a-default-mode.html
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-mmap-cpu:
- shard-glk: [FAIL][61] ([i915#1888] / [i915#2546]) -> [PASS][62] +1 similar issue
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/shard-glk5/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-mmap-cpu.html
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-glk7/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-mmap-cpu.html
* igt@kms_plane_scaling@planes-upscale-factor-0-25-downscale-factor-0-5@pipe-a-edp-1:
- shard-iclb: [SKIP][63] ([i915#5235]) -> [PASS][64] +2 similar issues
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/shard-iclb2/igt@kms_plane_scaling@planes-upscale-factor-0-25-downscale-factor-0-5@pipe-a-edp-1.html
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-iclb3/igt@kms_plane_scaling@planes-upscale-factor-0-25-downscale-factor-0-5@pipe-a-edp-1.html
* igt@kms_psr@psr2_dpms:
- shard-iclb: [SKIP][65] ([fdo#109441]) -> [PASS][66] +2 similar issues
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/shard-iclb8/igt@kms_psr@psr2_dpms.html
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-iclb2/igt@kms_psr@psr2_dpms.html
* igt@sysfs_timeslice_duration@timeout@vecs0:
- shard-apl: [FAIL][67] ([i915#1755]) -> [PASS][68]
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/shard-apl6/igt@sysfs_timeslice_duration@[email protected]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-apl1/igt@sysfs_timeslice_duration@[email protected]
#### Warnings ####
* igt@gem_exec_balancer@parallel-ordering:
- shard-iclb: [FAIL][69] ([i915#6117]) -> [SKIP][70] ([i915#4525])
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/shard-iclb1/igt@[email protected]
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-iclb5/igt@[email protected]
* igt@kms_psr2_sf@overlay-plane-move-continuous-sf:
- shard-iclb: [SKIP][71] ([i915#658]) -> [SKIP][72] ([i915#2920])
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/shard-iclb8/igt@[email protected]
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-iclb2/igt@[email protected]
* igt@kms_psr2_sf@primary-plane-update-sf-dmg-area:
- shard-iclb: [SKIP][73] ([i915#2920]) -> [SKIP][74] ([fdo#111068] / [i915#658])
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/shard-iclb2/igt@[email protected]
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-iclb7/igt@[email protected]
* igt@runner@aborted:
- shard-apl: ([FAIL][75], [FAIL][76], [FAIL][77]) ([i915#180] / [i915#3002] / [i915#4312]) -> ([FAIL][78], [FAIL][79], [FAIL][80], [FAIL][81], [FAIL][82], [FAIL][83], [FAIL][84], [FAIL][85], [FAIL][86]) ([fdo#109271] / [i915#180] / [i915#3002] / [i915#4312])
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/shard-apl8/igt@[email protected]
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/shard-apl1/igt@[email protected]
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12206/shard-apl2/igt@[email protected]
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-apl8/igt@[email protected]
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-apl8/igt@[email protected]
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-apl8/igt@[email protected]
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-apl3/igt@[email protected]
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-apl3/igt@[email protected]
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-apl2/igt@[email protected]
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-apl2/igt@[email protected]
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-apl1/igt@[email protected]
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109372v1/shard-apl1/igt@[email protected]
[fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#1755]: https://gitlab.freedesktop.org/drm/intel/issues/1755
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#1888]: https://gitlab.freedesktop.org/drm/intel/issues/1888
[i915#2411]: https://gitlab.freedesktop.org/drm/intel/issues/2411
[i915#2546]: https://gitlab.freedesktop.org/drm/intel/issues/2546
[i915#2587]: https://gitlab.freedesktop.org/drm/intel/issues/2587
[i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
[i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
[i915#2867]: https://gitlab.freedesktop.org/drm/intel/issues/2867
[i915#2898]: https://gitlab.freedesktop.org/drm/intel/issues/2898
[i915#2920]: https://gitlab.freedesktop.org/drm/intel/issues/2920
[i915#3002]: https://gitlab.freedesktop.org/drm/intel/issues/3002
[i915#3063]: https://gitlab.freedesktop.org/drm/intel/issues/3063
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3989]: https://gitlab.freedesktop.org/drm/intel/issues/3989
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4525]: https://gitlab.freedesktop.org/drm/intel/issues/4525
[i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
[i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176
[i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235
[i915#5566]: https://gitlab.freedesktop.org/drm/intel/issues/5566
[i915#5591]: https://gitlab.freedesktop.org/drm/intel/issues/5591
[i915#6117]: https://gitlab.freedesktop.org/drm/intel/issues/6117
[i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
[i915#6987]: https://gitlab.freedesktop.org/drm/intel/issues/6987
[i915#716]: https://gitlab.freedesktop.org/drm/intel/issues/716
Build changes
-------------
* Linux: CI_DRM_12206 -> Patchwork_109372v1
CI-20190529: 20190529
CI_DRM_12206: eeba73dc310025dbbf2edf81098cd114cbcec54b @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_6674: 2df7563a01b0b0242c6dd16c3d80e6713a51b66b @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_109372v1: eeba73dc310025dbbf2edf81098cd114cbcec54b @ 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_109372v1/index.html
Quoted 52 lines · Ashutosh Dixit
PMU and sysfs use different wakeref's to "interpret" zero freq. Sysfs uses runtime PM wakeref (see
intel_rps_read_punit_reqandintel_rps_read_actual_frequency). PMU uses the GT parked/unparked wakeref. In general the GT wakeref is held for less time that the runtime PM wakeref which causes PMU to report a lower average freq than the average freq obtained from sampling sysfs.To resolve this, use the same freq functions (and wakeref's) in PMU as those used in sysfs.
Reported-by Ashwin Kumar Kulkarni <[email protected]>Cc Tvrtko Ursulin <[email protected]>Signed-off-by Ashutosh Dixit <[email protected]>--- drivers/gpu/drm/i915/i915_pmu.c | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-)drivers/gpu/drm/i915/i915_pmu.c +0
-19@@ -371,37 +371,16 @@ static void frequency_sample(struct intel_gt *gt, unsigned int period_ns) { struct drm_i915_private *i915 = gt->i915; -struct intel_uncore *uncore = gt->uncore;struct i915_pmu *pmu = &i915->pmu;struct intel_rps *rps = >->rps;if (!frequency_sampling_enabled (pmu))return ; -/* Report 0/0 (actual/requested) frequency while parked. */ -if (!intel_gt_pm_get_if_awake (gt)) -return ; -if (pmu->enable &config_mask (I915_PMU_ACTUAL_FREQUENCY )) { -u32 val; - -/* -* We take a quick peek here without using forcewake -* so that we don't perturb the system under observation -* (forcewake => !rc6 => increased power use). We expect -* that if the read fails because it is outside of the -* mmio power well, then it will return 0 -- in which -* case we assume the system is running at the intended -* frequency. Fortunately, the read should rarely fail! -*/ - val =intel_uncore_read_fw (uncore,GEN6_RPSTAT1 ); -if (val) - val =intel_rps_get_cagf (rps, val);
drivers/gpu/drm/i915/i915_pmu.c static void · line 386
Quoted 10 lines
drivers/gpu/drm/i915/i915_pmu.c +2
-4-else - val = rps->cur_freq; -add_sample_mult (&pmu->sample[__I915_SAMPLE_FREQ_ACT], -intel_gpu_freq (rps, val), period_ns /1000 ); +intel_rps_read_actual_frequency (rps), + period_ns /1000 ); }if (pmu->enable &config_mask (I915_PMU_REQUESTED_FREQUENCY )) {
What is software tracking of requested frequency showing when GT is parked or runtime suspended? With this change sampling would be outside any such checks so we need to be sure reported value makes sense.
Although more important open is around what is actually correct.
For instance how does the patch affect RC6 and power? I don't know how power management of different blocks is wired up, so personally I would only be able to look at it empirically. In other words what I am asking is this - if we changed from skipping obtaining forcewake even when unparked, to obtaining forcewake if not runtime suspended - what hardware blocks does that power up and how it affects RC6 and power? Can it affect actual frequency or not? (Will "something" power up the clocks just because we will be getting forcewake?)
Or maybe question simplified - does 200Hz polling on existing sysfs actual frequency field disturbs the system under some circumstances? (Increases power and decreases RC6.) If it does then that would be a problem. We want a solution which shows the real data, but where the act of monitoring itself does not change it too much. If it doesn't then it's okay.
Could you somehow investigate on these topics? Maybe log RAPL GPU power while polling on sysfs, versus getting the actual frequency from the existing PMU implementation and see if that shows anything? Or actually simpler - RAPL GPU power for current PMU intel_gpu_top versus this patch? On idle(-ish) desktop workloads perhaps? Power and frequency graphed for both.
Regards,
Tvrtko
Quoted 9 lines
drivers/gpu/drm/i915/i915_pmu.c +0
-2@@ -409,8 +388,6 @@ frequency_sample(struct intel_gt *gt, unsigned int period_ns)intel_rps_get_requested_frequency (rps), period_ns / 1000); } - -intel_gt_pm_put_async (gt); }static enum hrtimer_restart i915_sample (struct hrtimer *hrtimer)
Quoted 64 lines · Tvrtko Ursulin
Quoted 49 lines · Ashutosh Dixit
PMU and sysfs use different wakeref's to "interpret" zero freq. Sysfs uses runtime PM wakeref (see
intel_rps_read_punit_reqandintel_rps_read_actual_frequency). PMU uses the GT parked/unparked wakeref. In general the GT wakeref is held for less time that the runtime PM wakeref which causes PMU to report a lower average freq than the average freq obtained from sampling sysfs.To resolve this, use the same freq functions (and wakeref's) in PMU as those used in sysfs.
Reported-by Ashwin Kumar Kulkarni <[email protected]>Cc Tvrtko Ursulin <[email protected]>Signed-off-by Ashutosh Dixit <[email protected]>---
drivers/gpu/drm/i915/i915_pmu.c| 27 ++-------------------------1 file changed, 2 insertions(+), 25 deletions(-)drivers/gpu/drm/i915/i915_pmu.c +0
-18@@ -371,37 +371,16 @@ static void frequency_sample(struct intel_gt *gt, unsigned int period_ns) { struct drm_i915_private *i915 = gt->i915; - struct intel_uncore *uncore = gt->uncore; struct i915_pmu *pmu = &i915->pmu; struct intel_rps *rps = >->rps; if (!frequency_sampling_enabled(pmu)) return; - /* Report 0/0 (actual/requested) frequency while parked. */ - if (!intel_gt_pm_get_if_awake(gt)) - return; - if (pmu->enable & config_mask(I915_PMU_ACTUAL_FREQUENCY)) { - u32 val; - - /* - * We take a quick peek here without using forcewake - * so that we don't perturb the system under observation - * (forcewake => !rc6 => increased power use). We expect - * that if the read fails because it is outside of the - * mmio power well, then it will return 0 -- in which - * case we assume the system is running at the intended - * frequency. Fortunately, the read should rarely fail! - */ - val = intel_uncore_read_fw(uncore, GEN6_RPSTAT1); - if (val)drivers/gpu/drm/i915/i915_pmu.c static void · line 383
Quoted 10 lines
drivers/gpu/drm/i915/i915_pmu.c +2
-5- val = intel_rps_get_cagf(rps, val); - else - val = rps->cur_freq; - add_sample_mult(&pmu->sample[__I915_SAMPLE_FREQ_ACT], - intel_gpu_freq(rps, val), period_ns / 1000); + intel_rps_read_actual_frequency(rps), + period_ns / 1000); } if (pmu->enable & config_mask(I915_PMU_REQUESTED_FREQUENCY)) {What is software tracking of requested frequency showing when GT is parked or runtime suspended? With this change sampling would be outside any such checks so we need to be sure reported value makes sense.
Quoted 7 lines
Although more important open is around what is actually correct.
For instance how does the patch affect RC6 and power? I don't know how power management of different blocks is wired up, so personally I would only be able to look at it empirically. In other words what I am asking is this - if we changed from skipping obtaining forcewake even when unparked, to obtaining forcewake if not runtime suspended - what hardware blocks does that power up and how it affects RC6 and power? Can it affect actual frequency or not? (Will "something" power up the clocks just because we will be getting forcewake?)
Or maybe question simplified - does 200Hz polling on existing sysfs actual frequency field disturbs the system under some circumstances? (Increases power and decreases RC6.) If it does then that would be a problem. We want a solution which shows the real data, but where the act of monitoring itself does not change it too much. If it doesn't then it's okay.
Could you somehow investigate on these topics? Maybe log RAPL GPU power while polling on sysfs, versus getting the actual frequency from the existing PMU implementation and see if that shows anything? Or actually simpler - RAPL GPU power for current PMU
intel_gpu_topversus this patch? On idle(-ish) desktop workloads perhaps? Power and frequency graphed for both.
Another thought - considering that bspec says for 0xa01c "This register reflects real-time values and thus does not have a pre-determined default value out of reset" - could it be that it also does not reflect a real value when GPU is not executing anything (so zero), just happens to be not runtime suspended? That would mean sysfs reads could maybe show last known value? Just a thought to check.
I've also tried on my Alderlake desktop:
1)
while true; do cat gt_act_freq_mhz >/dev/null; sleep 0.005; done
This costs ~120mW of GPU power and ~20% decrease in RC6.
2)
intel_gpu_top -l -s 5 >/dev/null
This costs no power or RC6.
I have also never observed sysfs to show below min freq. This was with no desktop so it's possible this register indeed does not reflect the real situation when things are idle.
So I think it is possible sysfs value is the misleading one.
Regards,
Tvrtko
Quoted 80 lines · Tvrtko Ursulin
Quoted 64 lines · Tvrtko Ursulin
Quoted 49 lines · Ashutosh Dixit
PMU and sysfs use different wakeref's to "interpret" zero freq. Sysfs uses runtime PM wakeref (see
intel_rps_read_punit_reqandintel_rps_read_actual_frequency). PMU uses the GT parked/unparked wakeref. In general the GT wakeref is held for less time that the runtime PM wakeref which causes PMU to report a lower average freq than the average freq obtained from sampling sysfs.To resolve this, use the same freq functions (and wakeref's) in PMU as those used in sysfs.
Reported-by Ashwin Kumar Kulkarni <[email protected]>Cc Tvrtko Ursulin <[email protected]>Signed-off-by Ashutosh Dixit <[email protected]>---
drivers/gpu/drm/i915/i915_pmu.c| 27 ++-------------------------1 file changed, 2 insertions(+), 25 deletions(-)drivers/gpu/drm/i915/i915_pmu.c +0
-18@@ -371,37 +371,16 @@ static void frequency_sample(struct intel_gt *gt, unsigned int period_ns) { struct drm_i915_private *i915 = gt->i915; - struct intel_uncore *uncore = gt->uncore; struct i915_pmu *pmu = &i915->pmu; struct intel_rps *rps = >->rps; if (!frequency_sampling_enabled(pmu)) return; - /* Report 0/0 (actual/requested) frequency while parked. */ - if (!intel_gt_pm_get_if_awake(gt)) - return; - if (pmu->enable & config_mask(I915_PMU_ACTUAL_FREQUENCY)) { - u32 val; - - /* - * We take a quick peek here without using forcewake - * so that we don't perturb the system under observation - * (forcewake => !rc6 => increased power use). We expect - * that if the read fails because it is outside of the - * mmio power well, then it will return 0 -- in which - * case we assume the system is running at the intended - * frequency. Fortunately, the read should rarely fail! - */ - val = intel_uncore_read_fw(uncore, GEN6_RPSTAT1); - if (val)drivers/gpu/drm/i915/i915_pmu.c static void · line 383
Quoted 10 lines
drivers/gpu/drm/i915/i915_pmu.c +2
-5- val = intel_rps_get_cagf(rps, val); - else - val = rps->cur_freq; - add_sample_mult(&pmu->sample[__I915_SAMPLE_FREQ_ACT], - intel_gpu_freq(rps, val), period_ns / 1000); + intel_rps_read_actual_frequency(rps), + period_ns / 1000); } if (pmu->enable & config_mask(I915_PMU_REQUESTED_FREQUENCY)) {What is software tracking of requested frequency showing when GT is parked or runtime suspended? With this change sampling would be outside any such checks so we need to be sure reported value makes sense.
Quoted 7 lines
Although more important open is around what is actually correct.
For instance how does the patch affect RC6 and power? I don't know how power management of different blocks is wired up, so personally I would only be able to look at it empirically. In other words what I am asking is this - if we changed from skipping obtaining forcewake even when unparked, to obtaining forcewake if not runtime suspended - what hardware blocks does that power up and how it affects RC6 and power? Can it affect actual frequency or not? (Will "something" power up the clocks just because we will be getting forcewake?)
Or maybe question simplified - does 200Hz polling on existing sysfs actual frequency field disturbs the system under some circumstances? (Increases power and decreases RC6.) If it does then that would be a problem. We want a solution which shows the real data, but where the act of monitoring itself does not change it too much. If it doesn't then it's okay.
Could you somehow investigate on these topics? Maybe log RAPL GPU power while polling on sysfs, versus getting the actual frequency from the existing PMU implementation and see if that shows anything? Or actually simpler - RAPL GPU power for current PMU
intel_gpu_topversus this patch? On idle(-ish) desktop workloads perhaps? Power and frequency graphed for both.Another thought - considering that bspec says for
0xa01c"This register reflects real-time values and thus does not have a pre-determined default value out of reset" - could it be that it also does not reflect a real value when GPU is not executing anything (so zero), just happens to be not runtime suspended? That would mean sysfs reads could maybe show last known value? Just a thought to check.I've also tried on my Alderlake desktop:
1)
Quoted 8 lines
while true; do cat
gt_act_freq_mhz>/dev/null; sleep 0.005; doneThis costs ~120mW of GPU power and ~20% decrease in RC6.
2)
intel_gpu_top-l -s 5 >/dev/null
This "-s 5" was pointless though. :)
Regards,
Tvrtko
Quoted 10 lines
This costs no power or RC6.
I have also never observed sysfs to show below min freq. This was with no desktop so it's possible this register indeed does not reflect the real situation when things are idle.
So I think it is possible sysfs value is the misleading one.
Regards,
Tvrtko
Quoted 1 line · Tvrtko Ursulin
Hi Tvrtko,
Quoted 96 lines · Tvrtko Ursulin
Quoted 87 lines · Ashutosh Dixit
Quoted 52 lines
PMU and sysfs use different wakeref's to "interpret" zero freq. Sysfs uses
runtime PM wakeref (seeintel_rps_read_punit_reqandintel_rps_read_actual_frequency). PMU uses the GT parked/unparked wakeref. In general the GT wakeref is held for less time that the runtime PM wakeref which causes PMU to report a lower average freq than the average
freq obtained from sampling sysfs.To resolve this, use the same freq functions (and wakeref's) in PMU as those used in sysfs.
Reported-by Ashwin Kumar Kulkarni <[email protected]>Cc Tvrtko Ursulin <[email protected]>Signed-off-by Ashutosh Dixit <[email protected]>---
drivers/gpu/drm/i915/i915_pmu.c| 27 ++-------------------------1 file changed, 2 insertions(+), 25 deletions(-)drivers/gpu/drm/i915/i915_pmu.c +0
-18@@ -371,37 +371,16 @@ static void frequency_sample(struct intel_gt *gt, unsigned int period_ns) { struct drm_i915_private *i915 = gt->i915; - struct intel_uncore *uncore = gt->uncore; struct i915_pmu *pmu = &i915->pmu; struct intel_rps *rps = >->rps; if (!frequency_sampling_enabled(pmu)) return; - /* Report 0/0 (actual/requested) frequency while parked. */ - if (!intel_gt_pm_get_if_awake(gt)) - return; - if (pmu->enable & config_mask(I915_PMU_ACTUAL_FREQUENCY)) { - u32 val; - - /* - * We take a quick peek here without using forcewake - * so that we don't perturb the system under observation - * (forcewake => !rc6 => increased power use). We expect - * that if the read fails because it is outside of the - * mmio power well, then it will return 0 -- in which - * case we assume the system is running at the intended - * frequency. Fortunately, the read should rarely fail! - */ - val = intel_uncore_read_fw(uncore, GEN6_RPSTAT1); - if (val)drivers/gpu/drm/i915/i915_pmu.c static void · line 383
Quoted 10 lines
drivers/gpu/drm/i915/i915_pmu.c +2
-5- val = intel_rps_get_cagf(rps, val); - else - val = rps->cur_freq; - add_sample_mult(&pmu->sample[__I915_SAMPLE_FREQ_ACT], - intel_gpu_freq(rps, val), period_ns / 1000); + intel_rps_read_actual_frequency(rps), + period_ns / 1000); } if (pmu->enable & config_mask(I915_PMU_REQUESTED_FREQUENCY)) {What is software tracking of requested frequency showing when GT is parked or runtime suspended? With this change sampling would be outside any such checks so we need to be sure reported value makes sense.
Although more important open is around what is actually correct.
For instance how does the patch affect RC6 and power? I don't know how power management of different blocks is wired up, so personally I would only be able to look at it empirically. In other words what I am asking is this - if we changed from skipping obtaining forcewake even when unparked, to obtaining forcewake if not runtime suspended - what hardware blocks does that power up and how it affects RC6 and power? Can it affect actual frequency or not? (Will "something" power up the clocks just because we will be getting forcewake?)
Or maybe question simplified - does 200Hz polling on existing sysfs actual frequency field disturbs the system under some circumstances? (Increases power and decreases RC6.) If it does then that would be a problem. We want a solution which shows the real data, but where the act of monitoring itself does not change it too much. If it doesn't then it's okay.
Quoted 6 lines
Could you somehow investigate on these topics? Maybe log RAPL GPU power while polling on sysfs, versus getting the actual frequency from the existing PMU implementation and see if that shows anything? Or actually simpler - RAPL GPU power for current PMU
intel_gpu_topversus this patch? On idle(-ish) desktop workloads perhaps? Power and frequency graphed for both.
Quoted 6 lines
Another thought - considering that bspec says for
0xa01c"This register reflects real-time values and thus does not have a pre-determined default value out of reset" - could it be that it also does not reflect a real value when GPU is not executing anything (so zero), just happens to be not runtime suspended? That would mean sysfs reads could maybe show last known value? Just a thought to check.
Thanks for the suggestion, I'll try to check and report what I find.
Quoted 6 lines
I've also tried on my Alderlake desktop:
1)
while true; do cat
gt_act_freq_mhz>/dev/null; sleep 0.005; done
Quoted 8 lines
This costs ~120mW of GPU power and ~20% decrease in RC6.
2)
intel_gpu_top-l -s 5 >/dev/nullThis costs no power or RC6.
Thanks for the experiments. As I mentioned for Gen12+ is a different register which doesn't require taking a forcewake (it's not upstream yet but you can see it in this patch:
https://patchwork.freedesktop.org/patch/504920/?series=109116&rev=1#comment_910146)
so this issue should not be there at least for Gen12+.
Quoted 5 lines
I have also never observed sysfs to show below min freq. This was with no desktop so it's possible this register indeed does not reflect the real situation when things are idle.
So I think it is possible sysfs value is the misleading one.
Thanks I will check. The other possibility is if someone is holding a forcewake, the products where we are seeing this is have GuC controlling the both the frequency (SLPC) as well RC6 (GUCRC).
Thanks.
--
Ashutosh