[Intel-gfx] [PATCH 6/6] drm/i915: Hookup chip reset in error handler

Jesse Barnes jbarnes at virtuousgeek.org
Sun Sep 13 19:06:09 CEST 2009


On Sun, 13 Sep 2009 10:51:02 -0400
Ben Gamari <bgamari.foss at gmail.com> wrote:

> This patch uses the previously introduced chip reset logic to reset
> the chip when an error event is detected.
> 
> Signed-off-by: Ben Gamari <bgamari.foss at gmail.com>
> ---
>  drivers/gpu/drm/i915/i915_irq.c |   12 ++++++++++++
>  1 files changed, 12 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_irq.c
> b/drivers/gpu/drm/i915/i915_irq.c index dbfcf0a..43bfb36 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -308,6 +308,18 @@ static void i915_error_work_func(struct
> work_struct *work) DRM_DEBUG("generating error event\n");
>  
>  	kobject_uevent_env(&dev->primary->kdev.kobj, KOBJ_CHANGE,
> envp); +
> +	if (dev_priv->mm.wedged) {
> +		printk(KERN_ERR "GPU hang detected...");
> +		if (IS_I965G(dev)) {
> +			printk("resetting...");
> +			i965_reset(dev, GDRST_RENDER);
> +			printk("done.\n");
> +			dev_priv->mm.wedged = 0;
> +		} else {
> +			printk("reboot required\n");
> +		}
> +	}
>  }

We have the uevents now at error detect time right?  We should probably
send a uevent here too and remove the printks (or just make them into
debug or warning printks instead).

Thanks,
-- 
Jesse Barnes, Intel Open Source Technology Center



More information about the Intel-gfx mailing list