lkml.org 
[lkml]   [2021]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] media: venus: Synchronize probe() between venus_core and enc/dec
From
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]
\
 
 \ /
  Last update: 2021-10-25 17:30    [W:0.177 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site