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 9EFCEC433FE for ; Wed, 13 Oct 2021 12:14:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 829AA610EA for ; Wed, 13 Oct 2021 12:14:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232749AbhJMMQt (ORCPT ); Wed, 13 Oct 2021 08:16:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232491AbhJMMQq (ORCPT ); Wed, 13 Oct 2021 08:16:46 -0400 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5749C061749 for ; Wed, 13 Oct 2021 05:14:42 -0700 (PDT) Received: by mail-wr1-x435.google.com with SMTP id v17so7600752wrv.9 for ; Wed, 13 Oct 2021 05:14:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=dMRaftnF9U+W3ku1B/GD71FJ+aEgoWgdI3sg+irCBSU=; b=MhciuyvSk02sHng4PyOacoSMmXkEirv4ROaG/YFOPm3C/PGs4IaqJa0KzfxdG/7GZy j0erLuzznKPfPq1SooRZKFK4Ph0eeQeU9mpXHHT+jpz7xE3bhD8wZpm0IH5MWOlJV1Vs JSjS/+eukQ+3NvBveep9Rvje8X5OHCWQU9oNk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=dMRaftnF9U+W3ku1B/GD71FJ+aEgoWgdI3sg+irCBSU=; b=UoW6EsWHYEexdlQT1vWzA75cG/1BIqZmp09uSK2Xel/67mDxPOR1+7/sVe3ZVeOitb ux1ny3WTncLcbHkGPoOkudJi4RvDODZY7f19tjHCmd+10xvnuudS7o7qDmkOfAl7BMSt 3uEwS/ufyuBn6fW/bn889g3Mu+5qGVTSHwmCwBImHvsLAY60S9YjgLb/IiL/0y58HZop YviftfhNCgZHyn76biccR74bjYBlQ5IyCpQj7z6ihvKq6sZZWSxzgWGnrB0y3QWfH13V 7rmXm/RssQoLOngyIjZWECxwM1ds6Ag6+jDKVGlmDVyaR6EPSds5PhHoqY2KZ1gEbFT3 sN1Q== X-Gm-Message-State: AOAM531ojW4AOWVHvV5GA7LyCtVGW9gyI4DT+Xzb3RTyrwoO+x79czfL naIP7umMBP24EyDaXtt9YdydIA== X-Google-Smtp-Source: ABdhPJwjQFtFTLxMhkElGP+tQ3IDjeuJllYWlfjQHSU4ZkxQZ996sxB4SGM/CwV1ziLNNbEonMsSKw== X-Received: by 2002:a05:600c:4ba9:: with SMTP id e41mr12535688wmp.70.1634127281038; Wed, 13 Oct 2021 05:14:41 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id q16sm13619647wru.39.2021.10.13.05.14.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Oct 2021 05:14:40 -0700 (PDT) Date: Wed, 13 Oct 2021 14:14:37 +0200 From: Daniel Vetter To: Stephen Boyd Cc: Andrzej Hajda , Greg Kroah-Hartman , 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 , Heiko =?iso-8859-1?Q?St=FCbner?= , 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 Subject: Re: [PATCH v2 00/34] component: Make into an aggregate bus Message-ID: Mail-Followup-To: Stephen Boyd , Andrzej Hajda , Greg Kroah-Hartman , 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 , Emma Anholt , Heiko =?iso-8859-1?Q?St=FCbner?= , 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 References: <20211006193819.2654854-1-swboyd@chromium.org> <5d3f4343-da38-04b4-fdb9-cb2dd4983db2@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: Linux phenom 5.10.0-8-amd64 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Thu, Oct 07, 2021 at 04:46:22PM -0400, Stephen Boyd wrote: > 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. Yeah I think this is entirely orthogonal. If you use component, then component should provide a way to handle this. If you use something else, like drm_bridge or dsi or whatever, then that part should provide a solution to stage stuff correctly and handle all the ordering. Now there's a bunch of drivers which mix up component with bridge use and hilarity ensues, but since there's no real effort to fix that I think it's toally fine to just improve component.c meanwhile. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch