Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1799248iob; Fri, 29 Apr 2022 13:11:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9RIqO+LXsWJGLpAZGSattUUas8Z3csgEMMb/dYpVjSxQwx00VhCCRNz4YggP5oU7YY+8Z X-Received: by 2002:a05:6a00:1687:b0:4e1:45d:3ded with SMTP id k7-20020a056a00168700b004e1045d3dedmr906861pfc.0.1651263072355; Fri, 29 Apr 2022 13:11:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651263072; cv=none; d=google.com; s=arc-20160816; b=Ii4lwJBlytriEOHTpwppKrKMxMU09H03rGym+fD9Zj9V0seIoAzo0kPTsn51YFyyB0 aIOBSfxfp9mPiRErD7ZyvSOAzg+EJjc4M5U9xra8tpPFQsktjzI1g8uhHrOrmiBvZsOG j8vYMoymDPlqtIznANWddaJPmtuR/80LyrW4lLIefPacL6w3MDijJPHDakaLzxQ14b/a tXvyVR+51cOEcXw4r5kG27VCK9YyIOwwcqHpJBG880IKgvVYKTiMAWsumj04unbw2epp T8FN35H19vkqcgEw9MdV1auUKFRQFGKaG0f0niqmBXNkc3TOY0SbL3GJA6EkgsUqvoGF 5vUg== 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=xa2DIQhbBeGbP9DOcbCKVABNENz6z3aGkQkHM0IjfIE=; b=AiAlxg4Ziin7WchkbOR+68MJAfr90oPicLuVuh0iKc9loDeuV14glzLSV95Ol9GR5Y ScQbB/t/+RTfz9rqmX8g7R16Ir/iT9hhEPBQvPlZRG5cJC3Gwr3cpFcGZIfU2EYYOeZ0 nhqRavyUzYLkJ8GxhS8YSkUGe0gnDccQ3Qu6GI/YHQz95EeMhuC0mfNxJw4xqXpFxjr+ XsQ422mpvBnwWMHk/wLsR9ctxdQiv9gPxtRDgH+6CvjOvZ8l4k4qZl44xvkJBsSS2Y+w RM1PxcKSOa69xwnso1+01+dKWANfO/hjfpbHjq1NTLQ4wwCkRKRGdYdPVEdqS8AUBeHc sDCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=HRLfm+gM; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w64-20020a638243000000b003c16f6dbf3esi6342072pgd.82.2022.04.29.13.10.54; Fri, 29 Apr 2022 13:11:11 -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 (test mode) header.i=@ideasonboard.com header.s=mail header.b=HRLfm+gM; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354817AbiD2QJY (ORCPT + 99 others); Fri, 29 Apr 2022 12:09:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245321AbiD2QJW (ORCPT ); Fri, 29 Apr 2022 12:09:22 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B1B28FFA1 for ; Fri, 29 Apr 2022 09:06:02 -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 E0525488; Fri, 29 Apr 2022 18:05:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1651248360; bh=0RL9QR/lg4QgwVXQ0WCQpVV20+G95q/DPnnE8KGBCMA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HRLfm+gMYZzMazDhBgWQRhXpPR44OGky98gxrrKzIiLWAzRgZbyDWeHi3IzhpgrW9 DgIbwgzfkGJhchsUsH2YDwJKvtQNNkAT+sKXECrofVBHbTMWVXatQtyD3L7gIlcgOu vACjEFpsHrchvBiLx4yj55u8Aa0kj/MZoNT5/Xy4= Date: Fri, 29 Apr 2022 19:05:59 +0300 From: Laurent Pinchart To: Maxime Ripard Cc: Jagan Teki , 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-2-bjorn.andersson@linaro.org> <20220421082358.ivpmtak3ednvddrc@houat> <20220427143410.bectqumq62qmlv5x@houat> <20220429154645.47tsii47vjxqklca@houat> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220429154645.47tsii47vjxqklca@houat> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 Hi Maxime, On Fri, Apr 29, 2022 at 05:46:45PM +0200, Maxime Ripard wrote: > On Fri, Apr 29, 2022 at 01:17:26AM +0300, Laurent Pinchart wrote: > > 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 ? > > Was that report about 5.18 or drm-misc-next? It appears that all the > drivers conversions are in drm-misc-next. v5.18-rc2. I've double-checked, and it has been bisected to commit 67bae5f28c89, which is a fix of the commit this patch reverts (80253168dbfd). -- Regards, Laurent Pinchart