From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Ripard Subject: Re: Re: [PATCH v2 5/9] drm/sun4i: tcon_top: Register clock gates in probe Date: Mon, 17 Jun 2019 16:54:20 +0200 Message-ID: <20190617145420.e7yfrmmhdhift5id@flea> References: <20190614164324.9427-1-jagan@amarulasolutions.com> <20190614164324.9427-6-jagan@amarulasolutions.com> <20190617114503.pclqsf6bo3ih47nt@flea> Reply-To: maxime.ripard-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="jzvxnzdlcqa2ksrf" Return-path: Sender: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Content-Disposition: inline In-Reply-To: List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: Chen-Yu Tsai Cc: Jagan Teki , David Airlie , Daniel Vetter , dri-devel , linux-arm-kernel , linux-kernel , devicetree , Jernej Skrabec , Michael Trimarchi , linux-sunxi , linux-amarula List-Id: devicetree@vger.kernel.org --jzvxnzdlcqa2ksrf Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline On Mon, Jun 17, 2019 at 09:01:33PM +0800, Chen-Yu Tsai wrote: > On Mon, Jun 17, 2019 at 7:45 PM Maxime Ripard wrote: > > > > On Fri, Jun 14, 2019 at 10:13:20PM +0530, Jagan Teki wrote: > > > TCON TOP have clock gates for TV0, TV1, dsi and right > > > now these are register during bind call. > > > > > > Of which, dsi clock gate would required during DPHY probe > > > but same can miss to get since tcon top is not bound at > > > that time. > > > > > > To solve, this circular dependency move the clock gate > > > registration from bind to probe so-that DPHY can get the > > > dsi gate clock on time. > > > > It's not really clear to me what the circular dependency is? > > > > if you have a chain that is: > > > > tcon-top +-> DSI > > +-> D-PHY > > > > There's no loop, right? > > Looking at how the DTSI patch structures things (without going into > whether it is correct or accurate): > > The D-PHY is not part of the component graph. However it requests > the DSI gate clock from the TCON-TOP. > > The TCON-TOP driver, in its current form, only registers the clocks > it provides at component bind time. Thus the D-PHY can't successfully > probe until the TCON-TOP has been bound. > > The DSI interface requires the D-PHY to bind. It will return -EPROBE_DEFER > if it cannot request it. This in turn goes into the error path of > component_bind_all, which unbinds all previous components. > > So it's actually > > D-PHY -> TCON-TOP -> DSI > ^ | > |-------------------- > > I've not checked, but I suspect there's no possibility of having other > drivers probe (to deal with deferred probing) within component_bind_all. > Otherwise we shouldn't run into this weird circular dependency issue. > Ah, yes, that makes sense. It should be cleraer in the commit log then. Thanks! Maxime -- Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com --jzvxnzdlcqa2ksrf--