Chris Wilson <[email protected]> writes:

> If we fail to recover the HW state upon resume (i.e. our attempt to
> clear the wedged bit and reset during i915_gem_sanitize() fails), then
> skip the HW restart inside i915_gem_init_hw(). We will ultimate do the
> the HW restart when sucessfully unwedgeding and reseting the HW later,

successfully unwedging

> but attempting to restore a wedged device upon resume is risky as the HW
> is in an unknown state.
>
> Signed-off-by: Chris Wilson <[email protected]>
> Cc: Mika Kuoppala <[email protected]>

Reviewed-by: Mika Kuoppala <[email protected]>

> ---
>  drivers/gpu/drm/i915/i915_gem.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index d9d39b309ce8..5993222c81ae 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -4835,6 +4835,10 @@ int i915_gem_init_hw(struct drm_i915_private *dev_priv)
>       init_unused_rings(dev_priv);
>  
>       BUG_ON(!dev_priv->kernel_context);
> +     if (i915_terminally_wedged(&dev_priv->gpu_error)) {
> +             ret = -EIO;
> +             goto out;
> +     }
>  
>       ret = i915_ppgtt_init_hw(dev_priv);
>       if (ret) {
> -- 
> 2.15.0.rc0
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to