Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4433446ioa; Wed, 27 Apr 2022 03:54:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwb7eZpYRDERJebIA5YZuC5dPTQ/mGcZFfUryMYck75UoJIFIvawVqSebzbtqr87eJbK7Em X-Received: by 2002:a63:8349:0:b0:3ab:3dda:7e75 with SMTP id h70-20020a638349000000b003ab3dda7e75mr12938389pge.277.1651056848439; Wed, 27 Apr 2022 03:54:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651056848; cv=none; d=google.com; s=arc-20160816; b=pc1oOrGRlp0bwFhcov5AGBaIVcN+SBHea750YBCG9R1C6OBkq2sNO4zL3BdI3lBG7E wX8O+jvP/WhKqirRsLAYU3XxzjeCgZL7vqrpIvH+Wgf8jtth4oo1VItPrjgvu5prkqA3 IkvcXE/lMcMrgkDNkRPt1h3duqaqM7zcAhHOGy1FrLuRMJGwPwvuflvTexTioHvjhJtj 5/s9w/7rcmVphqAqX470+23SWZRsgtQPQVIlURWpKqTynfLiMcOjWAur/ae1aDqH6ctO ngXEAbXX2QPY/39Ir+ZHMsIfAaGPMHScGTY6sbnZ4RdxSlH54G8D/g8hnRLeb9v3L6NY RCmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=bK82D9oiFTeFkJ58x1A+6byrQ5w9F1pcq60Qto3VPFY=; b=AzvQ+cBRhYBFwJ/L0PxnoftwUU7k6vXvxZFfiRxdziP3U+lxHgdIyaTX5wmQYnxChr Xo4E5rJha+6GaF6FMl0K7+nSOm2WALCXJO8EFXMnmdprr5OgF4FdRFzTQUItJIU680+5 MHuOcNZWimHWKKGG09Jj1QetLBCj6Y9blVbyBe8UqM8gcDK5lPcVhzvozS6b+3i+NR35 1Knmso11cVVsRrQsZwBXMnWSiFno7oWSLISqfOz09MVKBPy1ci/pDsk2XUGmVkGyZ9aN TDTUFMia8ij3ZHhnf09hXoiEN3HDFLmgVJx8lhdKvx0khpgCEeK80jPt48Bm1ybBRsWL xrCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=IOslx8w+; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id i12-20020a056a00004c00b0050604ac89e3si933981pfk.345.2022.04.27.03.54.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 03:54:08 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=IOslx8w+; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EC55B2CC99C; Wed, 27 Apr 2022 02:59:17 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345587AbiD0HCb (ORCPT + 99 others); Wed, 27 Apr 2022 03:02:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241979AbiD0HC0 (ORCPT ); Wed, 27 Apr 2022 03:02:26 -0400 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED7F7186D7 for ; Tue, 26 Apr 2022 23:59:16 -0700 (PDT) Received: by mail-ed1-x531.google.com with SMTP id y21so846705edo.2 for ; Tue, 26 Apr 2022 23:59:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bK82D9oiFTeFkJ58x1A+6byrQ5w9F1pcq60Qto3VPFY=; b=IOslx8w+I67QW4Gw7u7XjV1f/VZn5ZL68eRvJSzAEdXGT8F1XSKAvRanc/fz1Kflx1 cq5yW/+4F8v0d1vxx40u5cIg0EFPoTG2XMQfCIjHI2w/9LUch1+2A8IeGwPF0YAEmycy GY3/SNPPnb8v+oa87JIJg/gldtpauXUylQzGs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bK82D9oiFTeFkJ58x1A+6byrQ5w9F1pcq60Qto3VPFY=; b=tm5EmsDFGk854Mf/fNM7zgblhb7bcOv3Uaqw+t+SRwpD5Ovrc5q2rh5Il2H5wrbGNC 08QuM/6kaGgcamfvSkTxlq6xd7VPocAotK0+NjrVkwEON70QP4hjQRDanJD1oiNKlIKZ q3I+06YOapQmh52ExpiDsfQAOX0THh27SgZiR0PaMuq4DSbInVQG12l+bZpFBlp0kwmu g++KZDZ+qX86HI0R3s6HIrccxOTyPQ0dWt/cieJeWLhnPIhLmLiY75fy/B/dFsofSkRL F7S0PAqcbfpk7xOhTRhm/T4SiBMVyyxwdJyCJAdyKrZcByxTkVh9kBT8uhVKks1MGSIP qR7g== X-Gm-Message-State: AOAM532fn3msJo4FIHecLsk9GGbLl+8K2YK5XLemol3uhu2Zc0unHX1T 5RayvZw18j8n6hC5dKrn44ktJzWU+fSJbBjUljPkfg== X-Received: by 2002:a05:6402:11cd:b0:425:ee49:58cb with SMTP id j13-20020a05640211cd00b00425ee4958cbmr13163292edw.157.1651042755556; Tue, 26 Apr 2022 23:59:15 -0700 (PDT) MIME-Version: 1.0 References: <20220420231230.58499-1-bjorn.andersson@linaro.org> <20220420231230.58499-2-bjorn.andersson@linaro.org> <20220421082358.ivpmtak3ednvddrc@houat> In-Reply-To: <20220421082358.ivpmtak3ednvddrc@houat> From: Jagan Teki Date: Wed, 27 Apr 2022 12:29:04 +0530 Message-ID: Subject: Re: [PATCH 2/2] Revert "drm: of: Lookup if child node has panel or bridge" To: Maxime Ripard , Bjorn Andersson , Laurent Pinchart , Paul Kocialkowski , Michael Nazzareno Trimarchi Cc: 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 Content-Type: text/plain; charset="UTF-8" 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 On Thu, Apr 21, 2022 at 1:54 PM Maxime Ripard wrote: > > On Thu, Apr 21, 2022 at 01:15:54PM +0530, Jagan Teki wrote: > > + Linus > > + Marek > > + Laurent > > + Robert > > > > 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 panel > > > under a DSI controller, by assuming that the first non-graph child node > > > was a panel or bridge. > > > > > > Unfortunately for non-trivial cases the first child node might 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 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. > > > > 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? > > I guess we could create a new helper for those, like > devm_drm_of_get_bridge_with_panel, or something. I think using the same existing helper and updating child support is make sense, as there is a possibility to use the same host for child and OF-graph bindings. I can see two possible solutions (as of now) 1. adding "dcs-child-type" bindings for child-based panel or bridge 2. iterate child and skip those nodes other than panel or bridge. or iterate sub-child to find it has a panel or bridge-like aux-bus (which is indeed hard as this configuration seems not 'standard' i think ) Any inputs? Thanks, Jagan.