[Intel-gfx] [PATCH 1/8] drm/i915: Flush GT idle status upon reset

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Thu Jul 14 07:53:20 UTC 2016


On ke, 2016-07-13 at 09:10 +0100, Chris Wilson wrote:
> Upon resetting the GPU, we force the engines to be idle by clearing
> their request lists. However, I neglected to clear the GT active status
> and so the next request following the reset was not marking the device
> as busy again. (We had to wait until any outstanding retire worker
> finally ran and cleared the active status.)
> 
> Fixes: 67d97da34917 ("drm/i915: Only start retire worker when idle")
> Testcase: igt/pm_rps/reset
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>

No FDO bug associated?

Reviewed-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>

> ---
>  drivers/gpu/drm/i915/i915_gem.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index adeca0ec4cfb..9d8c26f42dee 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -3169,6 +3169,8 @@ static void i915_gem_reset_engine_cleanup(struct intel_engine_cs *engine)
>  	}
>  
>  	intel_ring_init_seqno(engine, engine->last_submitted_seqno);
> +
> +	engine->i915->gt.active_engines &= ~intel_engine_flag(engine);
>  }
>  
>  void i915_gem_reset(struct drm_device *dev)
> @@ -3186,6 +3188,7 @@ void i915_gem_reset(struct drm_device *dev)
>  
>  	for_each_engine(engine, dev_priv)
>  		i915_gem_reset_engine_cleanup(engine);
> +	mod_delayed_work(dev_priv->wq, &dev_priv->gt.idle_work, 0);
>  
>  	i915_gem_context_reset(dev);
>  
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation


More information about the Intel-gfx mailing list