Quoting Daniele Ceraolo Spurio (2018-03-12 21:51:15)
> @@ -1677,11 +1689,11 @@ static void reset_irq(struct intel_engine_cs *engine)
>          */
>         for (i = 0; i < 2; i++) {
>                 I915_WRITE(GEN8_GT_IIR(gtiir[engine->id]),
> -                          GT_CONTEXT_SWITCH_INTERRUPT << engine->irq_shift);
> +                          GT_CONTEXT_SWITCH_INTERRUPT << 
> irq_shifts[engine->id]);
>                 POSTING_READ(GEN8_GT_IIR(gtiir[engine->id]));
>         }
>         GEM_BUG_ON(I915_READ(GEN8_GT_IIR(gtiir[engine->id])) &
> -                  (GT_CONTEXT_SWITCH_INTERRUPT << engine->irq_shift));
> +                  (GT_CONTEXT_SWITCH_INTERRUPT << irq_shifts[engine->id]));
>  
>         clear_bit(ENGINE_IRQ_EXECLIST, &engine->irq_posted);
>  }
> @@ -2114,7 +2126,11 @@ logical_ring_default_vfuncs(struct intel_engine_cs 
> *engine)
>  static inline void
>  logical_ring_default_irqs(struct intel_engine_cs *engine)
>  {
> -       unsigned shift = engine->irq_shift;
> +       unsigned shift = 0;
> +
> +       if (INTEL_GEN(engine->i915) < 11)
> +               shift = irq_shifts[engine->id];
> +
>         engine->irq_enable_mask = GT_RENDER_USER_INTERRUPT << shift;
>         engine->irq_keep_mask = GT_CONTEXT_SWITCH_INTERRUPT << shift;

I think we can safely argue that in reset_irq (for gen8-10) we can just
use engine->irq_keep_mask.

On the one hand, that is orthogonal to this patch; on the other it
greatly simplifies the argument for this patch as then there are no
users of engine->irq_shift left at all.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to