All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nguyen An Hoan <na-hoan@jinso.co.jp>
To: linux-renesas-soc@vger.kernel.org, geert+renesas@glider.be,
	laurent.pinchart@ideasonboard.com,
	kieran.bingham+renesas@ideasonboard.com
Cc: kuninori.morimoto.gx@renesas.com,
	yoshihiro.shimoda.uh@renesas.com, h-inayoshi@jinso.co.jp,
	nv-dung@jinso.co.jp, na-hoan@jinso.co.jp, cv-dong@jinso.co.jp
Subject: [PATCH 2/2] drm: rcar-du: Add Standby Mode to suspend()
Date: Fri, 14 Dec 2018 16:25:18 +0900	[thread overview]
Message-ID: <1544772318-17408-2-git-send-email-na-hoan@jinso.co.jp> (raw)
In-Reply-To: <1544772318-17408-1-git-send-email-na-hoan@jinso.co.jp>

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;
+		}
+	}
 
 	return drm_mode_config_helper_suspend(rcdu->ddev);
 }
-- 
2.7.4


  reply	other threads:[~2018-12-14  7:25 UTC|newest]

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 ` Nguyen An Hoan [this message]
2018-12-14  8:15   ` [PATCH 2/2] drm: rcar-du: Add Standby Mode to suspend() Laurent Pinchart
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=1544772318-17408-2-git-send-email-na-hoan@jinso.co.jp \
    --to=na-hoan@jinso.co.jp \
    --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=laurent.pinchart@ideasonboard.com \
    --cc=linux-renesas-soc@vger.kernel.org \
    --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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.