Commit 68027387 authored by Chris Wilson's avatar Chris Wilson

drm/i915: Move parking-while-active warning to intel_engines_park()

We will want to break this down to give detailed per-engine warnings as
to why we still think we are active as we attempt to park the engines.
For the first step, just move the warning verbatim from the idle-worker
to intel_engines_park().
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20171027110617.31745-3-chris@chris-wilson.co.ukReviewed-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
parent e5330ac1
...@@ -3352,13 +3352,6 @@ i915_gem_idle_work_handler(struct work_struct *work) ...@@ -3352,13 +3352,6 @@ i915_gem_idle_work_handler(struct work_struct *work)
*/ */
synchronize_irq(dev_priv->drm.irq); synchronize_irq(dev_priv->drm.irq);
/*
* We are committed now to parking the engines, make sure there
* will be no more interrupts arriving later.
*/
if (!intel_engines_are_idle(dev_priv))
DRM_ERROR("Timeout waiting for engines to idle\n");
intel_engines_park(dev_priv); intel_engines_park(dev_priv);
i915_gem_timelines_mark_idle(dev_priv); i915_gem_timelines_mark_idle(dev_priv);
......
...@@ -1613,6 +1613,13 @@ void intel_engines_park(struct drm_i915_private *i915) ...@@ -1613,6 +1613,13 @@ void intel_engines_park(struct drm_i915_private *i915)
struct intel_engine_cs *engine; struct intel_engine_cs *engine;
enum intel_engine_id id; enum intel_engine_id id;
/*
* We are committed now to parking the engines, make sure there
* will be no more interrupts arriving later.
*/
if (!intel_engines_are_idle(dev_priv))
DRM_ERROR("Timeout waiting for engines to idle\n");
for_each_engine(engine, i915, id) { for_each_engine(engine, i915, id) {
if (engine->park) if (engine->park)
engine->park(engine); engine->park(engine);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment