From: "Yannick Fertré" <yannick.fertre@st.com>
To: Andrzej Hajda <a.hajda@samsung.com>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
David Airlie <airlied@linux.ie>,
"Daniel Vetter" <daniel@ffwll.ch>,
Heiko Stuebner <heiko@sntech.de>, Sam Ravnborg <sam@ravnborg.org>,
Yannick Fertre <yannick.fertre@st.com>,
Nickey Yang <nickey.yang@rock-chips.com>,
Philippe Cornu <philippe.cornu@st.com>,
Benjamin Gaignard <benjamin.gaignard@linaro.org>,
Vincent Abriou <vincent.abriou@st.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@st.com>,
<dri-devel@lists.freedesktop.org>,
<linux-stm32@st-md-mailman.stormreply.com>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Subject: [PATCH v1 1/2] drm/bridge/synopsys: dsi: add power on/off optional phy ops
Date: Mon, 27 May 2019 12:21:38 +0200 [thread overview]
Message-ID: <1558952499-15418-2-git-send-email-yannick.fertre@st.com> (raw)
In-Reply-To: <1558952499-15418-1-git-send-email-yannick.fertre@st.com>
Add power on & off optional physical operation functions, helpful to
program specific registers of the DSI physical part.
Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
---
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 8 ++++++++
include/drm/bridge/dw_mipi_dsi.h | 2 ++
2 files changed, 10 insertions(+)
diff --git a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
index e915ae8..5bb676f 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
@@ -775,6 +775,10 @@ static void dw_mipi_dsi_clear_err(struct dw_mipi_dsi *dsi)
static void dw_mipi_dsi_bridge_post_disable(struct drm_bridge *bridge)
{
struct dw_mipi_dsi *dsi = bridge_to_dsi(bridge);
+ const struct dw_mipi_dsi_phy_ops *phy_ops = dsi->plat_data->phy_ops;
+
+ if (phy_ops->power_off)
+ phy_ops->power_off(dsi->plat_data->priv_data);
/*
* Switch to command mode before panel-bridge post_disable &
@@ -874,11 +878,15 @@ static void dw_mipi_dsi_bridge_mode_set(struct drm_bridge *bridge,
static void dw_mipi_dsi_bridge_enable(struct drm_bridge *bridge)
{
struct dw_mipi_dsi *dsi = bridge_to_dsi(bridge);
+ const struct dw_mipi_dsi_phy_ops *phy_ops = dsi->plat_data->phy_ops;
/* Switch to video mode for panel-bridge enable & panel enable */
dw_mipi_dsi_set_mode(dsi, MIPI_DSI_MODE_VIDEO);
if (dsi->slave)
dw_mipi_dsi_set_mode(dsi->slave, MIPI_DSI_MODE_VIDEO);
+
+ if (phy_ops->power_on)
+ phy_ops->power_on(dsi->plat_data->priv_data);
}
static enum drm_mode_status
diff --git a/include/drm/bridge/dw_mipi_dsi.h b/include/drm/bridge/dw_mipi_dsi.h
index 7d3dd69..df6eda6 100644
--- a/include/drm/bridge/dw_mipi_dsi.h
+++ b/include/drm/bridge/dw_mipi_dsi.h
@@ -14,6 +14,8 @@ struct dw_mipi_dsi;
struct dw_mipi_dsi_phy_ops {
int (*init)(void *priv_data);
+ void (*power_on)(void *priv_data);
+ void (*power_off)(void *priv_data);
int (*get_lane_mbps)(void *priv_data,
const struct drm_display_mode *mode,
unsigned long mode_flags, u32 lanes, u32 format,
--
2.7.4
next prev parent reply other threads:[~2019-05-27 10:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20190527102219epcas2p20eaad1cb2849841d8b0c3dbc8d0b2e99@epcas2p2.samsung.com>
2019-05-27 10:21 ` [PATCH v1 0/2] dw-mipi-dsi: add power on & off optional phy ops and update stm Yannick Fertré
2019-05-27 10:21 ` Yannick Fertré [this message]
2019-05-27 12:53 ` [PATCH v1 1/2] drm/bridge/synopsys: dsi: add power on/off optional phy ops Philippe CORNU
2019-06-12 6:59 ` Andrzej Hajda
2019-05-27 10:21 ` [PATCH v1 2/2] drm/stm: dsi: add power on/off " Yannick Fertré
2019-05-27 12:54 ` Philippe CORNU
2019-06-12 7:02 ` Andrzej Hajda
2019-06-12 7:18 ` [PATCH v1 0/2] dw-mipi-dsi: add power on & off optional phy ops and update stm Andrzej Hajda
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=1558952499-15418-2-git-send-email-yannick.fertre@st.com \
--to=yannick.fertre@st.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=a.hajda@samsung.com \
--cc=airlied@linux.ie \
--cc=alexandre.torgue@st.com \
--cc=benjamin.gaignard@linaro.org \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=heiko@sntech.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=nickey.yang@rock-chips.com \
--cc=philippe.cornu@st.com \
--cc=sam@ravnborg.org \
--cc=vincent.abriou@st.com \
/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;
as well as URLs for NNTP newsgroup(s).