[Intel-gfx] [PATCH 2/3] drm/i915: Clear wedged status upon resume

Mika Kuoppala mika.kuoppala at linux.intel.com
Tue Aug 29 13:49:01 UTC 2017


Chris Wilson <chris at chris-wilson.co.uk> writes:

> When we wait up from suspend, the device has been powered down and
> should come back afresh. We should be able to safely remove the wedged
> status from the previous session and start afresh.
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala at linux.intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>

Reviewed-by: Mika Kuoppala <mika.kuoppala at intel.com>

> ---
>  drivers/gpu/drm/i915/i915_gem.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index c1520c0d2084..9dc24b915aa7 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -4518,6 +4518,12 @@ static void assert_kernel_context_is_current(struct drm_i915_private *dev_priv)
>  
>  void i915_gem_sanitize(struct drm_i915_private *i915)
>  {
> +	if (i915_terminally_wedged(&i915->gpu_error)) {
> +		mutex_lock(&i915->drm.struct_mutex);
> +		i915_gem_unset_wedged(i915);
> +		mutex_unlock(&i915->drm.struct_mutex);
> +	}
> +
>  	/*
>  	 * If we inherit context state from the BIOS or earlier occupants
>  	 * of the GPU, the GPU may be in an inconsistent state when we
> -- 
> 2.14.1


More information about the Intel-gfx mailing list