Re: [PATCH v1 3/3] Revert "Revert "driver core: Set fw_devlink=on by default""

From: Saravana Kannan
Date: Thu Mar 25 2021 - 18:03:36 EST


On Thu, Mar 25, 2021 at 2:19 PM Stephen Boyd <swboyd@xxxxxxxxxxxx> wrote:
>
> Quoting Saravana Kannan (2021-03-02 13:11:32)
> > This reverts commit 3e4c982f1ce75faf5314477b8da296d2d00919df.
> >
> > Since all reported issues due to fw_devlink=on should be addressed by
> > this series, revert the revert. fw_devlink=on Take II.
> >
> > Signed-off-by: Saravana Kannan <saravanak@xxxxxxxxxx>
> > ---
>
> This seems to break the display on lazor (see
> arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi) on linux next today
> (next-20210325). I tried booting with fw_devlink=permissive on the
> commandline and the display came up again. Looking at the drivers that
> are in the deferred state there are three:
>
> localhost ~ # cat /sys/kernel/debug/devices_deferred
> ae94000.dsi
> panel
> 2-002d
>
> and the panel has these suppliers:
>
> localhost ~ # ls /sys/devices/platform/panel/
> driver_override power supplier:platform:pp3300-dx-edp-regulator
> modalias subsystem uevent
> of_node supplier:i2c:2-002d waiting_for_supplier
>
> Is there some sort of circular dependency going on that is preventing
> either driver from probing? My understanding is 2-002d is the dsi bridge
> (compatible is ti,sn65dsi86) and that is waiting for the panel to come
> up, and the panel does a circular dependency where it requests the hpd
> gpio from the dsi bridge at probe but then ignores it and tries to get
> the hpd gpio later when powering on the panel. If it didn't do this it
> would probe defer forever because the bridge supplies the hpd gpio to
> the panel and the panel provides the panel to the bridge driver.

I had a side chat with Stephen. The problem is due to a cycle of
dependency between panel and bridge (supplier:i2c:2-002d). panel needs
GPIO from bridge, and bridge has panel as a remote-endpoint. But
fw_delink isn't able to break the cycle because it doesn't parse
"remote-endpoint" yet. So for now, only permissive will work for this
case.

I'll look into adding remote-endpoint support. But that's a bit more
complicated.

-Saravana

>
> > drivers/base/core.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/base/core.c b/drivers/base/core.c
> > index 45c75cc96fdc..de518178ac36 100644
> > --- a/drivers/base/core.c
> > +++ b/drivers/base/core.c
> > @@ -1538,7 +1538,7 @@ static void device_links_purge(struct device *dev)
> > #define FW_DEVLINK_FLAGS_RPM (FW_DEVLINK_FLAGS_ON | \
> > DL_FLAG_PM_RUNTIME)
> >
> > -static u32 fw_devlink_flags = FW_DEVLINK_FLAGS_PERMISSIVE;
> > +static u32 fw_devlink_flags = FW_DEVLINK_FLAGS_ON;
> > static int __init fw_devlink_setup(char *arg)
> > {
> > if (!arg)