[Intel-gfx] [PATCH] drm/i915: Record batch buffer following GPU error

Chris Wilson chris at chris-wilson.co.uk
Thu Feb 11 15:25:08 CET 2010


On Thu, 11 Feb 2010 14:15:34 +0000, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> +static void i915_error_state_free(struct drm_device *dev,
> +				  struct drm_i915_error_state *error)
> +{
> +	if (error->batchbuffer || error->ringbuffer) {
> +		mutex_lock(&dev->struct_mutex);
> +		drm_gem_object_unreference(error->ringbuffer);
> +		drm_gem_object_unreference(error->batchbuffer);
> +		mutex_unlock(&dev->struct_mutex);
> +	}
> +
> +	kfree(error->active_bo);
> +	kfree(error);
> +}

Ok, so this may potentially be called from interrupt context (following an
error) and so the mutex_lock() here is illegal. Presumably I shall have to
hook the error path into the i915 workqueue...
-ickle

-- 
Chris Wilson, Intel Open Source Technology Centre



More information about the Intel-gfx mailing list