From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9FA9AC433EF for ; Thu, 7 Oct 2021 20:46:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7DC2760EDF for ; Thu, 7 Oct 2021 20:46:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233949AbhJGUsS (ORCPT ); Thu, 7 Oct 2021 16:48:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232458AbhJGUsS (ORCPT ); Thu, 7 Oct 2021 16:48:18 -0400 Received: from mail-ot1-x332.google.com (mail-ot1-x332.google.com [IPv6:2607:f8b0:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9621C061755 for ; Thu, 7 Oct 2021 13:46:23 -0700 (PDT) Received: by mail-ot1-x332.google.com with SMTP id r43-20020a05683044ab00b0054716b40005so9062383otv.4 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=KiHizwxNQA50x2Gnf5yyRoZ6iZlSRw7xigWqQPrtSvWlsyR1fYwGgNk/0dVSwEZMxZ ZgM8mPCg/P7+1m3GsnJGK64npq6/R7OoRo84D8PQH2zgtuCGlss6QkvCsfdtL40PLevD LRW4kpQ7jHOoN8rTu0NBcrdDhXWSkmUnS3ayi2kbZ/AUKYYdEjturKjV7P7hJGCicwc8 98bKpb6lCVqKPgFnpDOgwYNQ7y4/FUF2DS/i/GwooTCqOlYWEHkoDG0ZeyguYmyxjhAc zJ5HKG4MgK+sydfKTHh+360n9tUadAM93Tld/kQVzw3BAJB0LiLG9uj1oyQdSQKy8SlD Jkwg== X-Gm-Message-State: AOAM533dkTrxQws9OQdqRtRmT3fe0NDV+9BOXXJtSN8uQd80/OP1B8O6 rN7ncq4fw4wgTzq5gPWKILZ2OEs3OPOGBIeiNakuEQ== X-Google-Smtp-Source: ABdhPJweLV2SqPIqB/I4y9UNqm9St3+8NImkU0IzW6xIcGeoqaYzaiZnETNJ/uKVGt4qTegoVLXLut8mi4j1L8pdWt0= 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-arm-msm@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.