[Intel-gfx] [PATCH 1/2] drm/i915: Clear per-engine fault register as early as possible

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Thu Jul 28 10:12:38 UTC 2016


On ke, 2016-07-27 at 19:11 +0100, Chris Wilson wrote:
> From gen6, the hardware tracks address lookup failures and so that we do
> not trigger false positives from errors before we are initialised we
> clear those upon startup (intel_uncore_early_sanitize()). However, this
> is actually before we have the engines defined and this turns out to be
> a nop. The earliest we can do so is inside intel_engine_setup().
> 
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin at linux.intel.com>

Documentation I found on this was poor, so I'd prefer a Tested-by: tag
from somebody (wide platform coverage). But codewise it's consistent
with existing usage.

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

> ---
>  drivers/gpu/drm/i915/intel_engine_cs.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c
> index e28873cb0672..251e125a214f 100644
> --- a/drivers/gpu/drm/i915/intel_engine_cs.c
> +++ b/drivers/gpu/drm/i915/intel_engine_cs.c
> @@ -97,6 +97,9 @@ intel_engine_setup(struct drm_i915_private *dev_priv,
>  	engine->mmio_base = info->mmio_base;
>  	engine->irq_shift = info->irq_shift;
>  
> +	if (INTEL_GEN(dev_priv) >= 6)
> +		I915_WRITE(RING_FAULT_REG(engine), 0);
> +
>  	return engine;
>  }
>  
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation


More information about the Intel-gfx mailing list