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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5425DC433EF for ; Thu, 28 Apr 2022 12:14:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 855F310E2B9; Thu, 28 Apr 2022 12:14:25 +0000 (UTC) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6F11B10E2B9 for ; Thu, 28 Apr 2022 12:14:24 +0000 (UTC) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id D77FF5C012B; Thu, 28 Apr 2022 08:14:20 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 28 Apr 2022 08:14:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; t=1651148060; x=1651234460; bh=BuvGzV88SC mh1JFEdrv7+gxKbeg4HVTmRcYTbtYYKR0=; b=OvUiA324eN4kWPK0Pel/N6L4Gw VGeFuxFV65atQJ0bCJPJIwr4Pa7joTXptvJhz6lNdkRjORgFZKeaS+kl1Mxm+TlO lAUYfYt0orEgwSPRiKGO6Xkr6e5JyH+Pcii4NlFHJg5P/DuLKdOJ4FoS/4Fi7dzR zTR5veXo++UOqSWKjEeFgIOBN1rfA21Am+0EwIyEyRfipzOp6svGj5uZpS84tD+3 YXZI1Sg/WeDDHDyC57vDUNy2h7Sgi06e0KZbbo4gesqlJd4dBaop1zRIkr9sBIQw BUNQcQH10JG1l29mHKhpRyp2eGrFDJXiZE1yj4MglaNiF6JjbVtbpzyYUwBQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1651148060; x= 1651234460; bh=BuvGzV88SCmh1JFEdrv7+gxKbeg4HVTmRcYTbtYYKR0=; b=Z 3Coe7BOTXgdcwRHxVQZcd796M5GEGKx0pMDHQPEc31MnGDLbu1oleTYzEEwZhw5V jpREeQE3+QSOEoyM1ZHnlFLTy7BUBPItvjfHl/q0Uz+MMNtndSYnp7YkDqf10PjN rb00FWJyjIopLH/RlJ5BSGCXf9vZvfjGgMXMGPqw+jssfJPQjaTbmJhoM/rFTZp6 mMiiCKjQfRX7jLFwXbBdVvIH1beBJvR7+yu8jwp644vr93TudlN8CiaPPZ5gVksT XLG8sn8YjD+51zdhDcS0sHoHO7S2cV+10z8oxgM/VU6e4OKFXfp4sK+X977Ip5x2 gSJ307j+Uce0RBtc24ixQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudejgdehtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepteefffefgfektdefgfeludfgtdejfeejvddttdekteeiffejvdfgheehfffh vedunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmh grgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 28 Apr 2022 08:14:19 -0400 (EDT) Date: Thu, 28 Apr 2022 14:14:17 +0200 From: Maxime Ripard To: Jagan Teki Subject: Re: [PATCH] drm: exynos: dsi: Use child panel or bridge find helpers Message-ID: <20220428121417.74guaowmzrh7pc2f@houat> References: <20220428094808.782938-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="bxqf4eu4sf3wkxie" Content-Disposition: inline In-Reply-To: <20220428094808.782938-1-jagan@amarulasolutions.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-samsung-soc@vger.kernel.org, linux-amarula@amarulasolutions.com, dri-devel@lists.freedesktop.org, Marek Szyprowski Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" --bxqf4eu4sf3wkxie Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 28, 2022 at 03:18:08PM +0530, Jagan Teki wrote: > commit <711c7adc4687> ("drm: exynos: dsi: Use drm panel_bridge API") > added devm_drm_of_get_bridge for looking up if child node has panel > or bridge. >=20 > However commit ("Revert "drm: of: Lookup if child node > has panel or bridge") has reverted panel or bridge child node lookup > from devm_drm_of_get_bridge which eventually failed to find the DSI > devices in exynos drm dsi driver. >=20 > So, use the conventional child panel bridge lookup helpers like it > does before. >=20 > Signed-off-by: Jagan Teki > --- > drivers/gpu/drm/exynos/exynos_drm_dsi.c | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/ex= ynos/exynos_drm_dsi.c > index f067c86b0b12..ec673223d6b7 100644 > --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c > +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c > @@ -25,6 +25,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -1451,9 +1452,18 @@ static int exynos_dsi_host_attach(struct mipi_dsi_= host *host, > struct device *dev =3D dsi->dev; > struct drm_encoder *encoder =3D &dsi->encoder; > struct drm_device *drm =3D encoder->dev; > + struct drm_panel *panel; > int ret; > =20 > - dsi->out_bridge =3D devm_drm_of_get_bridge(dev, dev->of_node, 1, 0); > + panel =3D of_drm_find_panel(device->dev.of_node); > + if (!IS_ERR(panel)) { > + dsi->out_bridge =3D devm_drm_panel_bridge_add(dev, panel); > + } else { > + dsi->out_bridge =3D of_drm_find_bridge(device->dev.of_node); > + if (!dsi->out_bridge) > + dsi->out_bridge =3D ERR_PTR(-EINVAL); > + } > + We should just revert 711c7adc4687 entirely (and make it very explicit in the commit log). The out_bridge lifetime is completely screwed-up in that patch now. If there's a panel it will be managed, but it's not if there's a bridge. Maxime --bxqf4eu4sf3wkxie Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYmqFGQAKCRDj7w1vZxhR xeOZAQC4mSLIsmmR1XPywwTzczr2htIO3YhcmsM6Lp5uA2Bg/AEA40Joh0qR3g7y 2fwdr9kzbD0rXuZ67316kBlqIGNDOQU= =QLoJ -----END PGP SIGNATURE----- --bxqf4eu4sf3wkxie--