@@ -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)
@@ -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
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. Suggested-by: Chris Wilson <chris@chris-wilson.co.uk> Testcase: igt/i915_pm_rc6_residency/rc6-idle References: "Add RC6 CTX corruption WA" Cc: Stable <stable@vger.kernel.org> # v4.19+ Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> --- drivers/gpu/drm/i915/i915_gem.c | 2 +- drivers/gpu/drm/i915/intel_lrc.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-)