Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1907469pxb; Thu, 7 Oct 2021 18:26:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVnb0J62V7DO9/GK5yh4nJe6DEbJKlU4K6riDggUukzPnkrHY90iZ+R4Yw+cuaXROuIX2Z X-Received: by 2002:a17:902:868d:b0:13d:dfa7:f3f2 with SMTP id g13-20020a170902868d00b0013ddfa7f3f2mr6855682plo.30.1633656413405; Thu, 07 Oct 2021 18:26:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633656413; cv=none; d=google.com; s=arc-20160816; b=N7q7D2QZagSOUAjLNvKpT57ZZLtw/x3xr5L44uwGLXslc0xw7fLEX11bFJNBBOz1/I L0D0UrfgiTEdt7bc+J7PI4WhxAzfkRsVQdO33l+yxZxH5vkmPp6H5bT2FF194jFn7i42 JvPapynfBO8kKjx8lwl/KD1VWWn/jQzXZly/Q9NOc3rguw4hdUG8Tr6Kyz2gn4L0BSqS peaIMbOGyYSBrPo4Eyi7z/iuVxrPmqzxHMDY2SaAmqbtMUPy2MLZ5ProsqcMA0BD6HQy rzmz1ptIjK52FloPi025HQID/X3ZPF80znZaiYgpHrfJycul+kTW1/nruTM6dVuH5W0V r3yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:user-agent:from :references:in-reply-to:mime-version:dkim-signature; bh=naG1P+MZ79esuZZtF4hMLGLIc5QCJUK3N1b3eboxXww=; b=LXjkrnB67Q+5KkLn8hUacvQlaiMWeMRcGuC0plXgTJOXPS5wzKis7PxIOCrHMNCzUZ O+tszfnp/b31/GvvrnDvsjIYoSNUQ0FKoHXTt0d2Fa3ZK+hUYWTAvA7uOxGN0vJWuGuu Qfv2dta7+06ym67AsfkxQZnILq22h7F9Od2N8cpzZa2j1F1ghfIuDGAmCEaND63CvLii 9VV5EdG6aBdH7H/KKC+y89QZMUaajAq9A0Y+7YzYAdTat7lR/DMEWm8MEkF7LWuMCv8p MnfkR7aYkuBt/mwPJR4EKyu7ZzK6fSOblTKAqXjpWthz2r2x5zMce15pDPYitZVdzQvv h2RQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=AeoKT6Ph; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h76si34089251pfe.316.2021.10.07.18.26.31; Thu, 07 Oct 2021 18:26:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=AeoKT6Ph; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229524AbhJHB0B (ORCPT + 99 others); Thu, 7 Oct 2021 21:26:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233976AbhJHBZ7 (ORCPT ); Thu, 7 Oct 2021 21:25:59 -0400 Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0FDDC061714 for ; Thu, 7 Oct 2021 18:24:04 -0700 (PDT) Received: by mail-oi1-x22c.google.com with SMTP id n63so11591726oif.7 for ; Thu, 07 Oct 2021 18:24:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:in-reply-to:references:from:user-agent:date:message-id :subject:to:cc; bh=naG1P+MZ79esuZZtF4hMLGLIc5QCJUK3N1b3eboxXww=; b=AeoKT6PhHNW1H+jjEz0WRm7QsKDIw2r9uDW8cmImCp6oNqJQEfV7B5dnkPNljyhMyI 9L1wWLtJRw2kOFJtji2bs6M4Beav2bPeAYCyttEMkPZv3cBVsQcz0BIB7PHcoHoJ4gIu qxHqzKAWcNYfnDYcmi9gv+3MVqTtYh9/pQ5No= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:in-reply-to:references:from :user-agent:date:message-id:subject:to:cc; bh=naG1P+MZ79esuZZtF4hMLGLIc5QCJUK3N1b3eboxXww=; b=UM4uOS8DhLVeJnXpzNdXjRBpQtUKhyEFhtp05k6XuswowIZpXgAOSdXd0Zawa/9L2k XO0HYRKAG83ZAdQqZEZLLVGbNhAHl7SFwzLFj0a+C3/xyz826y95rvONt5OHZIhTxFWD T4SINCFQbgM99yr0PXbo5PHI75yhzHAIGY+oh7TvSgOs8oZ/Se4AdYiqUHRZQ1H5dVN/ p9PF2tNsSwb3mvnBk+yz0ljDU5uFmzfmO2uewUVME866dT3yPmS4mna0FBTVoiovQMUY 8q5bk/v6I1PPMnyUDeP7E7ANIFQyEaQkm70z+lpx5gjTQp4VcANSzSZ2QLFNlbQGxTTW 3gzw== X-Gm-Message-State: AOAM533IZGN9kfNKg5KFHRA1h2WdlUmTfpYs41tZ84I7t04y6o2rl2zY 8KvHy4kz+xYzgzzauk5djtS2qlrDPpczwW3XI6ACEA== X-Received: by 2002:a05:6808:f8f:: with SMTP id o15mr14247028oiw.164.1633656244097; Thu, 07 Oct 2021 18:24:04 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 7 Oct 2021 21:24:03 -0400 MIME-Version: 1.0 In-Reply-To: References: <20211006193819.2654854-1-swboyd@chromium.org> <20211006193819.2654854-3-swboyd@chromium.org> From: Stephen Boyd User-Agent: alot/0.9.1 Date: Thu, 7 Oct 2021 21:24:03 -0400 Message-ID: Subject: Re: [PATCH v2 02/34] component: Introduce the aggregate bus_type To: Saravana Kannan Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, Daniel Vetter , "Rafael J. Wysocki" , Rob Clark , Russell King Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Saravana Kannan (2021-10-07 18:10:24) > On Thu, Oct 7, 2021 at 1:11 PM Stephen Boyd 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 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?