[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <00b817a4-f1ac-6a94-5f1e-836d8d313406@linaro.org>
Date: Mon, 25 Oct 2021 17:03:52 +0100
From: Bryan O'Donoghue <bryan.odonoghue@...aro.org>
To: Tadeusz Struk <tadeusz.struk@...aro.org>,
Stanimir Varbanov <stanimir.varbanov@...aro.org>,
Andy Gross <agross@...nel.org>
Cc: Bjorn Andersson <bjorn.andersson@...aro.org>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Lee Jones <lee.jones@...aro.org>,
Amit Pundir <amit.pundir@...aro.org>,
John Stultz <john.stultz@...aro.org>,
linux-media@...r.kernel.org, linux-arm-msm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] media: venus: Synchronize probe() between venus_core and
enc/dec
On 25/10/2021 16:30, Tadeusz Struk wrote:
> 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.
I don't think there's any guarantee at all, that core probe() has
completed at that point.
of_platform_populate() doesn't guarantee ordering of the probe()
completing before or after the probe() of the platform drivers that are
associated with the devices in of_platform_populate().
When you think it about it can't do that and you wouldn't want it to do
that since a device might have a legitimate reason to EPROBE_DEFER
As an example core could call of_platform_populate() and then as a
ridiculous example go to sleep for five seconds - in which case it is
perfectly possible the encoder and decoder probe() functions will bug
out illegitimately waiting because of core->state != CORE_INIT
This is a problem we have and still haven't solved in
drivers/usb/dwc3/dwc3-qcom.c::probe() and child devices
drivers/usb/dwc3/dwc3-qcom.c
Here:
https://patches.linaro.org/cover/470387/
There's no serialisation guarantee between parent and child on
of_platform_populate() - at least none I'm aware of.
---
bod
Powered by blists - more mailing lists