[Intel-gfx] [PATCH] drm/i915: Optimistically spin for the request completion
Chris Wilson
chris at chris-wilson.co.uk
Tue Mar 10 09:14:14 PDT 2015
On Tue, Mar 10, 2015 at 04:06:19PM +0000, Chris Wilson wrote:
> @@ -1235,12 +1257,20 @@ int __i915_wait_request(struct drm_i915_gem_request *req,
> if (ring->id == RCS && INTEL_INFO(dev)->gen >= 6)
> gen6_rps_boost(dev_priv, file_priv);
>
> - if (!irq_test_in_progress && WARN_ON(!ring->irq_get(ring)))
> - return -ENODEV;
> -
> /* Record current time in case interrupted by signal, or wedged */
> trace_i915_gem_request_wait_begin(req);
> before = ktime_get_raw_ns();
> +
> + /* Optimistic spin before touching IRQs */
Perhaps iff timeout == NULL, or pass it along and add a
if (timeout && timeout_after_eq(jiffies, timeout))
break;
before the cpu_relax()?
> + ret = __i915_spin_request(req);
> + if (ret == 0)
> + goto out;
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list