Skip to contentSkip to conversation

drm/i915/selftest: Change throttle criteria for rps

PATCH In review Raag Jadav 5 participants 8 messages Jan 2, 2025 – Jan 12, 2025

Subsystems (2)
lore
Share & tools
lore

Raag Jadav

author
#0 lore raw

PATCH 1/1 drm/i915/selftest: Change throttle criteria for rps

Current live_rps_control() implementation errors out on throttling. This was done with the assumption that throttling to minimum frequency is a catastrophic failure, which is incorrect. Throttling can happen due to variety of reasons and often times out of our control. Also, the resulting frequency can be at any given point below the maximum allowed. Change throttle criteria to reflect this logic and drop the error, as it doesn't necessarily mean selftest failure.

---
 drivers/gpu/drm/i915/gt/selftest_rps.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/gt/selftest_rps.c +6 -5
index dcef8d498919..7aac90c1679e 100644
@@ -477,12 +477,13 @@ int live_rps_control(void *arg)
 			limit, intel_gpu_freq(rps, limit),
 			min, max, ktime_to_ns(min_dt), ktime_to_ns(max_dt));
 
-		if (limit == rps->min_freq) {
-			pr_err("%s: GPU throttled to minimum!\n",
-			       engine->name);
+		if (limit != rps->max_freq) {
+			u32 throttle = intel_uncore_read(gt->uncore,
+							 intel_gt_perf_limit_reasons_reg(gt));
+
+			pr_warn("%s: GPU throttled with reasons 0x%08x\n",
+				engine->name, throttle & GT0_PERF_LIMIT_REASONS_MASK);
 			show_pstate_limits(rps);
-			err = -ENODEV;
-			break;
 		}
 
 		if (igt_flush_test(gt->i915)) {
Signature · 1 line
2.34.1
#1 lore raw

✓ i915.CI.BAT: success for drm/i915/selftest: Change throttle criteria for rps

== Series Details ==

== Series Details ==

Series: drm/i915/selftest: Change throttle criteria for rps
URL : https://patchwork.freedesktop.org/series/143060/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_15892 -> Patchwork_143060v1
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_143060v1/index.html

Participating hosts (41 -> 39)
------------------------------

Missing (2): bat-twl-1 fi-snb-2520m

Changes
-------

No changes found

Build changes
-------------

* IGT: IGT_8172 -> None
* Linux: CI_DRM_15892 -> Patchwork_143060v1

CI-20190529: 20190529
CI_DRM_15892: 08bd590935a5258ffd79355c59adffd72fb2c642 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_8172: 9112581619aa198fa03041d5c7e18e02f42ac00f @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_143060v1: 08bd590935a5258ffd79355c59adffd72fb2c642 @ git://anongit.freedesktop.org/gfx-ci/linux

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_143060v1/index.html

#2 lore raw

✓ i915.CI.Full: success for drm/i915/selftest: Change throttle criteria for rps

In reply to Raag Jadav
== Series Details ==

== Series Details ==

Series: drm/i915/selftest: Change throttle criteria for rps
URL : https://patchwork.freedesktop.org/series/143060/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_15892_full -> Patchwork_143060v1_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

Participating hosts (11 -> 9)
------------------------------

Missing (2): shard-snb-0 shard-glk-0

Changes
-------

No changes found

Build changes
-------------

* IGT: IGT_8172 -> None
* Linux: CI_DRM_15892 -> Patchwork_143060v1

CI-20190529: 20190529
CI_DRM_15892: 08bd590935a5258ffd79355c59adffd72fb2c642 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_8172: 9112581619aa198fa03041d5c7e18e02f42ac00f @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_143060v1: 08bd590935a5258ffd79355c59adffd72fb2c642 @ 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_143060v1/index.html

author
#3 lore raw
In reply to Raag Jadav
Quoted 10 lines · Raag Jadav

Current live_rps_control() implementation errors out on throttling. This was done with the assumption that throttling to minimum frequency is a catastrophic failure, which is incorrect. Throttling can happen due to variety of reasons and often times out of our control. Also, the resulting frequency can be at any given point below the maximum allowed. Change throttle criteria to reflect this logic and drop the error, as it doesn't necessarily mean selftest failure.

---

Rodrigo, does this look okay?

Raag

Quoted 29 lines
 drivers/gpu/drm/i915/gt/selftest_rps.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/gt/selftest_rps.c +6 -5
index dcef8d498919..7aac90c1679e 100644
@@ -477,12 +477,13 @@ int live_rps_control(void *arg)
 			limit, intel_gpu_freq(rps, limit),
 			min, max, ktime_to_ns(min_dt), ktime_to_ns(max_dt));
 
-		if (limit == rps->min_freq) {
-			pr_err("%s: GPU throttled to minimum!\n",
-			       engine->name);
+		if (limit != rps->max_freq) {
+			u32 throttle = intel_uncore_read(gt->uncore,
+							 intel_gt_perf_limit_reasons_reg(gt));
+
+			pr_warn("%s: GPU throttled with reasons 0x%08x\n",
+				engine->name, throttle & GT0_PERF_LIMIT_REASONS_MASK);
 			show_pstate_limits(rps);
-			err = -ENODEV;
-			break;
 		}
 
 		if (igt_flush_test(gt->i915)) {
Signature · 1 line
2.34.1
maintainer Acked-by
#4 lore raw
Quoted 9 lines · Raag Jadav
Quoted 8 lines · Raag Jadav

Current live_rps_control() implementation errors out on throttling. This was done with the assumption that throttling to minimum frequency is a catastrophic failure, which is incorrect. Throttling can happen due to variety of reasons and often times out of our control. Also, the resulting frequency can be at any given point below the maximum allowed. Change throttle criteria to reflect this logic and drop the error, as it doesn't necessarily mean selftest failure.

Quoted 4 lines
Quoted 2 lines

---

Rodrigo, does this look okay?

Quoted 32 lines

Raag

Quoted 29 lines
 drivers/gpu/drm/i915/gt/selftest_rps.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/gt/selftest_rps.c +6 -5
index dcef8d498919..7aac90c1679e 100644
@@ -477,12 +477,13 @@ int live_rps_control(void *arg)
 			limit, intel_gpu_freq(rps, limit),
 			min, max, ktime_to_ns(min_dt), ktime_to_ns(max_dt));
 
-		if (limit == rps->min_freq) {
-			pr_err("%s: GPU throttled to minimum!\n",
-			       engine->name);
+		if (limit != rps->max_freq) {
+			u32 throttle = intel_uncore_read(gt->uncore,
+							 intel_gt_perf_limit_reasons_reg(gt));
+
+			pr_warn("%s: GPU throttled with reasons 0x%08x\n",
+				engine->name, throttle & GT0_PERF_LIMIT_REASONS_MASK);
 			show_pstate_limits(rps);
-			err = -ENODEV;
-			break;
 		}
 
 		if (igt_flush_test(gt->i915)) {
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#5 lore raw
In reply to Raag Jadav
Quoted 7 lines · Raag Jadav

Current live_rps_control() implementation errors out on throttling. This was done with the assumption that throttling to minimum frequency is a catastrophic failure, which is incorrect. Throttling can happen due to variety of reasons and often times out of our control. Also, the resulting frequency can be at any given point below the maximum allowed. Change throttle criteria to reflect this logic and drop the error, as it doesn't necessarily mean selftest failure.

LGTM, CI systems are especially susceptible to thermal issues.

Quoted 29 lines
---
  drivers/gpu/drm/i915/gt/selftest_rps.c | 11 ++++++-----
  1 file changed, 6 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/gt/selftest_rps.c +6 -5
index dcef8d498919..7aac90c1679e 100644
@@ -477,12 +477,13 @@ int live_rps_control(void *arg)
  			limit, intel_gpu_freq(rps, limit),
  			min, max, ktime_to_ns(min_dt), ktime_to_ns(max_dt));
 
-		if (limit == rps->min_freq) {
-			pr_err("%s: GPU throttled to minimum!\n",
-			       engine->name);
+		if (limit != rps->max_freq) {
+			u32 throttle = intel_uncore_read(gt->uncore,
+							 intel_gt_perf_limit_reasons_reg(gt));
+
+			pr_warn("%s: GPU throttled with reasons 0x%08x\n",
+				engine->name, throttle & GT0_PERF_LIMIT_REASONS_MASK);
  			show_pstate_limits(rps);
-			err = -ENODEV;
-			break;
  		}
 
  		if (igt_flush_test(gt->i915)) {
#6 lore raw
In reply to Raag Jadav

Hi Raag,

Quoted 9 lines · Raag Jadav

Current live_rps_control() implementation errors out on throttling. This was done with the assumption that throttling to minimum frequency is a catastrophic failure, which is incorrect. Throttling can happen due to variety of reasons and often times out of our control. Also, the resulting frequency can be at any given point below the maximum allowed. Change throttle criteria to reflect this logic and drop the error, as it doesn't necessarily mean selftest failure.

Reviewed and merged to drm-intel-gt-next.

Thanks,
Andi

author
#7 lore raw
Quoted 11 lines · Andi Shyti

Hi Raag,

Quoted 8 lines · Raag Jadav

Current live_rps_control() implementation errors out on throttling. This was done with the assumption that throttling to minimum frequency is a catastrophic failure, which is incorrect. Throttling can happen due to variety of reasons and often times out of our control. Also, the resulting frequency can be at any given point below the maximum allowed. Change throttle criteria to reflect this logic and drop the error, as it doesn't necessarily mean selftest failure.

Quoted 3 lines
Quoted 1 line

Reviewed and merged to drm-intel-gt-next.

Thank you.

Sorry I didn't pick your tag as I considered this a different patch.

Raag