Re: [PATCH v3] drm/i915/guc: Stop using mutex while sending CTB messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Michal Wajdeczko (2020-02-03 09:54:13)
>  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);
> +               lockdep_set_subclass_and_mark_as_used(&ct->ctbs[i].lock, i);

Trybot warned of another issue... We need to hold irq-off for
subclass=1, but equally we have to keep subclass=0 clean.

if (i == 1)
	local_irq_disable();
lockdep_set_subclass_and_mark_as_used(&ct->ctbs[i].lock, i);
if (i == 1)
	local_irq_enable();

Or wrap that into ...and_mark_as_used(bool irq_off) then we can reuse
that macro in intel_engine_cs.c
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux