From: Maxime Ripard <maxime@cerno.tech>
To: Jagan Teki <jagan@amarulasolutions.com>
Cc: Chen-Yu Tsai <wens@csie.org>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
Neil Armstrong <narmstrong@baylibre.com>,
Robert Foss <robert.foss@linaro.org>,
Sam Ravnborg <sam@ravnborg.org>,
dri-devel@lists.freedesktop.org,
linux-arm-kernel@lists.infradead.org,
linux-sunxi@googlegroups.com, linux-amarula@amarulasolutions.com
Subject: Re: [PATCH v6 3/6] drm: sun4i: dsi: Add bridge support
Date: Mon, 13 Dec 2021 18:17:57 +0100 [thread overview]
Message-ID: <20211213171757.bxu57eaqawmp5kwh@houat> (raw)
In-Reply-To: <20211210111711.2072660-4-jagan@amarulasolutions.com>
[-- Attachment #1.1: Type: text/plain, Size: 2951 bytes --]
On Fri, Dec 10, 2021 at 04:47:08PM +0530, Jagan Teki wrote:
> Some display panels would come up with a non-DSI output, those
> can have an option to connect the DSI host by means of interface
> bridge converter.
>
> This DSI to non-DSI interface bridge converter would require
> DSI Host to handle drm bridge functionalities in order to
> communicate interface bridge.
>
> This patch adds support for bridge functionalities in Allwinner
> DSI controller.
>
> Supporting down-stream bridge makes few changes in the driver.
>
> - It drops drm_connector and related operations as drm_bridge_attach
> creates connector during attachment.
>
> - It drop panel pointer and iterate the bridge, so-that it can operate
> the normal bridge and panel_bridge in constitutive callbacks.
>
> - It uses devm_drm_of_get_bridge for panel or bridge lookup. It uses
> port 0 and endpoint 0 to support I2C-based bridges eventhough the
> usual Allwinner DSI OF graph doesn't require this for panel and
> non-I2C based downstream bridges.
>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> ---
> Changes for v6:
> - support donwstream bridge
> - drop bridge conversion
> - devm_drm_of_get_bridge() require child lookup
> https://patchwork.kernel.org/project/dri-devel/cover/20211207054747.461029-1-jagan@amarulasolutions.com/
> Changes for v5:
> - add atomic APIs
> - find host and device variant DSI devices.
> Changes for v4, v3:
> - none
>
> drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 83 ++++++++++----------------
> drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h | 9 +--
> 2 files changed, 33 insertions(+), 59 deletions(-)
>
> diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
> index 9cf91dcac3f2..f1d612bf1a0b 100644
> --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
> +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
> @@ -21,6 +21,7 @@
>
> #include <drm/drm_atomic_helper.h>
> #include <drm/drm_mipi_dsi.h>
> +#include <drm/drm_of.h>
> #include <drm/drm_panel.h>
> #include <drm/drm_print.h>
> #include <drm/drm_probe_helper.h>
> @@ -720,6 +721,7 @@ static void sun6i_dsi_encoder_enable(struct drm_encoder *encoder)
> struct mipi_dsi_device *device = dsi->device;
> union phy_configure_opts opts = { };
> struct phy_configure_opts_mipi_dphy *cfg = &opts.mipi_dphy;
> + struct drm_bridge *iter;
> u16 delay;
> int err;
>
> @@ -769,8 +771,10 @@ static void sun6i_dsi_encoder_enable(struct drm_encoder *encoder)
> phy_configure(dsi->dphy, &opts);
> phy_power_on(dsi->dphy);
>
> - if (dsi->panel)
> - drm_panel_prepare(dsi->panel);
> + list_for_each_entry(iter, &dsi->bridge_chain, chain_node) {
> + if (iter->funcs->pre_enable)
> + iter->funcs->pre_enable(iter);
> + }
Like we discussed in the previous version already, this is unnecessary,
just like the poking at bridge_chain in the encoder.
Maxime
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-12-13 17:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-10 11:17 [PATCH v6 0/6] drm: sun4i: dsi: Bridge support Jagan Teki
2021-12-10 11:17 ` [PATCH v6 1/6] drm: sun4i: dsi: Drop DRM bind race with bridge attach Jagan Teki
2021-12-13 17:02 ` Maxime Ripard
2022-01-17 15:42 ` Jagan Teki
2022-02-02 8:59 ` Maxime Ripard
2021-12-10 11:17 ` [PATCH v6 2/6] drm: sun4i: dsi: Add component only once DSI device attached Jagan Teki
2021-12-13 17:05 ` Maxime Ripard
2021-12-10 11:17 ` [PATCH v6 3/6] drm: sun4i: dsi: Add bridge support Jagan Teki
2021-12-13 17:17 ` Maxime Ripard [this message]
2022-01-17 15:38 ` Jagan Teki
2021-12-10 11:17 ` [DO NOT MERGE] [PATCH v6 4/6] ARM: dts: sun8i: bananapi-m2m: Enable iS070WV20-CT16 DSI Panel Jagan Teki
2021-12-10 11:17 ` [DO NOT MERGE] [PATCH v6 5/6] ARM: dts: sun8i: bananapi-m2m: Enable ICN6211 DSI Bridge Jagan Teki
2021-12-10 11:17 ` [DO NOT MERGE] [PATCH v6 6/6] ARM: dts: sun8i: bananapi-m2m: Enable DLPC3433 Bridge (I2C) Jagan Teki
2021-12-13 17:00 ` [PATCH v6 0/6] drm: sun4i: dsi: Bridge support Maxime Ripard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211213171757.bxu57eaqawmp5kwh@houat \
--to=maxime@cerno.tech \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jagan@amarulasolutions.com \
--cc=linux-amarula@amarulasolutions.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-sunxi@googlegroups.com \
--cc=narmstrong@baylibre.com \
--cc=robert.foss@linaro.org \
--cc=sam@ravnborg.org \
--cc=wens@csie.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox