Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3395736pxb; Wed, 13 Oct 2021 05:16:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6iz83OBwCJPOdKrJ3ay3+E7IwaJ7+NRyisVd17ZKleKnfNTSEqKkss1o3aFYEGu9F9PJV X-Received: by 2002:a17:90b:38c6:: with SMTP id nn6mr12999834pjb.206.1634127410120; Wed, 13 Oct 2021 05:16:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634127410; cv=none; d=google.com; s=arc-20160816; b=J3O3rbB7fptqWrhjoxgmxRM913CBi9gtXxNq6LpZeLI9Wos3+ds7sdZWXJswHZ1SZ/ kMv8WshyqedMJ5xw3WP+hHVFj7NnJoofT2cpjgK82dvWqT8x52zbZha7v8x3LCgC3pjY ninYYy/ApX/K1GgC3Elncgmkj+bp1TaN9O1lPTpLf8yPWIetL7ZhhfSToqulBd/rgKgN cDwvMIOCVlBqj3AASooviEE+ysz6XWekfBaL/GjE+Ds2kMqJ86kTrekKuJ5fJTe12YVj iWJ9kzd8Aw51iehkwH4DSHb1GVssg0A6TNUTxlBgSgh74F47IEMDUpJf7nHykPxGmeyn LhJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=dMRaftnF9U+W3ku1B/GD71FJ+aEgoWgdI3sg+irCBSU=; b=RMjds/HmclklIydqkMO/denho21fIyTChMINfr+tqGW5I4nFhNm3NayZ4krJ2lFMqr Gf3zSlNRzg514MkEdMxamVHWrqCxP/4QIgod+5BR4As3gP2aHrYb5N11mPQsVhMkvhiX sW6mTp0phQGF2jIoIw1+M9C3ADaP2BtekVyRO52fdAsjIczkDhzcU51Idpyi2oAThOdP BDKrQu8Cu7pLwtPtDDLhfLMbZV19quCxRuIcdqI2AS8Mq0okYcVkHgWNFwDtDJEiCh/M YLi+H26/SQVSo2QUNTi9Tf59vYibwyoDK3vOcVHWuJt+9FfuzrTNGEMM93iTHvJcC/sR H1JA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=MhciuyvS; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x31si1701943pga.635.2021.10.13.05.16.33; Wed, 13 Oct 2021 05:16:50 -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=@ffwll.ch header.s=google header.b=MhciuyvS; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232807AbhJMMQu (ORCPT + 99 others); Wed, 13 Oct 2021 08:16:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232260AbhJMMQp (ORCPT ); Wed, 13 Oct 2021 08:16:45 -0400 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A272C061746 for ; Wed, 13 Oct 2021 05:14:42 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id y3so7727997wrl.1 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=KE4UZtogfT3C6hWTyQa8ApQrMAyNVW6s9sMEawwPaMjgMeZr8vwqAfyhoBXTkCfSMq ScDmXN3868u6vI1Kxadiq1i1WzPBZM2u6+1oN8abFPwbpY6w/0irhKUqdZaUK9HJUCYS zeIIz02lIW7o9BdLIYBqXBdtaKsoKETG5iLrdvdkob8FVrL5zbRT+GMzKh8tZ0PikRIG GYqDs2Tym6oTOkcL7qkM1FgBeoxeHNIZ2zIUTfEk6dZ2zT2yMXwDoItCkzCH0ZqPWwaE VPyfw7U2xPcbwBjxtyMIU7UFPJYN6wBgtNTpkMII+CRpfa4ONhkrKuHtyUeXleF5msBe C6vA== X-Gm-Message-State: AOAM530T++0GIHdzi1CygzrvEITSEGBD8xhB1jXCEb6SB19Iu7d60CKZ UX00N+GVDnLKT7mEO4j1r/+tzg== 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-kernel@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