Messages in this thread | | | Date | Mon, 25 Oct 2021 08:30:06 -0700 | Subject | Re: [PATCH] media: venus: Synchronize probe() between venus_core and enc/dec | From | Tadeusz Struk <> |
| |
Hi Bryan, On 10/25/21 08:24, Bryan O'Donoghue wrote: > >> + struct mutex sync_lock; > > Why have an additional mutex, will the existing core::lock not do ?
I wanted to reuse it, but the core::lock in used internally in hfi and it will deadlock there if we use that one here.
> shouldn't this be an -EPROBE_DEFER i.e. CORE_INIT hasn't completed/run yet so defer until > it does. > > This fragment here looks racy to me without a DEFER above ? > > drivers/media/platform/qcom/venus/core.c::venus_probe()
No, we want a hard stop here. At this point the venus_core probe() has finished and it failed. Returning -EPROBE_DEFER here will just cause it to loop infinitely.
-- Thanks, Tadeusz [unhandled content-type:application/pgp-signature] | |