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 AC437C433E1 for ; Wed, 24 Mar 2021 09:50:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7535E619AE for ; Wed, 24 Mar 2021 09:50:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232697AbhCXJts (ORCPT ); Wed, 24 Mar 2021 05:49:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232692AbhCXJtX (ORCPT ); Wed, 24 Mar 2021 05:49:23 -0400 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F67BC0613DE for ; Wed, 24 Mar 2021 02:49:23 -0700 (PDT) Received: by mail-ej1-x636.google.com with SMTP id hq27so31770958ejc.9 for ; Wed, 24 Mar 2021 02:49:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=q2TNkdIQ/zqP4vTBESLhTRQ8ElDlSEpihHNWHVVdOWw=; b=S7+rpvwNmh3R0GucjXGfeKomhZ1GYmSIiZRFBQZs+DNgNJlAQYPIEbkKvfxfE7jqgJ Xp5ioShGHBPMpZz2X1rnpZdsQEU4OyXOOH9TerN/74vfVbeTt6VxpfxlJnR4b+dNky51 O5YVnDX4eu+q9Ul9Q7CK5XSLe281AwPBrNHFQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=q2TNkdIQ/zqP4vTBESLhTRQ8ElDlSEpihHNWHVVdOWw=; b=EZidwUzqCw8fIG0naQcay1stn+XeeHDZqOLnTWabdfsUIwOfi8CYz01X5e9/01W94o TEmzYHd/XKa6f+uVzEDlo4tRU5Gw1+YBVFxt29WXd2KGpqvwbc0Ihm8IkDfX+UWD541e WB1QEZo57rCkXDOPZ5Yh6OBD/DYo/KC9a/g94dX6WljYU1opNJ8wH44/HkEGn+qxcrTz oy9NP4R+o5I9ObqrRFWDS5X9wAu0f/eeOg5u2C/QNspg7rkb7P5/SfjIQIeNk5nTHoxA HPok5vm2cxdWt1fV4KsMAHYgOkh1hmVuJk638NHIwaUVWSiWJaFsLUln6fshK/AExSH4 3WGw== X-Gm-Message-State: AOAM532syqNzd+5vjal9FDFIziHOimNUVLwrzlhLi73Xfo4Py76u7hWr FQ2zs5LgRz1ZeiW54aXs4V+oE/vNiXCVbBIKKzk4Ug== X-Google-Smtp-Source: ABdhPJxT/mrB/QVLHNjBduRmjrJ94vDchGyD6p3if3yVTDDUhEZVii5KLyc4Gnw0eC6LPMdYKW6Vv8fzGXaNaflz2qw= X-Received: by 2002:a17:907:104f:: with SMTP id oy15mr2758052ejb.252.1616579362156; Wed, 24 Mar 2021 02:49:22 -0700 (PDT) MIME-Version: 1.0 References: <20210322140152.101709-1-jagan@amarulasolutions.com> <20210322140152.101709-2-jagan@amarulasolutions.com> In-Reply-To: From: Jagan Teki Date: Wed, 24 Mar 2021 15:19:10 +0530 Message-ID: Subject: Re: [PATCH v4 1/4] drm: sun4i: dsi: Use drm_of_find_panel_or_bridge To: Laurent Pinchart Cc: Samuel Holland , Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , dri-devel , linux-arm-kernel , linux-kernel , linux-amarula , linux-sunxi Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Laurent, On Wed, Mar 24, 2021 at 3:09 PM Laurent Pinchart wrote: > > 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. Thanks for your point. So, we need to choose APIs that would compatible with the old DT and new DT changes. Am I correct? Jagan. 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=-14.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 35527C433DB for ; Wed, 24 Mar 2021 09:51:26 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C0550619FF for ; Wed, 24 Mar 2021 09:51:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C0550619FF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=EABm3ZQZY5j3dGGitRWkBJQ7K3Obm2zXuCiGjCA/RK4=; b=l+J/Ox0c7H6PuvIA9P1dcwC7J 4s461PiNmVXqASCJQxYcBTqdjDn+YV2xENj2ezNxOZZFxZ85udhyadellRAOv6w78IqLKKjJaqFKY IKsjAQzHTYK4btbNJbcjLJe8Zwfq1rHMHdxqGyobd36mudS/or4AbGeE+thWuMU2rySmI4cniVQYs jV1LtKXgWPW8hqfDCFguEpzfTazWYGJXGRwiTc3p0MIDx+l0jgwHeC8bHCz6zkUmIOKQrz+HKtv9d KIFgElShi0EPJsRE8QNs2n3u2YbU2VU+wovnjTYfnQPoWJhAoutkfMrdnQWqnfVcEP609B3/YpER3 ykWnZpb8Q==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lP08m-00Glmo-8i; Wed, 24 Mar 2021 09:49:28 +0000 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lP08g-00Gllp-P7 for linux-arm-kernel@lists.infradead.org; Wed, 24 Mar 2021 09:49:25 +0000 Received: by mail-ej1-x62c.google.com with SMTP id ce10so31772676ejb.6 for ; Wed, 24 Mar 2021 02:49:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=q2TNkdIQ/zqP4vTBESLhTRQ8ElDlSEpihHNWHVVdOWw=; b=S7+rpvwNmh3R0GucjXGfeKomhZ1GYmSIiZRFBQZs+DNgNJlAQYPIEbkKvfxfE7jqgJ Xp5ioShGHBPMpZz2X1rnpZdsQEU4OyXOOH9TerN/74vfVbeTt6VxpfxlJnR4b+dNky51 O5YVnDX4eu+q9Ul9Q7CK5XSLe281AwPBrNHFQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=q2TNkdIQ/zqP4vTBESLhTRQ8ElDlSEpihHNWHVVdOWw=; b=eJoP1Rlx6ZxcKhVu5g0FKde7kRXzuzBV8MAL4J3XNi27/ZJ70aMudflpBDbUJIqQvw uCiJMN/fjNKRHHvlAurClGAFSv1MLcKS54S5geSR6dxL2s2rY1pfgpgYS72yVT182euo fJov0NwWotf3dmpwD9KD9cRoE0rcF11dbe8bndXLRXvxYG9M15cap4ZBuxYt+e8hUqF1 sE6gXfafDP1aDY61U6ZkPIu9jRLeoSwNxR+BW4pjnIW/pgVmSf68sRpOV4pJJsKO71aE 8Hz1/Ot5QzoCyKNJ/ttKS4GLWA+Sd929Ylc3JMQVgYEqQzT7F13G8b1sxmWuMdr1m9DP KVEA== X-Gm-Message-State: AOAM531gz5YLfVcZsOeMAFd2ZJ8VW+T5ntUIzZxNxUfefNMtXI6pjzyK edOc3CF5OQoCfc40AvJtg+oFKeSdwmU02BIKqBpBCA== X-Google-Smtp-Source: ABdhPJxT/mrB/QVLHNjBduRmjrJ94vDchGyD6p3if3yVTDDUhEZVii5KLyc4Gnw0eC6LPMdYKW6Vv8fzGXaNaflz2qw= X-Received: by 2002:a17:907:104f:: with SMTP id oy15mr2758052ejb.252.1616579362156; Wed, 24 Mar 2021 02:49:22 -0700 (PDT) MIME-Version: 1.0 References: <20210322140152.101709-1-jagan@amarulasolutions.com> <20210322140152.101709-2-jagan@amarulasolutions.com> In-Reply-To: From: Jagan Teki Date: Wed, 24 Mar 2021 15:19:10 +0530 Message-ID: Subject: Re: [PATCH v4 1/4] drm: sun4i: dsi: Use drm_of_find_panel_or_bridge To: Laurent Pinchart Cc: Samuel Holland , Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , dri-devel , linux-arm-kernel , linux-kernel , linux-amarula , linux-sunxi X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210324_094922_912292_EB71BB77 X-CRM114-Status: GOOD ( 35.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Laurent, On Wed, Mar 24, 2021 at 3:09 PM Laurent Pinchart wrote: > > 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. Thanks for your point. So, we need to choose APIs that would compatible with the old DT and new DT changes. Am I correct? Jagan. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 7C3A9C433C1 for ; Wed, 24 Mar 2021 09:49:25 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3CBD5619FF for ; Wed, 24 Mar 2021 09:49:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3CBD5619FF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8BAC16E99B; Wed, 24 Mar 2021 09:49:24 +0000 (UTC) Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6FE506E99B for ; Wed, 24 Mar 2021 09:49:23 +0000 (UTC) Received: by mail-ej1-x62b.google.com with SMTP id w3so31777513ejc.4 for ; Wed, 24 Mar 2021 02:49:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=q2TNkdIQ/zqP4vTBESLhTRQ8ElDlSEpihHNWHVVdOWw=; b=S7+rpvwNmh3R0GucjXGfeKomhZ1GYmSIiZRFBQZs+DNgNJlAQYPIEbkKvfxfE7jqgJ Xp5ioShGHBPMpZz2X1rnpZdsQEU4OyXOOH9TerN/74vfVbeTt6VxpfxlJnR4b+dNky51 O5YVnDX4eu+q9Ul9Q7CK5XSLe281AwPBrNHFQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=q2TNkdIQ/zqP4vTBESLhTRQ8ElDlSEpihHNWHVVdOWw=; b=MpIqBrcgckXc4+QCmLONw/LXn0J4TFwkoWeb/XsljaV4UiEyrD/GjuKrgr00HYzsW6 shsol5QojaKwN6rQ02ADxhNrxWTVUs7mp7gcVseKRVAQANui8uyx+fenhjf3sFPQDQKC 2U3z/lynQqKO3/GMgiyBNokOKBOoGYcmCoB7rHa10F8vHXN/Zwjk6AiUXbsymLQiRRpu HbtPJtBZgu7P7E5dzmGfWiumdJs9lcrIz+mjWhKsVj8l5hlJwPKbX7q+pKAwQf7KmbHE h9kwCnzwwSdnQsNCd4KR4aYCKaELVsGGgT/lN8fVDW1L6ntckngS7tqVgdQL6y1ExHHS hx9g== X-Gm-Message-State: AOAM532mE2ZbxPKQ8BAc6dOrIh1g0F1DC+g4em4AH+Eytv/rSQjx3k5L BOs9kCFWOvKYALAwR9AUQmfwW56/ziCDT4jb980t0g== X-Google-Smtp-Source: ABdhPJxT/mrB/QVLHNjBduRmjrJ94vDchGyD6p3if3yVTDDUhEZVii5KLyc4Gnw0eC6LPMdYKW6Vv8fzGXaNaflz2qw= X-Received: by 2002:a17:907:104f:: with SMTP id oy15mr2758052ejb.252.1616579362156; Wed, 24 Mar 2021 02:49:22 -0700 (PDT) MIME-Version: 1.0 References: <20210322140152.101709-1-jagan@amarulasolutions.com> <20210322140152.101709-2-jagan@amarulasolutions.com> In-Reply-To: From: Jagan Teki Date: Wed, 24 Mar 2021 15:19:10 +0530 Message-ID: Subject: Re: [PATCH v4 1/4] drm: sun4i: dsi: Use drm_of_find_panel_or_bridge To: Laurent Pinchart X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jernej Skrabec , Samuel Holland , linux-sunxi , linux-kernel , dri-devel , Chen-Yu Tsai , linux-amarula , linux-arm-kernel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Laurent, On Wed, Mar 24, 2021 at 3:09 PM Laurent Pinchart wrote: > > 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. Thanks for your point. So, we need to choose APIs that would compatible with the old DT and new DT changes. Am I correct? Jagan. _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel