Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp252906pxf; Wed, 24 Mar 2021 04:27:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxlnhH+wXPxfTBcQLJFAJSqn6hUiO1UG79YY6xSSjfKexxOa1igNUabhwr7ENz0pjr2V/m9 X-Received: by 2002:a17:906:1c13:: with SMTP id k19mr3128066ejg.457.1616585245369; Wed, 24 Mar 2021 04:27:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616585245; cv=none; d=google.com; s=arc-20160816; b=KBrfhu89OQPHoKx/UpPS+pvc3wkCjfFKyuwW459tyimfxU8henWm3nFy5CpUY74AsY f3ZEHZ0QaR9fvTK+KHm7k7JWVgGGVuf7JL7MwUqoZvfYmV3VxBG1O4HxAxu1sqwZrGjj kZyOXHJDEEZb9959LVR6wX53sIBf6av36S37VNKqx7Uuvd5H6r3nrE2TeR/ubuHI8tHe svsnLwyf46ckoX/xV+Vv5n/VNyWh+r4TvyDPLGLmf3gprXYwQ4lV9CEkE1TsFNkkTreu 0gLYJsLS6jdycv5gVLke2xJsxotFhEnKmZ+m62ls6AX+Q99tMqKSnwWL/LnaoEwXnBhC eqCw== 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=BznifWZb2CQnrU5WkbYq5smjM6rGTkCKMCLSmLm/708=; b=vjGtad/ozxHwu6Jinvm7tka66W8OpmskWCgtbomK3iA7MxJzRWRNFlXd4sUw+DEnn+ aQJnV0+qMV15K2mFWgvq66VVXPV4wSWd/cVNo2gcDH8bIMsMbUyAqK3sUUX9S+Whl0ym 93q99AHo4i4tpS4bqk7PqYp9m4r2XZ6iHSFjpPt3akg/QDoFpGuU4hpZ6nLOo0JKsbtT m/O7KjNfQE/vPmah8dZ4ZLgXhXLkiQrA16vTRHITDlj+TfALq+5U8l2V+KF+6s/zzR5j 1hoS5G6i9SlWuRO2J1Ovakl0f7ZYaJJz8FfW6EsfBLu2MowvqaUTm8yGE0EO26rovoH4 t88g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=eOZKwX2M; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e2si1613646ejd.17.2021.03.24.04.27.02; Wed, 24 Mar 2021 04:27:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=eOZKwX2M; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235246AbhCXJ4r (ORCPT + 99 others); Wed, 24 Mar 2021 05:56:47 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:56788 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235229AbhCXJ4T (ORCPT ); Wed, 24 Mar 2021 05:56:19 -0400 Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1E6B1883; Wed, 24 Mar 2021 10:56:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1616579778; bh=MF17FmOqoyOW932sJKCAjoaWTSypZjBZUltL1AENlzI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eOZKwX2MyS2Gii8BQt2ycAY0Kt0pZDaGcZegzLv8KwWBV3kxzW6UmRFm/z3n4VyGa pxuXWya/BIBWb6oE7M/tCriPiyX1QGT8UOfRPHKBja7UuCi5Y7Qj3/QDTbopUYXkK2 gQ20dCl/DAJpkN/vaRg142NHnwBiedijx9X3AvA8= Date: Wed, 24 Mar 2021 11:55:35 +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 03:19:10PM +0530, Jagan Teki wrote: > On Wed, Mar 24, 2021 at 3:09 PM Laurent Pinchart wrote: > > 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. > > Thanks for your point. > > So, we need to choose APIs that would compatible with the old DT and > new DT changes. Am I correct? Yes, that's correct. -- Regards, Laurent Pinchart