From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E01DC433E2 for ; Wed, 24 Mar 2021 09:40:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 19B8B619AE for ; Wed, 24 Mar 2021 09:40:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236217AbhCXJjk (ORCPT ); Wed, 24 Mar 2021 05:39:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232603AbhCXJjJ (ORCPT ); Wed, 24 Mar 2021 05:39:09 -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 3F6DCC061763 for ; Wed, 24 Mar 2021 02:39:09 -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 6FC88580; Wed, 24 Mar 2021 10:39:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1616578746; bh=OpiUjjnMJhqf4VDAVhNdufxOxaOTNCJNSAerYwkbvwU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ifjiNNoi8hgbYJmUPBJui6RUg+081OAs+FjyDH1k2mVsjFxDl3wD8YHzvLQD/wKAm y5xRfr7qa2u0Y7ov3Npew6cWruNL9NbcB7x2NS36iyJwJw5elRRBSWkR69wF5rCLmf NH29XFDcw94yfuZWpYkPDgihpThkjulGKilVrqLM= Date: Wed, 24 Mar 2021 11:38:24 +0200 From: Laurent Pinchart To: Jagan Teki Cc: Samuel Holland , Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , dri-devel , linux-arm-kernel , linux-kernel , linux-amarula , linux-sunxi Subject: Re: [PATCH v4 1/4] drm: sun4i: dsi: Use drm_of_find_panel_or_bridge Message-ID: References: <20210322140152.101709-1-jagan@amarulasolutions.com> <20210322140152.101709-2-jagan@amarulasolutions.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jagan, On Wed, Mar 24, 2021 at 02:44:57PM +0530, Jagan Teki wrote: > On Wed, Mar 24, 2021 at 8:18 AM Samuel Holland wrote: > > On 3/23/21 5:53 PM, Laurent Pinchart wrote: > > > On Mon, Mar 22, 2021 at 07:31:49PM +0530, Jagan Teki wrote: > > >> Replace of_drm_find_panel with drm_of_find_panel_or_bridge > > >> for finding panel, this indeed help to find the bridge if > > >> bridge support added. > > >> > > >> Added NULL in bridge argument, same will replace with bridge > > >> parameter once bridge supported. > > >> > > >> Signed-off-by: Jagan Teki > > > > > > Looks good, there should be no functional change. > > > > Actually this breaks all existing users of this driver, see below. > > > > > Reviewed-by: Laurent Pinchart > > > > > >> --- > > >> Changes for v4, v3: > > >> - none > > >> > > >> drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 11 ++++++++--- > > >> 1 file changed, 8 insertions(+), 3 deletions(-) > > >> > > >> diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c > > >> index 4f5efcace68e..2e9e7b2d4145 100644 > > >> --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c > > >> +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c > > >> @@ -21,6 +21,7 @@ > > >> > > >> #include > > >> #include > > >> +#include > > >> #include > > >> #include > > >> #include > > >> @@ -963,10 +964,14 @@ static int sun6i_dsi_attach(struct mipi_dsi_host *host, > > >> struct mipi_dsi_device *device) > > >> { > > >> struct sun6i_dsi *dsi = host_to_sun6i_dsi(host); > > >> - struct drm_panel *panel = of_drm_find_panel(device->dev.of_node); > > > > This is using the OF node of the DSI device, which is a direct child of > > the DSI host's OF node. There is no OF graph involved. > > > > >> + struct drm_panel *panel; > > >> + int ret; > > >> + > > >> + ret = drm_of_find_panel_or_bridge(dsi->dev->of_node, 0, 0, > > >> + &panel, NULL); > > > > However, this function expects to find the panel using OF graph. This > > does not work with existing device trees (PinePhone, PineTab) which do > > not use OF graph to connect the panel. And it cannot work, because the > > DSI host's binding specifies a single port: the input port from the > > display engine. > > Thanks for noticing this. I did understand your point and yes, I did > mention the updated pipeline in previous versions and forgot to add it > to this series. > > Here is the updated pipeline to make it work: > > https://patchwork.kernel.org/project/dri-devel/patch/20190524104252.20236-1-jagan@amarulasolutions.com/ > > Let me know your comments on this, so I will add a patch for the > above-affected DTS files. DT is an ABI, we need to ensure backward compatibility. Changes in kernel drivers can't break devices that have an old DT. -- Regards, Laurent Pinchart