Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1729294pxb; Thu, 7 Oct 2021 13:57:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/rCChRfIPu1nz+eoj8O9OLZmmh2lQRZX47ft/PAjFwbRoeF29K26UfmXhYYe+dIIwkRG5 X-Received: by 2002:a17:906:454a:: with SMTP id s10mr8447978ejq.11.1633640226058; Thu, 07 Oct 2021 13:57:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633640226; cv=none; d=google.com; s=arc-20160816; b=0XLQvq1MKYGYrioEXMspAcDsVg7dYz/gyd340K5ACIsErti61GwZoytX2SHoYPddmn C6O5dct528Ov/K1zc+9UDlivw1EFK2gw5vYtA2tx69F1nWniu1phWsINevZS2MZthCBS f/MBf0hpIhiSKcB3En1trlt4P+WkWloIj49g3guUBltFBems+YIHBBrd3wWkOj+Edlh1 ePgQlJm3k+6UFVLQchrtSfoEgO6My+b1bG+wvsoYPtEeaYjaPuh9CmtPZD0EufWSQIkv IF14ZqpDCcwywf+tpdBS0y/F+I/Mfi6xryke5vg3swt/NiDXeiElPr2KKKvBzgDPsog3 laKg== 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=AzPcN97cKsNPALhXpMD11mH7HEQFoOQxmRwJj4GT2BE=; b=yXRDtw5QKB1Jq1nUaMM03zDsjCtH2ouon60su1nsy0bW98ZoTeNZq3yM3qLcSW/ZsV YRaHa8eVQIB1i6f1aGGpmx+zFgvkMw3fTRu6QB3D/UsVKyeU3v686y3cvU0lJ+W4tHgS 3E5xs/rYpkqAMgAAm5No2icWNLcaMCAoBACEmd9APurHFI/ltODFxWevsGbK1/a+Q6+K uytolau48dD032qb+M+Fj2QDdu0658U+HsO7f1VKvS6VVzITdCPOxavwmmjUUuExqEIm ssYWjiHClQqaXD+7LaBDS1kYCF+h6jGMs6uqyMU7JM+dm3ZM0fNAtHnwjV7voeZqjpF4 h/dA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=VKE1L+LN; 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 j23si614495eje.21.2021.10.07.13.56.42; Thu, 07 Oct 2021 13:57:06 -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=VKE1L+LN; 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 S233976AbhJGUsT (ORCPT + 99 others); Thu, 7 Oct 2021 16:48:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241042AbhJGUsS (ORCPT ); Thu, 7 Oct 2021 16:48:18 -0400 Received: from mail-ot1-x335.google.com (mail-ot1-x335.google.com [IPv6:2607:f8b0:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE9E4C061760 for ; Thu, 7 Oct 2021 13:46:23 -0700 (PDT) Received: by mail-ot1-x335.google.com with SMTP id g62-20020a9d2dc4000000b0054752cfbc59so9161088otb.1 for ; Thu, 07 Oct 2021 13:46:23 -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=AzPcN97cKsNPALhXpMD11mH7HEQFoOQxmRwJj4GT2BE=; b=VKE1L+LNJEY5RERAvLjjCsaH/jdKjoku3gHwtdboexhAsqiGhsrBthGb5Bevr2KL0+ jYu0WOqYVJd76tRyLHu5v0RDHRXhT3UI5ixFqKcrvx4m/ZZosj+JGaDDjHY7+j87pVvj p0DVEPcEZ8ZyFwHVBRvaQza8MAbygGXJtdr9M= 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=AzPcN97cKsNPALhXpMD11mH7HEQFoOQxmRwJj4GT2BE=; b=hXOFuoWDIocyd2IQgI5+7s/QWwB+wQnXThjyTWmHB2mDdcyGiXUrejOraS8ovX7oB5 wW14uWGWX6VamCVqhCPojC2WueO7/5DmkxbPyxNkEq8R0VGM90RYhCoTNnZeexo/Ya+I czja74dzNGVhEtgxOr+aQ/9gAq6xEUxgnO8eVbLWwhJuHuLRjP3vQ3ClGGMcIEOQCOnu eGfibvFdAvTtX47AkAdZD6bky6gpPTPtmx74UDbEZhMhP6vglllFZhpicpqxzAz9khOM uZrpcTs5vXY+1FGrKo/rM1NLd5MrWp5aWXQMrG1GDR+8UQf3RMckdFGpKgR3IOkHYh3d jDUQ== X-Gm-Message-State: AOAM531VL+dF84fr6D0M2ld5bnzOlYeifSTVjQpIi7BQ+bpW52bCD7X/ r12Pl01ZumqyWoLzYNDoxv1+l4wZZfho6qHlMmljJQ== X-Received: by 2002:a05:6830:1c2e:: with SMTP id f14mr5293990ote.159.1633639583170; Thu, 07 Oct 2021 13:46:23 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 7 Oct 2021 16:46:22 -0400 MIME-Version: 1.0 In-Reply-To: <5d3f4343-da38-04b4-fdb9-cb2dd4983db2@gmail.com> References: <20211006193819.2654854-1-swboyd@chromium.org> <5d3f4343-da38-04b4-fdb9-cb2dd4983db2@gmail.com> From: Stephen Boyd User-Agent: alot/0.9.1 Date: Thu, 7 Oct 2021 16:46:22 -0400 Message-ID: Subject: Re: [PATCH v2 00/34] component: Make into an aggregate bus To: Andrzej Hajda , Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, Arnd Bergmann , Benjamin Gaignard , Chen Feng , Chen-Yu Tsai , Christian Gmeiner , Chun-Kuang Hu , Daniel Vetter , Emma Anholt , =?UTF-8?Q?Heiko_St=C3=BCbner?= , Inki Dae , James Qian Wang , Jaroslav Kysela , Joerg Roedel , John Stultz , Joonyoung Shim , Jyri Sarha , Kai Vehmanen , Kyungmin Park , Laurent Pinchart , linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, linux-pm@vger.kernel.org, Liviu Dudau , Lucas Stach , Mark Brown , Maxime Ripard , Neil Armstrong , Paul Cercueil , Philipp Zabel , "Rafael J. Wysocki" , Rob Clark , Russell King , Russell King , Russell King , Sandy Huang , Saravana Kannan , Sebastian Reichel , Seung-Woo Kim , Takashi Iwai , Tian Tao , Tomas Winkler , Tomi Valkeinen , Will Deacon , Xinliang Liu , Xinwei Kong , Yong Wu Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Andrzej Hajda (2021-10-07 03:16:27) > Hi Stephen, > > On 06.10.2021 21:37, Stephen Boyd wrote: > > This series is from discussion we had on reordering the device lists for > > drm shutdown paths[1]. I've introduced an 'aggregate' bus that we put > > the aggregate device onto and then we probe the aggregate device once > > all the components are probed and call component_add(). The probe/remove > > hooks are where the bind/unbind calls go, and then a shutdown hook is > > added that can be used to shutdown the drm display pipeline at the right > > time. > > > > This works for me on my sc7180 board. I no longer get a warning from i2c > > at shutdown that we're trying to make an i2c transaction after the i2c > > bus has been shutdown. There's more work to do on the msm drm driver to > > extract component device resources like clks, regulators, etc. out of > > the component bind function into the driver probe but I wanted to move > > everything over now in other component drivers before tackling that > > problem. > > > As I understand you have DSI host with i2c-controlled DSI bridge. And > there is an issue that bridge is shutdown before msmdrm. Your solution > is to 'adjust' device order on pm list. > I had similar issue and solved it locally by adding notification from > DSI bridge to DSI host that is has to be removed: mipi_dsi_detach, this > notification escalates in DSI host to component_del and this allow to > react properly. > > Advantages: > - it is local (only involves DSI host and DSI device), > - it does not depend on PM internals, > - it can be used in other scenarios as well - unbinding DSI device driver > > Disadvantage: > - It is DSI specific (but this is your case), I have advertised some > time ago more general approach [1][2]. > > [1]: https://static.sched.com/hosted_files/osseu18/0f/deferred_problem.pdf > [2]: https://lwn.net/Articles/625454/ > I think these are all points for or against using the component code in general? Maybe you can send patches that you think can solve the problem I'm experiencing and we can review them on the list.