[Intel-gfx] [PATCH 13/14] drm/i915/guc: Workaround the missing user interrupt after preemption

Chris Wilson chris at chris-wilson.co.uk
Fri Oct 20 16:08:30 UTC 2017


Quoting MichaƂ Winiarski (2017-10-19 19:36:18)
> +#define GUC_LOST_IRQ_WORK_DELAY_MS 100
> +static void guc_lost_user_interrupt(struct work_struct *work)
> +{
> +       struct guc_preempt_work *preempt_work =
> +               container_of(to_delayed_work(work), typeof(*preempt_work),
> +                            lost_irq_work);
> +       struct intel_engine_cs *engine = preempt_work->engine;
> +       struct intel_guc *guc = &engine->i915->guc;

Since you switched preempt_work to be stored within intel_guc,
you can use container_of to get to the guc and cut out the dance.
Here and inject_preempt_context.
-Chris


More information about the Intel-gfx mailing list