Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4455950ioa; Wed, 27 Apr 2022 04:23:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzW9PC1vhi/X+PRFxOVMv7+5LCSnTGB17T9bBTrM0IGn9Qv8xFL2sB2V0yg89tTqi1uiuM+ X-Received: by 2002:a63:8c1a:0:b0:3ab:35b8:bb02 with SMTP id m26-20020a638c1a000000b003ab35b8bb02mr13090218pgd.546.1651058611593; Wed, 27 Apr 2022 04:23:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651058611; cv=none; d=google.com; s=arc-20160816; b=b2jb1Jkf4H+gP4lCEQqAWivHDAcgPApQKlW8nzYQD6VnB1Typ/1mqFa4QY6YMLmgcz yYLcEVJEkGdZE1C4ynh8Vrc60x5bvfI2nzmo/ItcVG4l6I82yPa7ETr346RXlzd+DRQi +YTzgMojkHpG/o4bGnhbcR108JCF7G8KFQ1HQUj/U6Rl8CxzjCvzFET+yO2Cc0zbZQjz aF/fQ2+z/UXu/BBf7C0Vm+JSHw+TMeOmF9HZP2AXCFxThyy/U54tdJsQD4fB+Hw0p2cM n08quJr8IV22CrFxgpW18h+FES7dSro3k6URxmmb+9vOMTIgiz7L2yb/XP9aWzL+nWro 2aXA== 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=OyrBnKWDrF/8jqGKraI7Yh00GkSR4nxDJIW0DRlBDUs=; b=eniFELsayJ3qnQ78SGs3fNwVGd7QLzyh0fSZUjLhE0OLKXSzr2hosi+gVRsDn52iw7 qv97rGvx2EIGYzpBwMaklQoFNcgZ8tRviqg+9bLfVQY6fzVC0ThYHEWRZH3EIEpV2Q5J SoksvgfIGro5erZ1eTrUf1qzsNbvLJ4Cg+qnJlKAAoeGlg98FgylcLFgNEG4L/Erhn4l oP5BX0v8RdGBTeeIRlv993Rsf0brWvzh9JxeikyMQcnZuSNxV1LeRz6UqODKOmB4fJoD 8NwdDl7/nu3rfVas+rGavhT2CC9OKE/nt7bRwTOCDo0C0Wbn6pQTR4DFzQpdjdO7Dmwi lfiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=vHTox3Yt; 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 Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id 83-20020a630456000000b003aaf9263228si1283694pge.63.2022.04.27.04.23.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 04:23: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 (test mode) header.i=@ideasonboard.com header.s=mail header.b=vHTox3Yt; 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 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7E18247A316; Wed, 27 Apr 2022 03:17:27 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349566AbiDZLgo (ORCPT + 99 others); Tue, 26 Apr 2022 07:36:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238202AbiDZLgm (ORCPT ); Tue, 26 Apr 2022 07:36:42 -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 EE91CCD679 for ; Tue, 26 Apr 2022 04:33:34 -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 C71D3487; Tue, 26 Apr 2022 13:33:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1650972812; bh=x0u0Pc7FPhAWSn7VfEpmqZSQUGOs2PWVzeM3l1YkXN4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vHTox3YtR2pMYrN9xkkLGM6scoJ3J8KQlxC/pE11PRv2EBPvTFIZzdku9HEDl8X1l nYAtBumbnoIs8/FmsTsUo3Yn54QqR7T1P2Iuhm+S8heezP8omNUoywsMhSsi8E15Nl KD9qaROtYbqBUgZpdn401N/V+LQBc6MO9i9Iq764= Date: Tue, 26 Apr 2022 14:33:31 +0300 From: Laurent Pinchart To: Paul Kocialkowski Cc: Maxime Ripard , 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: References: <20220420231230.58499-1-bjorn.andersson@linaro.org> <20220420231230.58499-2-bjorn.andersson@linaro.org> <20220421082358.ivpmtak3ednvddrc@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 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 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 > > > > > > > > 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? > > 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?) 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. -- Regards, Laurent Pinchart