lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAE-0n52ytNtf5atojYrLviuAKOt3v+mLVoPeqtRUf-6uBpkiJA@mail.gmail.com>
Date:   Thu, 7 Oct 2021 21:24:03 -0400
From:   Stephen Boyd <swboyd@...omium.org>
To:     Saravana Kannan <saravanak@...gle.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org,
        dri-devel@...ts.freedesktop.org, freedreno@...ts.freedesktop.org,
        Daniel Vetter <daniel.vetter@...ll.ch>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Rob Clark <robdclark@...il.com>,
        Russell King <rmk+kernel@....linux.org.uk>
Subject: Re: [PATCH v2 02/34] component: Introduce the aggregate bus_type

Quoting Saravana Kannan (2021-10-07 18:10:24)
> On Thu, Oct 7, 2021 at 1:11 PM Stephen Boyd <swboyd@...omium.org> wrote:
> >
> > Quoting Stephen Boyd (2021-10-07 11:40:07)
> > > Quoting Saravana Kannan (2021-10-06 20:07:11)
> > > > On Wed, Oct 6, 2021 at 12:38 PM Stephen Boyd <swboyd@...omium.org> wrote:
> > > > > diff --git a/drivers/base/component.c b/drivers/base/component.c
> > > > > index 0a41bbe14981..d99e99cabb99 100644
> > > > > --- a/drivers/base/component.c
> > > > > +++ b/drivers/base/component.c
> > > [...]
> > > > > +                       continue;
> > > > > +
> > > > > +               /* Matches put in component_del() */
> > > > > +               get_device(&adev->dev);
> > > > > +               c->link = device_link_add(&adev->dev, c->dev,
> > > > > +                                         DL_FLAG_STATELESS | DL_FLAG_PM_RUNTIME);
> > > >
> > > > Remove the STATELESS flag and you'll get a bunch of other stuff done for free:
> > >
> > > I tried that and it didn't work for me. The aggregate device never
> > > probed and I was left with no display. Let me see if I can reproduce it
> > > with logging to provide more details.
> >
> > This patch fixes it (whitespace damaged sorry).
>
> Not sure why you have to trigger an explicit rescan, but instead of
> this patch below, you could also try setting this flag instead?
> DL_FLAG_AUTOPROBE_CONSUMER
>

I'd rather not conflate component driver probe with component_add()
being called. It's simpler if that is the case, i.e. all component
drivers are calling component_add() in their driver probe routine, but I
don't know if that's always true. I did this poor audit of the kernel

$ git grep -p \[^_]component_add | grep \.c=  | grep -v probe
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c=static int
amdgpu_dm_audio_init(struct amdgpu_device *adev)
drivers/gpu/drm/i915/display/intel_audio.c=static void
i915_audio_component_init(struct drm_i915_private *dev_priv)
drivers/gpu/drm/i915/display/intel_hdcp.c=void
intel_hdcp_component_init(struct drm_i915_private *dev_priv)
drivers/gpu/drm/nouveau/dispnv50/disp.c=nv50_audio_component_init(struct
nouveau_drm *drm)
drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c=static int
dw_mipi_dsi_rockchip_host_attach(void *priv_data,
drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c=static int
dw_mipi_dsi_dphy_init(struct phy *phy)
drivers/gpu/drm/vc4/vc4_dsi.c=static int vc4_dsi_host_attach(struct
mipi_dsi_host *host,

and then peeking at rockchip above I see that component_add() is called
in the mipi dsi attach ops and then I got lost trying to figure out
where it ends up. Maybe it is still in some probe call?

Anyway, I think we still have to do a rescan so that we can try to bind
the aggregate device. Is there a better API to use for that?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ