dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Andrzej Hajda <a.hajda@samsung.com>
To: Inki Dae <inki.dae@samsung.com>, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/exynos: mipi-dsi: consider non-continuous clock mode
Date: Mon, 18 Aug 2014 12:13:04 +0200	[thread overview]
Message-ID: <53F1D1B0.4030208@samsung.com> (raw)
In-Reply-To: <1408349495-25568-3-git-send-email-inki.dae@samsung.com>

On 08/18/2014 10:11 AM, Inki Dae wrote:
> This patch adds non-continuous clock mode support
>
> Clock mode on Clock Lane is continuous clock by default.
> So if we want to transmit data in non-continuous clock mode
> to reduce power consumption, then host driver should set
> DSIM_CLKLANE_STOP bit. In this case, host controller turns off
> HS clock between high speed transmissions.
>
> For this, this patch adds a new bit, DSIM_CLKLANE_STOP, and makes
> the host driver set this bit only in case that dsi->mode_flags has
> MIPI_DSI_CLOCK_NON_CONTINUOUS flag.
>
> Signed-off-by: Inki Dae <inki.dae@samsung.com>

Acked-by: Andrzej Hajda <a.hajda@samsung.com>
--
Regards
Andrzej
> ---
>  drivers/gpu/drm/exynos/exynos_drm_dsi.c |   19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> index 442aa2d..2d47290 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> @@ -114,6 +114,8 @@
>  #define DSIM_SYNC_INFORM		(1 << 27)
>  #define DSIM_EOT_DISABLE		(1 << 28)
>  #define DSIM_MFLUSH_VS			(1 << 29)
> +/* This flag is valid only for exynos3250/3472/4415/5260/5430 */
> +#define DSIM_CLKLANE_STOP		(1 << 30)
>  
>  /* DSIM_ESCMODE */
>  #define DSIM_TX_TRIGGER_RST		(1 << 4)
> @@ -262,6 +264,7 @@ struct exynos_dsi_driver_data {
>  	unsigned int plltmr_reg;
>  
>  	unsigned int has_freqband:1;
> +	unsigned int has_clklane_stop:1;
>  };
>  
>  struct exynos_dsi {
> @@ -304,6 +307,7 @@ struct exynos_dsi {
>  static struct exynos_dsi_driver_data exynos4_dsi_driver_data = {
>  	.plltmr_reg = 0x50,
>  	.has_freqband = 1,
> +	.has_clklane_stop = 1,
>  };
>  
>  static struct exynos_dsi_driver_data exynos5_dsi_driver_data = {
> @@ -569,6 +573,7 @@ static void exynos_dsi_disable_clock(struct exynos_dsi *dsi)
>  
>  static int exynos_dsi_init_link(struct exynos_dsi *dsi)
>  {
> +	struct exynos_dsi_driver_data *driver_data = dsi->driver_data;
>  	int timeout;
>  	u32 reg;
>  	u32 lanes_mask;
> @@ -650,6 +655,20 @@ static int exynos_dsi_init_link(struct exynos_dsi *dsi)
>  	reg |= DSIM_LANE_EN(lanes_mask);
>  	writel(reg, dsi->reg_base + DSIM_CONFIG_REG);
>  
> +	/*
> +	 * Use non-continuous clock mode if the periparal wants and
> +	 * host controller supports
> +	 *
> +	 * In non-continous clock mode, host controller will turn off
> +	 * the HS clock between high-speed transmissions to reduce
> +	 * power consumption.
> +	 */
> +	if (driver_data->has_clklane_stop &&
> +			dsi->mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS) {
> +		reg |= DSIM_CLKLANE_STOP;
> +		writel(reg, dsi->reg_base + DSIM_CONFIG_REG);
> +	}
> +
>  	/* Check clock and data lane state are stop state */
>  	timeout = 100;
>  	do {

  reply	other threads:[~2014-08-18 10:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-18  8:11 [PATCH 0/2] drm/mipi-dsi: support low power transmission Inki Dae
2014-08-18  8:11 ` [PATCH 1/2] drm/mipi-dsi: consider " Inki Dae
2014-08-18 11:38   ` Andrzej Hajda
2014-08-18 12:30     ` Inki Dae
2019-11-20 13:57   ` Linus Walleij
2014-08-18  8:11 ` [PATCH 2/2] drm/exynos: mipi-dsi: consider non-continuous clock mode Inki Dae
2014-08-18 10:13   ` Andrzej Hajda [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-08-12  6:33 [PATCH 0/2] drm/mipi-dsi: consider low power transmission Inki Dae
2014-08-12  6:33 ` [PATCH 2/2] drm/exynos: mipi-dsi: consider non-continuous clock mode 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=53F1D1B0.4030208@samsung.com \
    --to=a.hajda@samsung.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=inki.dae@samsung.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