[Intel-gfx] [PATCH v4] drm/i915/guc: Stop using mutex while sending CTB messages

Chris Wilson chris at chris-wilson.co.uk
Mon Feb 3 11:01:19 UTC 2020


Quoting Michal Wajdeczko (2020-02-03 10:58:16)
>  void intel_guc_ct_init_early(struct intel_guc_ct *ct)
>  {
> +       int i;
> +
>         spin_lock_init(&ct->requests.lock);
>         INIT_LIST_HEAD(&ct->requests.pending);
>         INIT_LIST_HEAD(&ct->requests.incoming);
>         INIT_WORK(&ct->requests.worker, ct_incoming_request_worker_func);
> +       for (i = 0; i < ARRAY_SIZE(ct->ctbs); i++) {
> +               spin_lock_init(&ct->ctbs[i].lock);
> +
> +               /* CTB_RECV lock will be used with irq disabled */

...will be used inside the interrupt handler

I think is a more descriptive comment.

> +               lockdep_set_subclass_and_mark_as_used(&ct->ctbs[i].lock, i,
> +                                                     i == CTB_RECV);

So fingers crossed lockdep doesn't now find a genuine issue,
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris


More information about the Intel-gfx mailing list