From: Jagan Teki <jagan@amarulasolutions.com>
To: Maxime Ripard <mripard@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
Jernej Skrabec <jernej.skrabec@siol.net>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
Cc: dri-devel@lists.freedesktop.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-amarula@amarulasolutions.com,
Jagan Teki <jagan@amarulasolutions.com>
Subject: [PATCH v3 4/7] drm: sun4i: dsi: Separate code for bridge pre_enable
Date: Mon, 15 Feb 2021 01:10:59 +0530 [thread overview]
Message-ID: <20210214194102.126146-5-jagan@amarulasolutions.com> (raw)
In-Reply-To: <20210214194102.126146-1-jagan@amarulasolutions.com>
The existing driver has an enablement code for initializing
clock, reset, PHY, DSI timings, and finally switching to HS
mode.
Move the clock, reset. PHY and DSI timings code into bridge
pre_enable and keep HS mode switch in enable.
As the driver supports fully enabled bridge functionalities,
this new enablement code separation will help to initialize
the host and slave bridge pre_enable, enable functions properly.
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
Changes for v3:
- new patch
drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
index 6f3c5330a468..3cdc14daf25c 100644
--- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
+++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
@@ -714,7 +714,7 @@ static int sun6i_dsi_start(struct sun6i_dsi *dsi,
return 0;
}
-static void sun6i_dsi_bridge_enable(struct drm_bridge *bridge)
+static void sun6i_dsi_bridge_pre_enable(struct drm_bridge *bridge)
{
struct drm_display_mode *mode = &bridge->encoder->crtc->state->adjusted_mode;
struct sun6i_dsi *dsi = bridge_to_sun6i_dsi(bridge);
@@ -775,6 +775,11 @@ static void sun6i_dsi_bridge_enable(struct drm_bridge *bridge)
if (dsi->panel_bridge)
dsi->panel_bridge->funcs->pre_enable(dsi->panel_bridge);
+}
+
+static void sun6i_dsi_bridge_enable(struct drm_bridge *bridge)
+{
+ struct sun6i_dsi *dsi = bridge_to_sun6i_dsi(bridge);
/*
* FIXME: This should be moved after the switch to HS mode.
@@ -883,6 +888,7 @@ static int sun6i_dsi_bridge_attach(struct drm_bridge *bridge,
}
static const struct drm_bridge_funcs sun6i_dsi_bridge_funcs = {
+ .pre_enable = sun6i_dsi_bridge_pre_enable,
.enable = sun6i_dsi_bridge_enable,
.disable = sun6i_dsi_bridge_disable,
.attach = sun6i_dsi_bridge_attach,
--
2.25.1
next prev parent reply other threads:[~2021-02-14 19:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-14 19:40 [PATCH v3 0/7] drm: sun4i: dsi: Convert drm bridge Jagan Teki
2021-02-14 19:40 ` [PATCH v3 1/7] drm: sun4i: dsi: Use drm_of_find_panel_or_bridge Jagan Teki
2021-02-14 19:40 ` [PATCH v3 2/7] drm: sun4i: dsi: Add bridge support Jagan Teki
2021-02-14 19:40 ` [PATCH v3 3/7] drm: sun4i: dsi: Convert to bridge driver Jagan Teki
2021-02-14 19:40 ` Jagan Teki [this message]
2021-02-14 19:41 ` [PATCH v3 5/7] drm: bridge: Queue the bridge chain instead of stacking Jagan Teki
2021-02-22 5:54 ` Laurent Pinchart
2021-02-14 19:41 ` [PATCH v3 6/7] drm: sun4i: dsi: Use drm_panel_bridge, connector API Jagan Teki
2021-02-26 16:57 ` Maxime Ripard
2021-02-26 17:10 ` Jagan Teki
2021-03-02 16:35 ` Maxime Ripard
2021-03-02 17:46 ` Jagan Teki
2021-02-14 19:41 ` [DO NOT MERGE] [PATCH v3 7/7] ARM: dts: sun8i: bananapi-m2m: Enable S070WV20-CT16 panel Jagan Teki
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=20210214194102.126146-5-jagan@amarulasolutions.com \
--to=jagan@amarulasolutions.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jernej.skrabec@siol.net \
--cc=linux-amarula@amarulasolutions.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mripard@kernel.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
all inboxes | Powered by JetHome®