[Intel-gfx] [PATCH] drm/i915: Implement workaround for broken CS tlb on i830/845

Chris Wilson chris at chris-wilson.co.uk
Mon Dec 17 16:23:22 CET 2012


On Mon, 17 Dec 2012 15:18:41 +0000, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index 6ebdf1e..0e3bd04 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -1087,8 +1087,14 @@ i915_error_first_batchbuffer(struct drm_i915_private *dev
>         if (!ring->get_seqno)
>                 return NULL;
>  
> -       if (HAS_BROKEN_CS_TLB(dev_priv->dev))
> -               return i915_error_object_create(dev_priv, ring->private);
> +       if (HAS_BROKEN_CS_TLB(dev_priv->dev)) {
> +               u32 acthd = I915_READ(ACTHD);

All the implicit knowledge here is making me worried:

if (WARN_ON(ring->id != RCS)) return NULL;

> +
> +               obj = ring->private;
> +               if (acthd >= obj->gtt_offset &&
> +                   acthd <= obj->gtt_offset + obj->base.size)
> +                       return i915_error_object_create(dev_priv, obj);
> +       }

-- 
Chris Wilson, Intel Open Source Technology Centre



More information about the Intel-gfx mailing list