Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp3987062ioa; Tue, 26 Apr 2022 14:09:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5AohKIWlvZXMHQvvU3JufDhnlCb83Hke4T07qqAxV7qyOZxp2dpgyVXAUx6GgPfHv1PSl X-Received: by 2002:a05:6402:d52:b0:425:dda4:b676 with SMTP id ec18-20020a0564020d5200b00425dda4b676mr15738223edb.277.1651007350283; Tue, 26 Apr 2022 14:09:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651007350; cv=none; d=google.com; s=arc-20160816; b=Kyo/JJdlR/FHUlloK5fUKnttJNgT4cuLdZen2+w0dqUS36c+DnsVgfX7+MQ9zy/k04 0Tp838IZGEC4EpSmwCM6yPSuJQw/jzNPn8ZX5n7QktZI1k2ujgX/XkbLUyQU8fyIQOCH 2zQJpPtwgR7IFU7i5OWABdDP8hsfT/yQkYBQk0YAsSkcD0tC/vpHOq3OqtM1Co5NIqi5 z/Nwee0BgIx27uKIZP4GcBQsmLk0m0S5DCSmRLn8fZv8gSLkum0eMMyjaR9iQU+RouEU uhA3OW8Vdp5OoATFihjjSmEHzkBNUz9Oi0NbgEkPDmWayb1qDexgxfDl7lYFmMDPPNn8 2vMg== 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=bkzAlLIoQSawEUnz7mkXtxaOlW4qcmEvjLrJFPw9Xr0=; b=mUeIQ6Er+6nsolb5eKlZds670OhW4u47krlmDBi06KTyO4LG9hlqyrFeqXIhNIKEBX ctpRJ60vHFbfOsrgj01gv8wJID+dgLej9IowA8Jh/5pZiXgXmA2KpVznAflqFBzmw/rs RrcRv3berVMtlUzpE541oC88aw/CGfqsaY98vvU/1+Dvak/OFkAu86KwCm59azCSxER9 u7q50Q1JyctXnmZZ7AWJGaY3LDEWlDdUoWaepqGjT0NKqFXexwh6HpD4XivpNrnCPRus c3siaighSpH72q40D18Ofus1tcI4Z9U5taEn3/U3oHfouVBNTws+cK2dbv2olgu1DCb2 hDFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm3 header.b=hpeRNI52; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=ePW2B72i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u21-20020a17090617d500b006e89c67c5fbsi15854380eje.22.2022.04.26.14.08.39; Tue, 26 Apr 2022 14:09:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm3 header.b=hpeRNI52; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=ePW2B72i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S1350209AbiDZMyd (ORCPT + 99 others); Tue, 26 Apr 2022 08:54:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350208AbiDZMyb (ORCPT ); Tue, 26 Apr 2022 08:54:31 -0400 Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33F5017B9AA for ; Tue, 26 Apr 2022 05:51:24 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 90E195C0106; Tue, 26 Apr 2022 08:51:23 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Tue, 26 Apr 2022 08:51:23 -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=1650977483; x=1651063883; bh=bkzAlLIoQS awEUnz7mkXtxaOlW4qcmEvjLrJFPw9Xr0=; b=hpeRNI523p/syAbZiXp6FOclQP lLtz+Q4WAxippoCu9gR9rdrdf/xjboZTwVso9WzoIs5Drn9Tis5EflPM5ftqatNY 96sMLT4Gb6PxRNT34TkFRBo1ZX6VrZhKieugfWgoK0zPESt5Rv1e3GRICBBwTLu9 cPAWuR2iONTelV15YbOeA7CSR39GJUlIZ4IvRumAiYatdPeyGGza2eCtBGnD3BUM M8nXNAMHEpABQgSg/pSklIJtCY//3IQjYmDxswz3Aiv89+m+WrpVDBASCZRtxnsx g2hf0jp3SeBE74q5Ad/avbLdR1m8Jb73BYU/KGh2ryT8t3ZD5gmZYO6eFMtA== 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=1650977483; x= 1651063883; bh=bkzAlLIoQSawEUnz7mkXtxaOlW4qcmEvjLrJFPw9Xr0=; b=e PW2B72iQGyE7nHjCnOKFjZymHCBp2J7lo2+bgf47WeJqB9aioNmziq6n+gHjHHhj H+R2rpC9e9BgM7oGQQ4ue+NrSeQAlALKHeeNC2ofFgAf2Vzej7delJeD+pTx2M6l q/Jv3GrZLiyS2lSPVZa8uJfRQDh2kEsk3xTJsZ7XFb1W3Dxk78XagJ6xrz8QofFG lzPbnPtLeuJ6Ti3a/8XWR+wAWzvtFRQ9QKFrEmzuKanAbviUgSOwyxx8htEQ507v CKSMfAEvSf/HsSToskSyHwcl2zTMFiz9Qsu/gKWoSTfmxpGfuiRZJnCH4lnHjnlK 7FN7cRhfeyfnIqwwcZD7w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudefgdehgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepteefffefgfektdefgfeludfgtdejfeejvddttdekteeiffejvdfgheehfffh vedunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmh grgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 26 Apr 2022 08:51:22 -0400 (EDT) Date: Tue, 26 Apr 2022 14:51:20 +0200 From: Maxime Ripard To: Paul Kocialkowski Cc: Jagan Teki , Bjorn Andersson , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Thierry Reding , Rob Clark , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Linus Walleij , Marek Szyprowski , Laurent Pinchart , Robert Foss Subject: Re: [PATCH 2/2] Revert "drm: of: Lookup if child node has panel or bridge" Message-ID: <20220426125120.igco26jgedqbg7gq@houat> References: <20220420231230.58499-1-bjorn.andersson@linaro.org> <20220420231230.58499-2-bjorn.andersson@linaro.org> <20220421082358.ivpmtak3ednvddrc@houat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="c6hd5dy5ajyjrsut" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --c6hd5dy5ajyjrsut Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 26, 2022 at 09:54:36AM +0200, Paul Kocialkowski wrote: > On Thu 21 Apr 22, 10:59, Paul Kocialkowski wrote: > > Hi Maxime, > >=20 > > On Thu 21 Apr 22, 10:23, Maxime Ripard wrote: > > > On Thu, Apr 21, 2022 at 01:15:54PM +0530, Jagan Teki wrote: > > > > + Linus > > > > + Marek > > > > + Laurent > > > > + Robert > > > >=20 > > > > On Thu, Apr 21, 2022 at 4:40 AM Bjorn Andersson > > > > wrote: > > > > > > > > > > Commit '80253168dbfd ("drm: of: Lookup if child node has panel or > > > > > bridge")' attempted to simplify the case of expressing a simple p= anel > > > > > under a DSI controller, by assuming that the first non-graph chil= d node > > > > > was a panel or bridge. > > > > > > > > > > Unfortunately for non-trivial cases the first child node might no= t be a > > > > > panel or bridge. Examples of this can be a aux-bus in the case of > > > > > DisplayPort, or an opp-table represented before the panel node. > > > > > > > > > > In these cases the reverted commit prevents the caller from ever = finding > > > > > a reference to the panel. > > > > > > > > > > This reverts commit '80253168dbfd ("drm: of: Lookup if child node= has > > > > > panel or bridge")', in favor of using an explicit graph reference= to the > > > > > panel in the trivial case as well. > > > >=20 > > > > This eventually breaks many child-based devm_drm_of_get_bridge > > > > switched drivers. Do you have any suggestions on how to proceed to > > > > succeed in those use cases as well? > > >=20 > > > I guess we could create a new helper for those, like > > > devm_drm_of_get_bridge_with_panel, or something. > >=20 > > Oh wow I feel stupid for not thinking about that. > >=20 > > Yeah I agree that it seems like the best option. >=20 > Should I prepare a patch with such a new helper? >=20 > The idea would be to keep drm_of_find_panel_or_bridge only for the of gra= ph > case and add one for the child node case, maybe: > drm_of_find_child_panel_or_bridge. >=20 > I really don't have a clear idea of which driver would need to be switched > over though. Could someone (Jagan?) let me know where it would be needed? >=20 > Are there cases where we could both expect of graph and child node? > (i.e. does the new helper also need to try via of graph?) Yeah, we should figure it out this week. I mentioned this to Dave, who in turn talked about it Linus, so the fastest it's figured out the best. The helper would probably be best, but if you don't have time to do it by then, we can always revert those 3 patches until a helper is there. Maxime --c6hd5dy5ajyjrsut Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYmfqyAAKCRDj7w1vZxhR xZ+5AQDbkLpeptrXStRJGMAtSC9Yfh9x5WW8JZmaZY84TKASJgEAzE4K4iW2BTVX LgxJn8QMF+AdINUAVerCZbtqkP3HDA8= =g5uI -----END PGP SIGNATURE----- --c6hd5dy5ajyjrsut--