Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp25488pxf; Wed, 24 Mar 2021 19:45:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyv5C8JlhtAAlQeOewBL12rx9NZeJX5CuheFiZtiGnAo/GoHuH/CQuX1od3xXpSaPJNr50s X-Received: by 2002:a17:906:405b:: with SMTP id y27mr7097885ejj.332.1616640338528; Wed, 24 Mar 2021 19:45:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616640338; cv=none; d=google.com; s=arc-20160816; b=tztVf9//ZloUbnddp4WuJqFO9N8qyE6MDrg/V7jTl4RxvgM0S6O4E0e53LCXrhH0wk b9qIFIzTfmsNgf5SGAgO5R1n0CDpjwRZWRePIorHY/NdfBn+UTa+2YP/8Pgh+f7niLHz 0WgaTShQHQhvAYUWowSBhMScrfLM379eS8o2CiU3VzDk9HQXBJXKTfWDXZWrj4GNDNJ6 JcKKI+ZCqrwFYVfPfTMbb5xXzfgmtWb89di07lk8/8zKZz9+k6IHPfm0Rz7NaHhCBxVC IyIShahhH2L38lQJC5aSSTF6dA0WwPjH3r5tWYpb1g/Wu3pv3DMDSbKmJep0xn+Lc7ZC KYag== 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:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=+wQbldXodj/75p2l96uhI6Hek8zqcssRoaEMguqNWGM=; b=HQvNUA35sWNkGGHDFbv+W5cnqYsiVJuyuSIRpx8tb7CGuPk4s+X/yvnCPMxJvOSeEJ Nkivn46EHZ/Z3LTZ9GS7/3gqg1VTkE4ydjLFa8GpHj/heCvNv2AdbMchCgilu1cG8b/9 pal8iwUIbMYlFdQpmVEfYeesbA46bXhwG9DS5X6GRi+GAQbHE08ILxjWLm9Y905hZ/Kq d/dpoGWa8Pd9slZ0wIwHk9hDTj/KxOsogTjP0R18ULBvw3CFNazoxEkEQPWOxVFShkMC e9C4OA14kGvP1zk1KhxIQSTzgBJtSc+khqhnqWCcUi95GHUaeQsvaaOMH3TUrMpD1It+ 4WCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm2 header.b="TL21/JHi"; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=C20aS6qv; 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=cerno.tech Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z13si2872109edc.6.2021.03.24.19.45.16; Wed, 24 Mar 2021 19:45:38 -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=@cerno.tech header.s=fm2 header.b="TL21/JHi"; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=C20aS6qv; 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=cerno.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229904AbhCXKLf (ORCPT + 99 others); Wed, 24 Mar 2021 06:11:35 -0400 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:52757 "EHLO wout3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229669AbhCXKLR (ORCPT ); Wed, 24 Mar 2021 06:11:17 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 12751D6D; Wed, 24 Mar 2021 06:11:15 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 24 Mar 2021 06:11:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=+wQbldXodj/75p2l96uhI6Hek8z qcssRoaEMguqNWGM=; b=TL21/JHiqptwbT7hJ3+/ZmItwMc3LKk7LrRBg3BiB+2 0oE/xykRj8ur8gwWgEy4Z7QwQU8kIGSoDqwIAdGY74mp3FkZQ2afaMLl3v1yUclX 5PnDYYD7EhivFmGYIEgCd3iUjPPdqK6/sjV+GHEzYFDjAvawO7V/29+qByntk5/q IENXTFMgB2MyOmFriJlvCoiOYnAr9GgzRS/UlKaiC4iYVy8HFBBH3b51nod1LCsP B7f23i+vSTu2yfWAfJl6399I5VaXiLeoJbtUXutEBDWmXusB8JumbAu1+wJg3vuF 7r4HZ4Zemhfmb47Q8Z7hzntl5DiUnWiBA1+JTFuh4Wg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=+wQbld Xodj/75p2l96uhI6Hek8zqcssRoaEMguqNWGM=; b=C20aS6qvips2PFG84xF/JZ +siHrFDdTkoZvgqXUNtt3iGVEAIu8UtjzJL1ZmuGePHi81mNXTEtucVKm98beXMh uV9+q/oZuEIOs2JYuuAtx/qbE8XbyHkXTbc7GCbVJivwEvDjRQZdA2pxrokWdKLc D2VMDThyTcAJcHfpYdCH4ea3UlTkHZNuZIz33o8BQm0J7hy9fFci3hyms+Tcdf7h Olr7pzBMBjqm+6tzP50US+8FZkqg73ki7a8TBSDB9AF8ZhuPB8yZnQqtPlJWwZMg /rDKL8D5FrqMUrR8dEf0M2UgEb0M5TdQIqSpvDXBgLlYwEXE3fQY9MXcvChud1AA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudegkedgudduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepveevfeffudeviedtgeethffhteeuffetfeffvdehvedvheetteehvdelfffg jedvnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucfkphepledtrdekledrieekrd ejieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehm rgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: from localhost (lfbn-tou-1-1502-76.w90-89.abo.wanadoo.fr [90.89.68.76]) by mail.messagingengine.com (Postfix) with ESMTPA id 68161108005C; Wed, 24 Mar 2021 06:11:12 -0400 (EDT) Date: Wed, 24 Mar 2021 11:11:09 +0100 From: Maxime Ripard To: Laurent Pinchart Cc: Jagan Teki , Samuel Holland , Chen-Yu Tsai , Jernej Skrabec , dri-devel , linux-arm-kernel , linux-kernel , linux-amarula , linux-sunxi Subject: Re: [PATCH v4 1/4] drm: sun4i: dsi: Use drm_of_find_panel_or_bridge Message-ID: <20210324101109.k46k3l7bksvxhll5@gilmour> References: <20210322140152.101709-1-jagan@amarulasolutions.com> <20210322140152.101709-2-jagan@amarulasolutions.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="kp676o7nybn544nt" Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --kp676o7nybn544nt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 24, 2021 at 11:55:35AM +0200, Laurent Pinchart wrote: > Hi Jagan, >=20 > On Wed, Mar 24, 2021 at 03:19:10PM +0530, Jagan Teki wrote: > > On Wed, Mar 24, 2021 at 3:09 PM Laurent Pinchart wrote: > > > On Wed, Mar 24, 2021 at 02:44:57PM +0530, Jagan Teki wrote: > > > > On Wed, Mar 24, 2021 at 8:18 AM Samuel Holland wrote: > > > > > On 3/23/21 5:53 PM, Laurent Pinchart wrote: > > > > > > On Mon, Mar 22, 2021 at 07:31:49PM +0530, Jagan Teki wrote: > > > > > >> Replace of_drm_find_panel with drm_of_find_panel_or_bridge > > > > > >> for finding panel, this indeed help to find the bridge if > > > > > >> bridge support added. > > > > > >> > > > > > >> Added NULL in bridge argument, same will replace with bridge > > > > > >> parameter once bridge supported. > > > > > >> > > > > > >> Signed-off-by: Jagan Teki > > > > > > > > > > > > Looks good, there should be no functional change. > > > > > > > > > > Actually this breaks all existing users of this driver, see below. > > > > > > > > > > > Reviewed-by: Laurent Pinchart > > > > > > > > > > > >> --- > > > > > >> Changes for v4, v3: > > > > > >> - none > > > > > >> > > > > > >> drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 11 ++++++++--- > > > > > >> 1 file changed, 8 insertions(+), 3 deletions(-) > > > > > >> > > > > > >> diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/= gpu/drm/sun4i/sun6i_mipi_dsi.c > > > > > >> index 4f5efcace68e..2e9e7b2d4145 100644 > > > > > >> --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c > > > > > >> +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c > > > > > >> @@ -21,6 +21,7 @@ > > > > > >> > > > > > >> #include > > > > > >> #include > > > > > >> +#include > > > > > >> #include > > > > > >> #include > > > > > >> #include > > > > > >> @@ -963,10 +964,14 @@ static int sun6i_dsi_attach(struct mipi_= dsi_host *host, > > > > > >> struct mipi_dsi_device *device) > > > > > >> { > > > > > >> struct sun6i_dsi *dsi =3D host_to_sun6i_dsi(host); > > > > > >> - struct drm_panel *panel =3D of_drm_find_panel(device->dev= =2Eof_node); > > > > > > > > > > This is using the OF node of the DSI device, which is a direct ch= ild of > > > > > the DSI host's OF node. There is no OF graph involved. > > > > > > > > > > >> + struct drm_panel *panel; > > > > > >> + int ret; > > > > > >> + > > > > > >> + ret =3D drm_of_find_panel_or_bridge(dsi->dev->of_node, 0,= 0, > > > > > >> + &panel, NULL); > > > > > > > > > > However, this function expects to find the panel using OF graph. = This > > > > > does not work with existing device trees (PinePhone, PineTab) whi= ch do > > > > > not use OF graph to connect the panel. And it cannot work, becaus= e the > > > > > DSI host's binding specifies a single port: the input port from t= he > > > > > display engine. > > > > > > > > Thanks for noticing this. I did understand your point and yes, I did > > > > mention the updated pipeline in previous versions and forgot to add= it > > > > to this series. > > > > > > > > Here is the updated pipeline to make it work: > > > > > > > > https://patchwork.kernel.org/project/dri-devel/patch/20190524104252= =2E20236-1-jagan@amarulasolutions.com/ > > > > > > > > Let me know your comments on this, so I will add a patch for the > > > > above-affected DTS files. > > > > > > DT is an ABI, we need to ensure backward compatibility. Changes in > > > kernel drivers can't break devices that have an old DT. > >=20 > > Thanks for your point. > >=20 > > So, we need to choose APIs that would compatible with the old DT and > > new DT changes. Am I correct? >=20 > Yes, that's correct. However, I see no particular reason to change the DT binding in this case. The DSI devices are supposed to be described through a subnode of their DSI controller, that's the generic binding and except for very odd devices (and a bridge like this one is certainly not one), I see no reason to deviate from that. Maxime --kp676o7nybn544nt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYFsQPQAKCRDj7w1vZxhR xTMWAPoCqODHVwflYc37O1/gdVmLbZhcAVai6G99UtzoYOo5ygEArcWtqJ+TiVFf Y9qWwugKta+xfxFuIgIPVB46nGBixA4= =NGvV -----END PGP SIGNATURE----- --kp676o7nybn544nt--