Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4387162ioa; Wed, 27 Apr 2022 02:41:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxx+/yhAwowLTrYPH0aSkIxtN2sL8f9smXg7Y9OezQ4aa+lQ3zAfkgm/IeVB4TgT072QfQv X-Received: by 2002:a17:902:dad0:b0:15d:4ed2:5b1e with SMTP id q16-20020a170902dad000b0015d4ed25b1emr3116014plx.20.1651052491639; Wed, 27 Apr 2022 02:41:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651052491; cv=none; d=google.com; s=arc-20160816; b=mm7+jfM7LAf7+AkUIy9kE5rtMImldPw+E8/arEXsX5o/VniSh9acqxP2l3mBTYmNp3 ooCxPmHnMwvYf2rR0fmxBi0S37Xjkl7ZvE3l+n5zYXRYLNVFqY61qFmc3mvqrZhg4CkX 0LtZ9+5HWC9AwDorJvAgPlQqv25ymK0vHQrS/Sef0hKXQ/5KW/C9mkzjcvcFJx0np/+0 /PyW1IidL/i9oCrYfK5j47cgwFAjeSsYDnK30HvETo+GUti6YiZKFL+1+Dp3nOWm/ky0 7TD5dPoXiy4Gw7NFYbZ3zsUyQ9ii3z3HWuroDgwZqkFrJ0+C8LbOtQCmjFdp5o1R7T8L X0ew== 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=VyZAdGl8C8i715U0d6sExgdmQCSXB0Of5dCmp0HBEBk=; b=GxN82orGjGkXFiqW2nI0/O43UZA4MneB9VwTsngGdMLjsQBN+1qioxaD2Ku3kzoFxd GVgzO7k2jC8hi3dLOX02V4PsfEuBF+1siBgapKGfatXO0mf28oH4rlaoMrvy9e1vUFWc WaX9r263A/UnEzc24Y1Dnbwhx/Bbc9V4WBXkyeXRfflg26RZMl3RS5zDgoAV5FFKF/hy 1VgtTc0rr2rVuuUrRaGL8uGZP0ikI8lw1Lu2Y6tsWlFvxwTVLCYaKq3qTSleemh3VCbD 1rQt1ngBDHm+Jmqn0J/RodiDL8o0jTf/ktetRe1wkLzprBjLsyYUsFIrrYc9NewMWlB9 wmRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm3 header.b=a9jyohDA; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=Zyl0j64T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id s2-20020a17090a440200b001bd14e01f27si4646870pjg.21.2022.04.27.02.41.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 02:41:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm3 header.b=a9jyohDA; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=Zyl0j64T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A1B81271905; Wed, 27 Apr 2022 02:17:03 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242006AbiDZM7X (ORCPT + 99 others); Tue, 26 Apr 2022 08:59:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350247AbiDZM6z (ORCPT ); Tue, 26 Apr 2022 08:58:55 -0400 Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58C821FA67 for ; Tue, 26 Apr 2022 05:55:47 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id BD53C5C0118; Tue, 26 Apr 2022 08:55:46 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 26 Apr 2022 08:55:46 -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=1650977746; x=1651064146; bh=VyZAdGl8C8 i715U0d6sExgdmQCSXB0Of5dCmp0HBEBk=; b=a9jyohDAiaE0mNa5tsnZCrSbcd Kx14nTwUxia30K6c33g9UkMtbME7bvlGLpy4Ut1T0oRoniVKv6HAybyGXY1XETIk ptLjzKE1Hox56/J6/m4HU62I12925l75i8NZsiXOX4IEHOjhNdxGGpCZ+ljVWlOt xpspmeb13PdLVc3P1Mxb80IB7rjzf2EfzewbhINNS30EmWpB3OmpabQ9vY3gXVSo 09vHYYjbQieA6oAmZmVWG4MrChUg+zT5w3d07LYMcWu1FmCntAW6jEHJfRkrT6HB ncV3/bRPwth+qK+yaFicuYxntecsLTjmVC7uLtav8sH8vQ8YJLF38yzqeQMQ== 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=1650977746; x= 1651064146; bh=VyZAdGl8C8i715U0d6sExgdmQCSXB0Of5dCmp0HBEBk=; b=Z yl0j64TdFRHKgRljeGqQSxmcS8vB10l9vr4jWhFAJPqH2RGzG+bPQn7ou/rvXkEC nLbanxLbgOPwSv0L2KTIw770n61Hzmhn9vRQQBZs+ozRMszW82qgsQKHaurwo9vg qQhe2tSYcIUpH2c5sf3mGi0StpfVA+hpudIWAReI7+ijK4MMD9/HrDHb6M05ishu FkOE/BfYHIAfkecCH/cDsS4HD/AJ+gP31jHhw9v1ttOwmy+8yZeybYTX2X/oefQb aDXyoOrMUGRxDWw8ctY6Vt+ZKKmYfcPfee4FnOfTc2uwZlAQWxYaqn/I58QTQPqU Nom5qYv4PRLM6kMcjjS1w== 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:55:45 -0400 (EDT) Date: Tue, 26 Apr 2022 14:55:44 +0200 From: Maxime Ripard To: Paul Kocialkowski Cc: Laurent Pinchart , 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 , Robert Foss Subject: Re: [PATCH 2/2] Revert "drm: of: Lookup if child node has panel or bridge" Message-ID: <20220426125544.mroteu3hvyvlyb6g@houat> References: <20220420231230.58499-1-bjorn.andersson@linaro.org> <20220420231230.58499-2-bjorn.andersson@linaro.org> <20220421082358.ivpmtak3ednvddrc@houat> <20220426125401.yyrhg6aeafdjw4ad@houat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="f3ucqbymt5myqdco" Content-Disposition: inline In-Reply-To: <20220426125401.yyrhg6aeafdjw4ad@houat> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=no 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 --f3ucqbymt5myqdco Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 26, 2022 at 02:54:01PM +0200, Maxime Ripard wrote: > On Tue, Apr 26, 2022 at 02:41:44PM +0200, Paul Kocialkowski wrote: > > On Tue 26 Apr 22, 14:33, Laurent Pinchart wrote: > > > On Tue, Apr 26, 2022 at 09:54:36AM +0200, Paul Kocialkowski wrote: > > > > On Thu 21 Apr 22, 10:59, Paul Kocialkowski wrote: > > > > > 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 pa= nel or > > > > > > > > bridge")' attempted to simplify the case of expressing a si= mple panel > > > > > > > > under a DSI controller, by assuming that the first non-grap= h child node > > > > > > > > was a panel or bridge. > > > > > > > > > > > > > > > > Unfortunately for non-trivial cases the first child node mi= ght not 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 n= ode. > > > > > > > > > > > > > > > > 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 chil= d node has > > > > > > > > panel or bridge")', in favor of using an explicit graph ref= erence 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 proc= eed 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 graph > > > > 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 s= witched > > > > over though. Could someone (Jagan?) let me know where it would be n= eeded? > > > >=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?) > > >=20 > > > I still think we should use OF graph uncondtionally, even in the DSI > > > case. We need to ensure backward-compatibility, but I'd like new > > > bindings (and thus new drivers) to always use OF graph. > >=20 > > I just went over the thread on "drm: of: Improve error handling in brid= ge/panel > > detection" again and I'm no longer sure there's actually still an issue= that > > stands, with the fix that allows returning -ENODEV when possible. > >=20 > > The remaining issue that was brought up was with a connector node, but = it should > > be up to the driver to detect that and avoid calling drm_of_find_panel_= or_bridge > > in such situations. > >=20 > > So with that in mind it feels like the child node approach can be viable > > (and integrated in the same helper). > >=20 > > We might still want to favor an explicit OF graph approach, but note th= at > > dsi-controller.yaml also specifies extra properties that are specific to > > MIPI DSI and I'm not sure there are equivalent definitions for the OF g= raph > > approach. > >=20 > > What do you think? >=20 > I don't think Laurent's point was to move the child node away from its > DSI controller, that part doesn't make much sense. The panel or bridge > is still accessed through the DSI bus, so it very much belongs there. >=20 > What he meant I think was that we mandate the OF graph for all panels, > so for panels/bridges controlled through DCS, you would still list the > output through the graph. Also, we're already in a bit of a mess right now. I don't think rushing that kind of patches in a (late) rc is making much sense, but as I said, if you want to start working on this, then I'll take a revert for the next rc, and then we can work calmly on this. Maxime --f3ucqbymt5myqdco Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYmfr0AAKCRDj7w1vZxhR xbUmAP4tSJlyOhHnj4lT5D2bTAsRwi9EitxuW/l4CeXST2l+oQEAyXWYMaL9Brk1 ry6z8FHTykQJVq8rXR4AIswrqw/slAw= =eYQz -----END PGP SIGNATURE----- --f3ucqbymt5myqdco--