Linux-Renesas-SoC Archive on lore.kernel.org
 help / color / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Nguyen An Hoan <na-hoan@jinso.co.jp>
Cc: linux-renesas-soc@vger.kernel.org, geert+renesas@glider.be,
	kieran.bingham+renesas@ideasonboard.com,
	kuninori.morimoto.gx@renesas.com,
	yoshihiro.shimoda.uh@renesas.com, h-inayoshi@jinso.co.jp,
	nv-dung@jinso.co.jp, cv-dong@jinso.co.jp
Subject: Re: [PATCH 2/2] drm: rcar-du: Add Standby Mode to suspend()
Date: Fri, 14 Dec 2018 10:15:17 +0200
Message-ID: <10902832.ksRS9jOFM4@avalon> (raw)
In-Reply-To: <1544772318-17408-2-git-send-email-na-hoan@jinso.co.jp>

Hello Hoan-san,

On Friday, 14 December 2018 09:25:18 EET Nguyen An Hoan wrote:
> From: Hoan Nguyen An <na-hoan@jinso.co.jp>
> 
> Enter Standby Mode before suspend by drm
> We will not need to "Release from Module Standby Mode"
> because after resume() is called, this is done.
> 
> Signed-off-by: Hoan Nguyen An <na-hoan@jinso.co.jp>
> ---
>  drivers/gpu/drm/rcar-du/rcar_du_drv.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> b/drivers/gpu/drm/rcar-du/rcar_du_drv.c index 32dba13..1ab3f56 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> @@ -426,6 +426,20 @@ static struct drm_driver rcar_du_driver = {
>  static int rcar_du_pm_suspend(struct device *dev)
>  {
>  	struct rcar_du_device *rcdu = dev_get_drvdata(dev);
> +	int ret;
> +	unsigned int i = 0;
> +
> +	for (i = 0; i < rcdu->num_crtcs; i++)
> +	{
> +		struct rcar_du_crtc *rcrtc = &rcdu->crtcs[i];
> +
> +		ret = rcar_du_crtc_standby(rcrtc);
> +		if(ret)
> +		{
> +			dev_err(dev, "failed to enter Standby mode\n");
> +			return ret;
> +		}
> +	}

Could you please explain why this is needed ? The call to 
drm_mode_config_helper_suspend() should disable all CRTCs, so there shouldn't 
be a need to disable them manually first.

>  	return drm_mode_config_helper_suspend(rcdu->ddev);
>  }

-- 
Regards,

Laurent Pinchart




  reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-14  7:25 [PATCH 1/2] drm: rcar-du: Add Standby Mode support Nguyen An Hoan
2018-12-14  7:25 ` [PATCH 2/2] drm: rcar-du: Add Standby Mode to suspend() Nguyen An Hoan
2018-12-14  8:15   ` Laurent Pinchart [this message]
2018-12-14  8:47 ` [PATCH 1/2] drm: rcar-du: Add Standby Mode support Sergei Shtylyov
2018-12-14 19:06 ` Geert Uytterhoeven

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=10902832.ksRS9jOFM4@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=cv-dong@jinso.co.jp \
    --cc=geert+renesas@glider.be \
    --cc=h-inayoshi@jinso.co.jp \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=na-hoan@jinso.co.jp \
    --cc=nv-dung@jinso.co.jp \
    --cc=yoshihiro.shimoda.uh@renesas.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

Linux-Renesas-SoC Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-renesas-soc/0 linux-renesas-soc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-renesas-soc linux-renesas-soc/ https://lore.kernel.org/linux-renesas-soc \
		linux-renesas-soc@vger.kernel.org
	public-inbox-index linux-renesas-soc

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-renesas-soc


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git