Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp219312iob; Mon, 2 May 2022 17:34:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxlxJaujNy0uPdi8tJu16CpWxs4zSi7RI+N+HHEWjkG1f9U7gT8EcRH3KOqEBkTafcdLbCB X-Received: by 2002:a17:902:e94e:b0:154:3a4:c5e8 with SMTP id b14-20020a170902e94e00b0015403a4c5e8mr14525827pll.19.1651538072197; Mon, 02 May 2022 17:34:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651538072; cv=none; d=google.com; s=arc-20160816; b=kznJxrDJL7JPaD8LA5p2A5Z6MRuAWwTeP8vC6P7pSk9jQ8YQVLT98ACp0CbyHVygDN 78LIZJqoyvK4wYBuRKcBu0pP9R+IjL7kpGQWmne5QU5NV7DZOkLzNlcHUeigMcENHZts h9unTSPBWo5DlfbvTYqtKi6hWhNw6gQvZ8EClZNtkVousEqD2DRN3L8LB3xz2B3j8kJA 9H4Se18d0p+2kDvIwiYi1g4sbBJ06ANfhUTE3EWWYpsk5uPNuQa5/ZHSA6RSxkSF9I7K Zu7l3VkLRlhZocoxOkDWW0nLxBy//Dmc4SThZlYqqbhx6gd82Nw4CU1lvbx2azN72m7t 6hVg== 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; bh=eyylyX8Tk1vTeiLAEukqRpXPCh1WTy5ANNwiwG0T2ZQ=; b=BvJcqcY+GFjSi8Pv3h7bW9s6ZtuMyqKgErIDcU94ePglE8OzBH0dtEC0oxE0F7hO0N FxHq7SC1Vx98OTnbDX93PnDHtcC7MyZmIdZ28/bx6W5me9LkVRdwPa+K4IpnRsAr6WhL HKTZWWDnM9QKu2yDmxWLSFeYjV9Pli1060wvaMNGb9Mm0lxzDP/euOQiQ62y5wzoEUkD +oqlOQ6up0OQWNDaZsRMO1SSsRpRihEu9SJC+KIQ16ZcK9tm1BeOpBeLIlYUsmLt2a6l +InZyJlx8TQoVq3kQVZgtWuEj91bmJzy71EmcA9zdLPWeX6F+VxSfdAW1sT/p5fh8h8v iRMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=AafzOKqo; 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 Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id c19-20020aa78e13000000b0050e01cd969dsi1676847pfr.244.2022.05.02.17.34.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 17:34:32 -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 (test mode) header.i=@ideasonboard.com header.s=mail header.b=AafzOKqo; 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2369E13D15; Mon, 2 May 2022 17:27:18 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352828AbiD1WUs (ORCPT + 99 others); Thu, 28 Apr 2022 18:20:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237230AbiD1WUr (ORCPT ); Thu, 28 Apr 2022 18:20:47 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70F0B36B74 for ; Thu, 28 Apr 2022 15:17:30 -0700 (PDT) Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 6DC24496; Fri, 29 Apr 2022 00:17:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1651184247; bh=Uzoqv2V4P+He5pMnhrC6spSgHqSYirP43shZzY8LWuQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AafzOKqoNSgUWocspj+nlEbYRXni9FRZmMo79tAGUTMsvfj9HcbzLZAMVTpndnhcX c6oPTSr+eEUaljye0r+UXx+ZTiG7Ocx0KzsbnbH3JsVZHQ4PLMw1up9AUIBaCukQNE lVlR9phh9JWzZ430RuevaPameayv8VGVn7uU9TLk= Date: Fri, 29 Apr 2022 01:17:26 +0300 From: Laurent Pinchart To: Jagan Teki Cc: Maxime Ripard , Paul Kocialkowski , 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: References: <20220420231230.58499-1-bjorn.andersson@linaro.org> <20220420231230.58499-2-bjorn.andersson@linaro.org> <20220421082358.ivpmtak3ednvddrc@houat> <20220427143410.bectqumq62qmlv5x@houat> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: 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,T_SCC_BODY_TEXT_LINE 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 Hi Jagan, On Thu, Apr 28, 2022 at 02:09:42PM +0530, Jagan Teki wrote: > On Wed, Apr 27, 2022 at 8:04 PM Maxime Ripard wrote: > > On Tue, Apr 26, 2022 at 01:40:31PM +0530, Jagan Teki wrote: > > > On Tue, Apr 26, 2022 at 1:24 PM 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 > > > > > > > > > > > > > > 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. > > > > > > > > > > Oh wow I feel stupid for not thinking about that. > > > > > > > > > > Yeah I agree that it seems like the best option. > > > > > > > > Should I prepare a patch with such a new helper? > > > > > > > > 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. > > > > > > > > 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? > > > > > > sun6i_mipi_dsi > > > > It doesn't look like sun6i_mipi_dsi is using devm_drm_of_get_bridge at all? > > Correct, patch for this on the mailing list. I've lost track of how we're solving the fallout of this for v5.18. I have received a report that the original commit (80253168dbfd) also broke the rcar-du driver. Could you please provide a git branch (based on drm-fixes or drm-misc-fixes) with any patch that you plan to get merged in v5.18, to let me test them locally ? > > > exynos_drm_dsi > > > > If you reference 711c7adc4687, I don't see why we would need to switch > > it back to the old behaviour. It wasn't iterating over its child node > > before, so what does the switch to drm_of_get_bridge broke exactly? > > Exynos bindings have a child node (unlike OF-graph), the old code is > checking panel and bridge individually so it broke once switch to > devm_drm_of_get_bridge -- Regards, Laurent Pinchart