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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 17623C433F5 for ; Thu, 25 Nov 2021 16:14:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4F4F76EBFF; Thu, 25 Nov 2021 16:14:29 +0000 (UTC) Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by gabe.freedesktop.org (Postfix) with ESMTPS id AA0086EBFF for ; Thu, 25 Nov 2021 16:14:27 +0000 (UTC) Received: by mail-ed1-x536.google.com with SMTP id l25so27461653eda.11 for ; Thu, 25 Nov 2021 08:14:27 -0800 (PST) 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=js2mw4B8bPalKLU7cug5PsxGyJjtfm2nsoS4QhAkIGo=; b=pyh+F1yAItTJUvyTXcsDqSjBZI3WTPbjPiw2wbS03kryJNuyBIi2IM7Wno/G8oMaQJ 5uFKz58T0JFwBg4Un/DdMofKfhr/VzgYQ2tXUUL1Ln3cI/kF/0uuoM5jn0JuRHsRPKQU Vo8eptxbVKMxwYyKqK/raW8DnwMfQWz71t/Ko= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=js2mw4B8bPalKLU7cug5PsxGyJjtfm2nsoS4QhAkIGo=; b=J+w4unbgPJWcbw+GCvIWOCWkU8kq/GgUUpm3hVYaR5VXqQywCr+AYq9JMxtMjhptZX U/0XiVlNw4nOe7/nBW43XrEH5cr+VpaPtDAXbOgT2acXYC1/Ft9uJLE/qJ0HNJ0lEs2o 2HOTCK386OA1yZk/vZuE4VLvJyTXAIkTTm3R4ScI7ehZdpywr/aLDngUDPXt8dAoUqyc 9LfL0lC+GH6I5PalE5T0UwNWAG9X47n9OcDOWI/1kMmyUqPouKe103j2S0M4BCp5AP5g B1li03yTpEJ7qKcgF6ZII08bFDq71JXcIg0W3yJo98UgCv0Tg0fF/naJXwxCvSSHydXZ x5ZA== X-Gm-Message-State: AOAM531WWJB7qgqWxWgGdLyM7dzGJ06ftsuE4Z6cTVkh8ggBaDEKDNIn FvUMz6PjjPOctPzSujladUNpTa4JJPaiB193kWSrSg== X-Google-Smtp-Source: ABdhPJzGT7OYhhnG5u5TEmyBI9SlgOj4uFZEok/darP7q5cpFzczePD5AOovY05cTTN2ODiIC6prfxEWk2pV9MB4J8c= X-Received: by 2002:a17:907:250f:: with SMTP id y15mr32287873ejl.0.1637856866057; Thu, 25 Nov 2021 08:14:26 -0800 (PST) MIME-Version: 1.0 References: <20211122065223.88059-1-jagan@amarulasolutions.com> <20211122065223.88059-4-jagan@amarulasolutions.com> <20211122100712.dls4eqsu6o5gcc5k@gilmour> <20211122140457.jm7cwpp2h3fkf2nd@gilmour> <20211125141516.oymscgs3xcjqmgce@gilmour> <20211125161026.ndfygaa6c4nnst4i@gilmour> In-Reply-To: <20211125161026.ndfygaa6c4nnst4i@gilmour> From: Jagan Teki Date: Thu, 25 Nov 2021 21:44:14 +0530 Message-ID: Subject: Re: [PATCH v5 3/7] drm: sun4i: dsi: Convert to bridge driver To: Maxime Ripard Content-Type: text/plain; charset="UTF-8" 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: Neil Armstrong , Robert Foss , linux-sunxi@googlegroups.com, dri-devel@lists.freedesktop.org, Chen-Yu Tsai , Laurent Pinchart , Sam Ravnborg , linux-amarula@amarulasolutions.com, linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Thu, Nov 25, 2021 at 9:40 PM Maxime Ripard wrote: > > On Thu, Nov 25, 2021 at 07:55:41PM +0530, Jagan Teki wrote: > > Hi, > > > > On Thu, Nov 25, 2021 at 7:45 PM Maxime Ripard wrote: > > > > > > On Wed, Nov 24, 2021 at 12:02:47AM +0530, Jagan Teki wrote: > > > > > > > > > + dsi->panel = of_drm_find_panel(remote); > > > > > > > > > + if (IS_ERR(dsi->panel)) { > > > > > > > > > + dsi->panel = NULL; > > > > > > > > > + > > > > > > > > > + dsi->next_bridge = of_drm_find_bridge(remote); > > > > > > > > > + if (IS_ERR(dsi->next_bridge)) { > > > > > > > > > + dev_err(dsi->dev, "failed to find bridge\n"); > > > > > > > > > + return PTR_ERR(dsi->next_bridge); > > > > > > > > > + } > > > > > > > > > + } else { > > > > > > > > > + dsi->next_bridge = NULL; > > > > > > > > > + } > > > > > > > > > + > > > > > > > > > + of_node_put(remote); > > > > > > > > > > > > > > > > Using devm_drm_of_get_bridge would greatly simplify the driver > > > > > > > > > > > > > > I'm aware of this and this would break the existing sunxi dsi binding, > > > > > > > we are not using ports based pipeline in dsi node. Of-course you have > > > > > > > pointed the same before, please check below > > > > > > > https://patchwork.kernel.org/project/dri-devel/patch/20210322140152.101709-2-jagan@amarulasolutions.com/ > > > > > > > > > > > > Then drm_of_find_panel_or_bridge needs to be adjusted to handle the DSI > > > > > > bindings and look for a panel or bridge not only through the OF graph, > > > > > > but also on the child nodes > > > > > > > > > > Okay. I need to check this. > > > > > > > > devm_drm_of_get_bridge is not working with legacy binding like the one > > > > used in sun6i dsi > > > > > > There's nothing legacy about it. > > > > What I'm mean legacy here with current binding used in sun6i-dsi like this. > > > > &dsi { > > vcc-dsi-supply = <®_dcdc1>; /* VCC-DSI */ > > status = "okay"; > > > > panel@0 { > > compatible = "bananapi,s070wv20-ct16-icn6211"; > > reg = <0>; > > reset-gpios = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; /* > > LCD-RST: PL5 */ > > enable-gpios = <&pio 1 7 GPIO_ACTIVE_HIGH>; /* > > LCD-PWR-EN: PB7 */ > > backlight = <&backlight>; > > }; > > }; > > Yes, I know, it's the generic DSI binding. It's still not legacy. > > > devm_drm_of_get_bridge cannot find the device with above binding and > > able to find the device with below binding. > > > > &dsi { > > vcc-dsi-supply = <®_dcdc1>; /* VCC-DSI */ > > status = "okay"; > > > > ports { > > #address-cells = <1>; > > #size-cells = <0>; > > > > dsi_out: port@0 { > > reg = <0>; > > > > dsi_out_bridge: endpoint { > > remote-endpoint = <&bridge_out_dsi>; > > }; > > }; > > }; > > > > panel@0 { > > compatible = "bananapi,s070wv20-ct16-icn6211"; > > reg = <0>; > > reset-gpios = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; /* LCD-RST: PL5 */ > > enable-gpios = <&pio 1 7 GPIO_ACTIVE_HIGH>; /* LCD-PWR-EN: PB7 */ > > backlight = <&backlight>; > > > > port { > > bridge_out_dsi: endpoint { > > remote-endpoint = <&dsi_out_bridge>; > > }; > > }; > > }; > > }; > > Yes, I know, and that's because ... Okay. I will use find panel and bridge separately instead of devm_drm_of_get_bridge in version patches. > > > > > > > > https://patchwork.kernel.org/project/dri-devel/patch/20211122065223.88059-6-jagan@amarulasolutions.com/ > > > > > > > > dsi->next_bridge = devm_drm_of_get_bridge(dsi->dev, dsi->dev->of_node, 0, 0); > > > > if (IS_ERR(dsi->next_bridge)) > > > > return PTR_ERR(dsi->next_bridge); > > > > > > > > It is only working if we have ports on the pipeline, something like this > > > > https://patchwork.kernel.org/project/dri-devel/patch/20210214194102.126146-8-jagan@amarulasolutions.com/ > > > > > > > > Please have a look and let me know if I miss anything? > > > > > > Yes, you're missing the answer you quoted earlier: > > > > Yes, I'm trying to resolve the comment one after another. Will get back. > > ... You've ignored that comment. Not understand which comment you mean. There are few about bridge conversion details, I will send my comments. Thanks, 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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B9F81C433F5 for ; Thu, 25 Nov 2021 16:17:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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=qIJDXYq1bGcH3LSrziCtWoW+od8ISgH+ctgNZA6dAQ8=; b=jgZpvti4X0Qtql +V+Ny55+lC+OJsxasRKtHzQnVjMJcIjF2JPsgXSJriDx6a0/cvxoGTxMHb+3/jp36GdjR8MpwLDrf 8wrwCuqzVs6Cm2Rzt5Ly9qrDEvEpDc/wdsxQlATEXFuAobb+EVR8LfdFCctfpeg7pprn1tBOe6Avo j8AnAa5JPT00ehWLQ7d/7UhXLob9lgbR6oWjmxVjRyEJ7ykW2xzFJ+FlwDMP0biv2rLagTL7iJ3yw Ph4LCxgLrLqz9Eu/Q0syZQ12rvF40MmGCe4aTMAkI0yd6fMdX5msDX+IVHmFh2E3Sj+/BLW0/yHsq NX2/QD+2ety9BcF2w6jw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqHOO-008FJE-Om; Thu, 25 Nov 2021 16:14:38 +0000 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqHOG-008FFh-KH for linux-arm-kernel@lists.infradead.org; Thu, 25 Nov 2021 16:14:31 +0000 Received: by mail-ed1-x536.google.com with SMTP id y12so27564753eda.12 for ; Thu, 25 Nov 2021 08:14:27 -0800 (PST) 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=js2mw4B8bPalKLU7cug5PsxGyJjtfm2nsoS4QhAkIGo=; b=pyh+F1yAItTJUvyTXcsDqSjBZI3WTPbjPiw2wbS03kryJNuyBIi2IM7Wno/G8oMaQJ 5uFKz58T0JFwBg4Un/DdMofKfhr/VzgYQ2tXUUL1Ln3cI/kF/0uuoM5jn0JuRHsRPKQU Vo8eptxbVKMxwYyKqK/raW8DnwMfQWz71t/Ko= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=js2mw4B8bPalKLU7cug5PsxGyJjtfm2nsoS4QhAkIGo=; b=rFVd5qqUJh0mbrozhYSxCeSd5/yo+cgHs9/r2sqLeVP7ZD/CiyISvImyMusPLhC+YR CALuOC0sOe/qpvaWtWThWZpYa4OHvE+8AQYffrt/+vgz73s1HIDfLHp4YE85/BNGdqeE NSuV5OZ0tSwae6WmOG+3cgPcyFVUwsNCCAMqD2AfHCM1FcO2/wnkZOHGKZxHv4WEgT0A 5n7QofExr23A81OeuD6zoecQtbi4qEQj3VrWv5TvIyTpA1rJyZFL/5op549FMpJQs6NF i8A5LxuIEyYhOi1a1suW4VU0hTDxnLzTTKX3POFn1+KCSA9nonFyUnRQEHdbusrgw4tQ 6iDA== X-Gm-Message-State: AOAM5331RBmda5rX01/fQQcasATrTbL3NQbaseEfwbfhf3xGH3ty1lAm Bgc0VEbQCVpUTiYbevy2sXwFJUWoKLWlc5mC4Vtp8A== X-Google-Smtp-Source: ABdhPJzGT7OYhhnG5u5TEmyBI9SlgOj4uFZEok/darP7q5cpFzczePD5AOovY05cTTN2ODiIC6prfxEWk2pV9MB4J8c= X-Received: by 2002:a17:907:250f:: with SMTP id y15mr32287873ejl.0.1637856866057; Thu, 25 Nov 2021 08:14:26 -0800 (PST) MIME-Version: 1.0 References: <20211122065223.88059-1-jagan@amarulasolutions.com> <20211122065223.88059-4-jagan@amarulasolutions.com> <20211122100712.dls4eqsu6o5gcc5k@gilmour> <20211122140457.jm7cwpp2h3fkf2nd@gilmour> <20211125141516.oymscgs3xcjqmgce@gilmour> <20211125161026.ndfygaa6c4nnst4i@gilmour> In-Reply-To: <20211125161026.ndfygaa6c4nnst4i@gilmour> From: Jagan Teki Date: Thu, 25 Nov 2021 21:44:14 +0530 Message-ID: Subject: Re: [PATCH v5 3/7] drm: sun4i: dsi: Convert to bridge driver To: Maxime Ripard Cc: Chen-Yu Tsai , Laurent Pinchart , Neil Armstrong , Robert Foss , Sam Ravnborg , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@googlegroups.com, linux-amarula@amarulasolutions.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211125_081429_212596_F63F3997 X-CRM114-Status: GOOD ( 32.69 ) 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 On Thu, Nov 25, 2021 at 9:40 PM Maxime Ripard wrote: > > On Thu, Nov 25, 2021 at 07:55:41PM +0530, Jagan Teki wrote: > > Hi, > > > > On Thu, Nov 25, 2021 at 7:45 PM Maxime Ripard wrote: > > > > > > On Wed, Nov 24, 2021 at 12:02:47AM +0530, Jagan Teki wrote: > > > > > > > > > + dsi->panel = of_drm_find_panel(remote); > > > > > > > > > + if (IS_ERR(dsi->panel)) { > > > > > > > > > + dsi->panel = NULL; > > > > > > > > > + > > > > > > > > > + dsi->next_bridge = of_drm_find_bridge(remote); > > > > > > > > > + if (IS_ERR(dsi->next_bridge)) { > > > > > > > > > + dev_err(dsi->dev, "failed to find bridge\n"); > > > > > > > > > + return PTR_ERR(dsi->next_bridge); > > > > > > > > > + } > > > > > > > > > + } else { > > > > > > > > > + dsi->next_bridge = NULL; > > > > > > > > > + } > > > > > > > > > + > > > > > > > > > + of_node_put(remote); > > > > > > > > > > > > > > > > Using devm_drm_of_get_bridge would greatly simplify the driver > > > > > > > > > > > > > > I'm aware of this and this would break the existing sunxi dsi binding, > > > > > > > we are not using ports based pipeline in dsi node. Of-course you have > > > > > > > pointed the same before, please check below > > > > > > > https://patchwork.kernel.org/project/dri-devel/patch/20210322140152.101709-2-jagan@amarulasolutions.com/ > > > > > > > > > > > > Then drm_of_find_panel_or_bridge needs to be adjusted to handle the DSI > > > > > > bindings and look for a panel or bridge not only through the OF graph, > > > > > > but also on the child nodes > > > > > > > > > > Okay. I need to check this. > > > > > > > > devm_drm_of_get_bridge is not working with legacy binding like the one > > > > used in sun6i dsi > > > > > > There's nothing legacy about it. > > > > What I'm mean legacy here with current binding used in sun6i-dsi like this. > > > > &dsi { > > vcc-dsi-supply = <®_dcdc1>; /* VCC-DSI */ > > status = "okay"; > > > > panel@0 { > > compatible = "bananapi,s070wv20-ct16-icn6211"; > > reg = <0>; > > reset-gpios = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; /* > > LCD-RST: PL5 */ > > enable-gpios = <&pio 1 7 GPIO_ACTIVE_HIGH>; /* > > LCD-PWR-EN: PB7 */ > > backlight = <&backlight>; > > }; > > }; > > Yes, I know, it's the generic DSI binding. It's still not legacy. > > > devm_drm_of_get_bridge cannot find the device with above binding and > > able to find the device with below binding. > > > > &dsi { > > vcc-dsi-supply = <®_dcdc1>; /* VCC-DSI */ > > status = "okay"; > > > > ports { > > #address-cells = <1>; > > #size-cells = <0>; > > > > dsi_out: port@0 { > > reg = <0>; > > > > dsi_out_bridge: endpoint { > > remote-endpoint = <&bridge_out_dsi>; > > }; > > }; > > }; > > > > panel@0 { > > compatible = "bananapi,s070wv20-ct16-icn6211"; > > reg = <0>; > > reset-gpios = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; /* LCD-RST: PL5 */ > > enable-gpios = <&pio 1 7 GPIO_ACTIVE_HIGH>; /* LCD-PWR-EN: PB7 */ > > backlight = <&backlight>; > > > > port { > > bridge_out_dsi: endpoint { > > remote-endpoint = <&dsi_out_bridge>; > > }; > > }; > > }; > > }; > > Yes, I know, and that's because ... Okay. I will use find panel and bridge separately instead of devm_drm_of_get_bridge in version patches. > > > > > > > > https://patchwork.kernel.org/project/dri-devel/patch/20211122065223.88059-6-jagan@amarulasolutions.com/ > > > > > > > > dsi->next_bridge = devm_drm_of_get_bridge(dsi->dev, dsi->dev->of_node, 0, 0); > > > > if (IS_ERR(dsi->next_bridge)) > > > > return PTR_ERR(dsi->next_bridge); > > > > > > > > It is only working if we have ports on the pipeline, something like this > > > > https://patchwork.kernel.org/project/dri-devel/patch/20210214194102.126146-8-jagan@amarulasolutions.com/ > > > > > > > > Please have a look and let me know if I miss anything? > > > > > > Yes, you're missing the answer you quoted earlier: > > > > Yes, I'm trying to resolve the comment one after another. Will get back. > > ... You've ignored that comment. Not understand which comment you mean. There are few about bridge conversion details, I will send my comments. Thanks, Jagan. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel