From: Inki Dae <inki.dae@samsung.com>
To: dri-devel@lists.freedesktop.org
Cc: a.hajda@samsung.com, treding@nvidia.com,
linux-samsung-soc@vger.kernel.org
Subject: [PATCH v2 2/2] drm/exynos: dsi: add LPM (Low Power Mode) transfer support
Date: Mon, 28 Jul 2014 11:00:57 +0900 [thread overview]
Message-ID: <1406512857-7213-3-git-send-email-inki.dae@samsung.com> (raw)
In-Reply-To: <1406512857-7213-1-git-send-email-inki.dae@samsung.com>
This patch adds LPM transfer support for video or command data.
With this patch, Exynos MIPI DSI controller can transfer command or
video data with HS or LP mode in accordance with mode_flags set
by LCD Panel driver.
Changelog v2: Enable High Speed clock only in case of stand by request.
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
---
drivers/gpu/drm/exynos/exynos_drm_dsi.c | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
index 5e78d45..1bed105 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
@@ -493,8 +493,11 @@ static int exynos_dsi_enable_clock(struct exynos_dsi *dsi)
| DSIM_ESC_PRESCALER(esc_div)
| DSIM_LANE_ESC_CLK_EN_CLK
| DSIM_LANE_ESC_CLK_EN_DATA(BIT(dsi->lanes) - 1)
- | DSIM_BYTE_CLK_SRC(0)
- | DSIM_TX_REQUEST_HSCLK;
+ | DSIM_BYTE_CLK_SRC(0);
+
+ if (!(dsi->mode_flags & MIPI_DSI_MODE_CMD_LPM))
+ reg |= DSIM_TX_REQUEST_HSCLK;
+
writel(reg, dsi->reg_base + DSIM_CLKCTRL_REG);
return 0;
@@ -553,6 +556,18 @@ static void exynos_dsi_set_phy_ctrl(struct exynos_dsi *dsi)
writel(reg, dsi->reg_base + DSIM_PHYTIMING2_REG);
}
+static void exynos_dsi_enable_hs_clock(struct exynos_dsi *dsi,
+ bool enable)
+{
+ u32 reg = readl(dsi->reg_base + DSIM_CLKCTRL_REG);
+
+ reg &= ~DSIM_TX_REQUEST_HSCLK;
+ if (enable)
+ reg |= DSIM_TX_REQUEST_HSCLK;
+
+ writel(reg, dsi->reg_base + DSIM_CLKCTRL_REG);
+}
+
static void exynos_dsi_disable_clock(struct exynos_dsi *dsi)
{
u32 reg;
@@ -705,6 +720,9 @@ static void exynos_dsi_set_display_enable(struct exynos_dsi *dsi, bool enable)
{
u32 reg;
+ if (!(dsi->mode_flags & MIPI_DSI_MODE_VIDEO_LPM) && enable)
+ exynos_dsi_enable_hs_clock(dsi, true);
+
reg = readl(dsi->reg_base + DSIM_MDRESOL_REG);
if (enable)
reg |= DSIM_MAIN_STAND_BY;
--
1.7.9.5
next prev parent reply other threads:[~2014-07-28 2:00 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-28 2:00 [PATCH v2 0/2] drm/mipi-dsi: support lpm (low power mode) transfer Inki Dae
2014-07-28 2:00 ` [PATCH v2 1/2] drm/mipi-dsi: add (LPM) Low Power Mode transfer support Inki Dae
2014-07-28 16:09 ` Andrzej Hajda
2014-07-29 0:57 ` YoungJun Cho
2014-07-29 10:23 ` Andrzej Hajda
2014-08-03 7:03 ` Inki Dae
2014-08-03 7:16 ` Inki Dae
2014-08-05 8:12 ` Andrzej Hajda
2014-07-29 3:30 ` Inki Dae
2014-08-05 11:12 ` Thierry Reding
2014-08-06 7:11 ` Inki Dae
2014-08-06 7:43 ` Thierry Reding
2014-08-06 17:09 ` Inki Dae
2014-08-07 6:58 ` Thierry Reding
2014-08-07 7:51 ` Inki Dae
2014-08-07 9:09 ` Thierry Reding
2014-08-07 10:49 ` Inki Dae
2014-08-07 11:09 ` Thierry Reding
2014-08-07 13:05 ` Inki Dae
2014-08-07 13:17 ` Thierry Reding
2014-08-07 13:39 ` Inki Dae
2014-08-07 13:55 ` Thierry Reding
2014-08-08 1:45 ` Inki Dae
2014-08-08 7:03 ` Thierry Reding
2014-08-08 7:37 ` Inki Dae
2014-08-08 9:02 ` Andrzej Hajda
2014-08-08 9:40 ` Andrzej Hajda
2014-08-11 7:09 ` Inki Dae
2014-08-11 7:44 ` Andrzej Hajda
2014-08-11 8:01 ` Inki Dae
2014-08-11 8:05 ` Andrzej Hajda
2014-08-12 11:54 ` YoungJun Cho
2014-08-12 13:08 ` Inki Dae
2014-08-08 9:55 ` Thierry Reding
2014-08-11 5:19 ` Inki Dae
2014-08-11 7:24 ` Thierry Reding
2014-08-11 7:35 ` Inki Dae
2014-08-11 7:50 ` Thierry Reding
2014-08-11 8:15 ` Inki Dae
2014-08-11 9:11 ` Thierry Reding
2014-08-12 2:51 ` Inki Dae
2014-07-28 2:00 ` Inki Dae [this message]
2014-07-28 15:50 ` [PATCH v2 2/2] drm/exynos: dsi: add LPM (Low Power Mode) " Andrzej Hajda
2014-07-29 3:42 ` Inki Dae
2014-07-29 11:39 ` Andrzej Hajda
2014-07-29 12:08 ` Inki Dae
2014-07-29 13:16 ` Andrzej Hajda
2014-08-07 7:09 ` Inki Dae
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=1406512857-7213-3-git-send-email-inki.dae@samsung.com \
--to=inki.dae@samsung.com \
--cc=a.hajda@samsung.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=treding@nvidia.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