Skip to contentSkip to conversation

drm/i915: Park faster to alleviate kept forcewake

PATCH In review Mika Kuoppala 3 participants 3 messages Jan 29, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: Park faster to alleviate kept forcewake

To avoid context corruption on some gens, we need to hold forcewake for long periods of time. This leads to increased energy expenditure for mostly idle workloads.

To combat the increased power consumption, park GPU more hastily.

As the HW isn't so quick to end up in rc6, this software mechanism supplements it. So we can apply it, across all gens.

Testcase: igt/i915_pm_rc6_residency/rc6-idle
References: "Add RC6 CTX corruption WA"

Cc Stable <[email protected]> # v4.19+
Cc Chris Wilson <[email protected]>
---
 drivers/gpu/drm/i915/i915_gem.c  | 2 +-
 drivers/gpu/drm/i915/intel_lrc.c | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_gem.c +1 -1
index c7d05ac7af3c..6ddc75098b28 100644
@@ -197,7 +197,7 @@ void i915_gem_park(struct drm_i915_private *i915)
 		return;
 
 	/* Defer the actual call to __i915_gem_park() to prevent ping-pongs */
-	mod_delayed_work(i915->wq, &i915->gt.idle_work, msecs_to_jiffies(100));
+	mod_delayed_work(i915->wq, &i915->gt.idle_work, 1);
 }
 
 void i915_gem_unpark(struct drm_i915_private *i915)
drivers/gpu/drm/i915/intel_lrc.c +5 -0
index 13e97faabaa7..284ffdfd8840 100644
@@ -388,7 +388,12 @@ execlists_user_begin(struct intel_engine_execlists *execlists,
 inline void
 execlists_user_end(struct intel_engine_execlists *execlists)
 {
+	struct intel_engine_cs *engine =
+		container_of(execlists, typeof(*engine), execlists);
+
 	execlists_clear_active(execlists, EXECLISTS_ACTIVE_USER);
+
+	mod_delayed_work(engine->i915->wq, &engine->i915->gt.retire_work, 0);
 }
 
 static inline void
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#1 lore raw

Quoting Mika Kuoppala (2020-01-29 13:39:12)

Quoted 9 lines

To avoid context corruption on some gens, we need to hold forcewake for long periods of time. This leads to increased energy expenditure for mostly idle workloads.

To combat the increased power consumption, park GPU more hastily.

As the HW isn't so quick to end up in rc6, this software mechanism supplements it. So we can apply it, across all gens.

Quoted 6 lines

Testcase: igt/i915_pm_rc6_residency/rc6-idle
References: "Add RC6 CTX corruption WA"

Cc Stable <[email protected]> # v4.19+
Cc Chris Wilson <[email protected]>

Seems to work and play nice with the older style of locking,

-Chris

#2 lore raw

[Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915: Park faster to alleviate kept forcewake

In reply to Mika Kuoppala
== Series Details ==

== Series Details ==

Series: drm/i915: Park faster to alleviate kept forcewake
URL : https://patchwork.freedesktop.org/series/72721/
State : failure

== Summary ==

Applying: drm/i915: Park faster to alleviate kept forcewake
error: sha1 information is lacking or useless (drivers/gpu/drm/i915/i915_gem.c).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch' to see the failed patch Patch failed at 0001 drm/i915: Park faster to alleviate kept forcewake When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx