drm/i915/selftests: Verify frequency scaling with RPS
Subsystems (2)
PATCH 1/3 drm/i915/selftests: Verify frequency scaling with RPS
One of the core tenents of reclocking the GPU is that its throughput scales with the clock frequency. We can observe this by incrementing a loop counter on the GPU, and compare the different execution rates at the notional RPS frequencies.
--- drivers/gpu/drm/i915/gt/selftest_gt_pm.c | 3 +- drivers/gpu/drm/i915/gt/selftest_rps.c | 246 +++++++++++++++++++++-- drivers/gpu/drm/i915/gt/selftest_rps.h | 1 + 3 files changed, 237 insertions(+), 13 deletions(-)
drivers/gpu/drm/i915/gt/selftest_gt_pm.c +2 -1
@@ -53,8 +53,9 @@ int intel_gt_pm_live_selftests(struct drm_i915_private *i915) {static const struct i915_subtest tests[] = {SUBTEST (live_rc6_manual), -SUBTEST (live_rps_interrupt), +SUBTEST (live_rps_frequency),SUBTEST (live_rps_power), +SUBTEST (live_rps_interrupt),SUBTEST (live_gt_resume), };
drivers/gpu/drm/i915/gt/selftest_rps.c +234 -12
264 lines not on this page · raw message
drivers/gpu/drm/i915/gt/selftest_rps.h +1 -0
@@ -6,6 +6,7 @@#ifndef SELFTEST_RPS_H #define SELFTEST_RPS_H +int live_rps_frequency (void *arg);int live_rps_interrupt (void *arg);int live_rps_power (void *arg);
Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/3 drm/i915/selftests: Skip energy consumption tests if not controlling freq
If we can not manipulate the frequency with RPS, then comparing min/max power consumption is pointless / misleading. We will leave the warning about not being able to control the frequency selection via RPS to other tests so as not to confuse this more specialised check.
--- drivers/gpu/drm/i915/gt/selftest_rps.c | 37 ++++++++++++++++---------- 1 file changed, 23 insertions(+), 14 deletions(-)
drivers/gpu/drm/i915/gt/selftest_rps.c +23 -14
@@ -482,26 +482,21 @@ static u64 __measure_power(int duration_ms)return div64_u64 (1000 *1000 * dE, dt); } -static u64 measure_power_at (struct intel_rps *rps,int freq) +static u64 measure_power_at (struct intel_rps *rps,int *freq) {u64 x[5 ];int i;mutex_lock (&rps->lock);GEM_BUG_ON (!rps->active); -intel_rps_set (rps, freq); +intel_rps_set (rps, *freq);mutex_unlock (&rps->lock);msleep (20 );/* more than enough time to stabilise! */ - i =read_cagf (rps); -if (i != freq) -pr_notice ("Running at %x [%uMHz], not target %x [%uMHz]\n" , - i,intel_gpu_freq (rps, i), - freq,intel_gpu_freq (rps, freq)); -for (i =0 ; i <5 ; i++) x[i] =__measure_power (5 ); + *freq =read_cagf (rps);/* A simple triangle filter for better result stability */ sort (x,5 ,sizeof (*x), cmp_u64,NULL );
@@ -539,7 +534,10 @@ int live_rps_power(void *arg)for_each_engine (engine, gt, id) {struct i915_request *rq; -u64 min, max; +struct { +u64 power; +int freq; + } min, max;if (!intel_engine_can_store_dword (engine))continue ;
@@ -562,16 +560,27 @@ int live_rps_power(void *arg)break ; } - max =measure_power_at (rps, rps->max_freq); - min =measure_power_at (rps, rps->min_freq); + max.freq = rps->max_freq; + max.power =measure_power_at (rps, &max.freq); + + min.freq = rps->min_freq; + min.power =measure_power_at (rps, &min.freq);igt_spinner_end (&spin);pr_info ("%s: min:%llumW @ %uMHz, max:%llumW @ %uMHz\n" , engine->name, - min,intel_gpu_freq (rps, rps->min_freq), - max,intel_gpu_freq (rps, rps->max_freq)); -if (11 * min >10 * max) { + min.power,intel_gpu_freq (rps, min.freq), + max.power,intel_gpu_freq (rps, max.freq)); + +if (10 * min.freq >=9 * max.freq) { +pr_notice ("Could not control frequency, ran at [%d:%uMHz, %d:%uMhz]\n" , + min.freq,intel_gpu_freq (rps, min.freq), + max.freq,intel_gpu_freq (rps, max.freq)); +continue ; + } + +if (11 * min.power >10 * max.power) {pr_err ("%s: did not conserve power when setting lower frequency!\n" , engine->name); err = -EINVAL ;
Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/3 drm/i915/selftests: Check RPS controls
In reply to Chris WilsonCheck that the GPU does respond to our RPS frequency requests by setting our desired frequency.
--- drivers/gpu/drm/i915/gt/selftest_gt_pm.c | 1 + drivers/gpu/drm/i915/gt/selftest_rps.c | 192 ++++++++++++++++++++--- drivers/gpu/drm/i915/gt/selftest_rps.h | 1 + 3 files changed, 170 insertions(+), 24 deletions(-)
drivers/gpu/drm/i915/gt/selftest_gt_pm.c +1 -0
@@ -53,6 +53,7 @@ int intel_gt_pm_live_selftests(struct drm_i915_private *i915) {static const struct i915_subtest tests[] = {SUBTEST (live_rc6_manual), +SUBTEST (live_rps_control),SUBTEST (live_rps_frequency),SUBTEST (live_rps_power),SUBTEST (live_rps_interrupt),
drivers/gpu/drm/i915/gt/selftest_rps.c +168 -24
226 lines not on this page · raw message
drivers/gpu/drm/i915/gt/selftest_rps.h +1 -0
@@ -6,6 +6,7 @@#ifndef SELFTEST_RPS_H #define SELFTEST_RPS_H +int live_rps_control (void *arg);int live_rps_frequency (void *arg);int live_rps_interrupt (void *arg);int live_rps_power (void *arg);
Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.DOCS: warning for series starting with [CI,1/3] drm/i915/selftests: Verify frequency scaling with RPS
In reply to Chris Wilson== Series Details ==
== Series Details ==
Series: series starting with [CI,1/3] drm/i915/selftests: Verify frequency scaling with RPS
URL : https://patchwork.freedesktop.org/series/76153/
State : warning
== Summary ==
$ make htmldocs 2>&1 > /dev/null | grep i915 /home/cidrm/kernel/Documentation/gpu/i915.rst:610: WARNING: duplicate label gpu/i915:layout, other instance in /home/cidrm/kernel/Documentation/gpu/i915.rst
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [CI,1/3] drm/i915/selftests: Verify frequency scaling with RPS
In reply to Chris Wilson== Series Details ==
== Series Details ==
Series: series starting with [CI,1/3] drm/i915/selftests: Verify frequency scaling with RPS
URL : https://patchwork.freedesktop.org/series/76153/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_8323 -> Patchwork_17368
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_17368 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_17368, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17368/index.html
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_17368:
### IGT changes ###
#### Possible regressions ####
* igt@i915_selftest@live@gt_pm:
- fi-icl-y: [PASS][1] -> [DMESG-FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8323/fi-icl-y/igt@i915_selftest@live@gt_pm.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17368/fi-icl-y/igt@i915_selftest@live@gt_pm.html
- fi-bsw-n3050: [PASS][3] -> [INCOMPLETE][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8323/fi-bsw-n3050/igt@i915_selftest@live@gt_pm.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17368/fi-bsw-n3050/igt@i915_selftest@live@gt_pm.html
- fi-bsw-kefka: [PASS][5] -> [INCOMPLETE][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8323/fi-bsw-kefka/igt@i915_selftest@live@gt_pm.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17368/fi-bsw-kefka/igt@i915_selftest@live@gt_pm.html
- fi-cfl-8109u: [PASS][7] -> [DMESG-FAIL][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8323/fi-cfl-8109u/igt@i915_selftest@live@gt_pm.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17368/fi-cfl-8109u/igt@i915_selftest@live@gt_pm.html
- fi-bsw-nick: [PASS][9] -> [INCOMPLETE][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8323/fi-bsw-nick/igt@i915_selftest@live@gt_pm.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17368/fi-bsw-nick/igt@i915_selftest@live@gt_pm.html
#### Warnings ####
* igt@i915_selftest@live@gt_pm:
- fi-tgl-y: [DMESG-FAIL][11] ([i915#1725]) -> [DMESG-FAIL][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8323/fi-tgl-y/igt@i915_selftest@live@gt_pm.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17368/fi-tgl-y/igt@i915_selftest@live@gt_pm.html
- fi-kbl-soraka: [DMESG-FAIL][13] ([i915#1744]) -> [DMESG-FAIL][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8323/fi-kbl-soraka/igt@i915_selftest@live@gt_pm.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17368/fi-kbl-soraka/igt@i915_selftest@live@gt_pm.html
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.
* igt@i915_selftest@live@gt_pm:
- {fi-tgl-dsi}: [DMESG-FAIL][15] ([i915#1725]) -> [DMESG-FAIL][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8323/fi-tgl-dsi/igt@i915_selftest@live@gt_pm.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17368/fi-tgl-dsi/igt@i915_selftest@live@gt_pm.html
- {fi-tgl-u}: [DMESG-FAIL][17] ([i915#1725]) -> [DMESG-FAIL][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8323/fi-tgl-u/igt@i915_selftest@live@gt_pm.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17368/fi-tgl-u/igt@i915_selftest@live@gt_pm.html
Known issues
------------
Here are the changes found in Patchwork_17368 that come from known issues:
### IGT changes ###
#### Possible fixes ####
* igt@i915_selftest@live@perf:
- fi-bwr-2160: [INCOMPLETE][19] ([i915#489]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8323/fi-bwr-2160/igt@i915_selftest@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17368/fi-bwr-2160/igt@i915_selftest@[email protected]
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- fi-skl-6770hq: [FAIL][21] ([fdo#103375]) -> [PASS][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8323/fi-skl-6770hq/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17368/fi-skl-6770hq/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
[i915#1725]: https://gitlab.freedesktop.org/drm/intel/issues/1725
[i915#1744]: https://gitlab.freedesktop.org/drm/intel/issues/1744
[i915#489]: https://gitlab.freedesktop.org/drm/intel/issues/489
Participating hosts (51 -> 45)
------------------------------
Missing (6): fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_8323 -> Patchwork_17368
CI-20190529: 20190529
CI_DRM_8323: 65545bfa1e4f92bb86462bf7226b8a33d13715a1 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5599: cdb07101dda33e2fcb0f4c2aa199c47159d88f35 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_17368: 5960a3e3435bae9f52877c29b63558e450297fb9 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
5960a3e3435b drm/i915/selftests: Check RPS controls84543fbd95dd drm/i915/selftests: Skip energy consumption tests if not controlling freq 487efa3e01bc drm/i915/selftests: Verify frequency scaling with RPS
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17368/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx