[Intel-gfx] [PATCH 09/12] drm/i915: timeout parameter for seqno wait

Chris Wilson chris at chris-wilson.co.uk
Fri Apr 27 16:14:10 CEST 2012


On Thu, 26 Apr 2012 16:03:06 -0700, Ben Widawsky <ben at bwidawsk.net> wrote:
>  static int __wait_seqno(struct intel_ring_buffer *ring, u32 seqno,
> -			bool interruptible)
> +			bool interruptible, long *usecs)
>  {
>  	drm_i915_private_t *dev_priv = ring->dev->dev_private;
> -	int ret = 0;
> +	bool wait_forever = false;
> +	long timeout, end;
> +
> +	if (usecs == NULL || ((*usecs) < 0)) {
> +		wait_forever = true;
> +		timeout = msecs_to_jiffies(100);
> +	} else
> +		timeout = usecs_to_jiffies(*usecs);
> +
> +	if (i915_seqno_passed(ring->get_seqno(ring), seqno))
> +		return 0;
> +
> +	if (WARN_ON(!ring->irq_get(ring)))
> +		return -ENODEV;

Rebase error, duplicated ring->irq_get/ring->get_seqno.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre



More information about the Intel-gfx mailing list