[Intel-gfx] [PATCH 1/4] drm/i915: Do a synchronous switch-to-kernel-context on idling
Chris Wilson
chris at chris-wilson.co.uk
Fri Mar 8 12:44:16 UTC 2019
Quoting Chris Wilson (2019-03-08 09:36:54)
> +static bool switch_to_kernel_context_sync(struct drm_i915_private *i915)
> +{
> + bool result = true;
> +
> + /*
> + * Even if we fail to switch, give whatever is running a small chance
> + * to save itself before we report the failure. Yes, this may be a
> + * false positive due to e.g. ENOMEM, caveat emptor!
> + */
> + if (i915_gem_switch_to_kernel_context(i915))
> + result = false;
> +
> + if (i915_gem_wait_for_idle(i915,
> + I915_WAIT_LOCKED |
> + I915_WAIT_FOR_IDLE_BOOST,
> + I915_GEM_IDLE_TIMEOUT))
> + result = false;
> +
> + if (result) {
> + assert_kernel_context_is_current(i915);
> + } else {
if (intel_has_gpu_reset()) {
> + /* Forcibly cancel outstanding work and leave the gpu quiet. */
> + dev_err(i915->drm.dev,
> + "Failed to idle engines, declaring wedged!\n");
> + GEM_TRACE_DUMP();
}
To prevent it spewing just for gem_eio???
I think the error message is important, but gem_eio is a bit of an arm
twister.
-Chris
More information about the Intel-gfx
mailing list