Re: [PATCH 4/6] drm/i915: Mark device as wedged if we fail to resume

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Intel-gfx [mailto:intel-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx] On Behalf Of
> Chris Wilson
> Sent: Wednesday, April 09, 2014 9:20 AM
> To: intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> Subject:  [PATCH 4/6] drm/i915: Mark device as wedged if we fail to
> resume
> 
> During module load, if we fail to initialise the rings, we abort the load reporting
> EIO. However during resume, even though we report EIO as we fail to
> reinitialize the ringbuffers, the resume continues and the device is restored -
> albeit in a non-functional state. As we cannot execute any commands on the
> GPU, it is effectively wedged, mark it so.
> 
> As we now preserve the ringbuffers across resume, this should prevent UXA
> from falling into the trap of repeatedly sending invalid batchbuffers and
> dropping all further rendering into /dev/null.
> 
> Reported-and-tested-by: Jiri Kosina <jkosina@xxxxxxx>
> References: https://bugs.freedesktop.org/show_bug.cgi?id=76554
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/i915_drv.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.c
> b/drivers/gpu/drm/i915/i915_drv.c index 5d8250f7145d..629f8164a547 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -569,8 +569,10 @@ static int __i915_drm_thaw(struct drm_device *dev,
> bool restore_gtt_mappings)
>  		drm_mode_config_reset(dev);
> 
>  		mutex_lock(&dev->struct_mutex);
> -
> -		error = i915_gem_init_hw(dev);
> +		if (i915_gem_init_hw(dev)) {
> +			DRM_ERROR("failed to re-initialize GPU, declaring
> wedged!\n");

The "int error = 0;" is not needed anymore. Other than that:

Reviewed-by: Oscar Mateo <oscar.mateo@xxxxxxxxx>

> +			atomic_set_mask(I915_WEDGED, &dev_priv-
> >gpu_error.reset_counter);
> +		}
>  		mutex_unlock(&dev->struct_mutex);
> 
>  		/* We need working interrupts for modeset enabling ... */ @@
> -613,7 +615,7 @@ static int __i915_drm_thaw(struct drm_device *dev, bool
> restore_gtt_mappings)
>  	mutex_unlock(&dev_priv->modeset_restore_lock);
> 
>  	intel_runtime_pm_put(dev_priv);
> -	return error;
> +	return 0;
>  }
> 
>  static int i915_drm_thaw(struct drm_device *dev)
> --
> 1.9.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux