Re: [PATCH 04/14] drm/i915: Leave engine parking to the engines

Tvrtko Ursulin
2019-05-02T14:18:38Z

On 01/05/2019 12:45, Chris Wilson wrote:
> Drop the check in GEM parking that the engines were already parked. The
> intention here was that before we dropped the GT wakeref, we were sure
> that no more interrupts could be raised -- however, we have already
> dropped the wakeref by this point and the warning is no longer valid.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> drivers/gpu/drm/i915/i915_gem_pm.c | 18 +-----------------
> 1 file changed, 1 insertion(+), 17 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_pm.c b/drivers/gpu/drm/i915/i915_gem_pm.c
> index 3b6e8d5be8e1..49b0ce594f20 100644
> --- a/drivers/gpu/drm/i915/i915_gem_pm.c
> +++ b/drivers/gpu/drm/i915/i915_gem_pm.c
> @@ -17,24 +17,8 @@ static void i915_gem_park(struct drm_i915_private *i915)
>
> lockdep_assert_held(&i915->drm.struct_mutex);
>
> - for_each_engine(engine, i915, id) {
> - /*
> - * We are committed now to parking the engines, make sure there
> - * will be no more interrupts arriving later and the engines
> - * are truly idle.
> - */
> - if (wait_for(intel_engine_is_idle(engine), 10)) {
> - struct drm_printer p = drm_debug_printer(__func__);
> -
> - dev_err(i915->drm.dev,
> - "%s is not idle before parking\n",
> - engine->name);
> - intel_engine_dump(engine, &p, NULL);
> - }
> - tasklet_kill(&engine->execlists.tasklet);
> -
> + for_each_engine(engine, i915, id)
> i915_gem_batch_pool_fini(&engine->batch_pool);
> - }
>
> i915_timelines_park(i915);
> i915_vma_parked(i915);
>

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

Tvrtko