dri-devel Archive on lore.kernel.org
 help / color / Atom feed
From: Ondrej Jirman <megous@megous.com>
To: linux-sunxi@googlegroups.com,
	"Thierry Reding" <thierry.reding@gmail.com>,
	"Sam Ravnborg" <sam@ravnborg.org>,
	"David Airlie" <airlied@linux.ie>,
	"Daniel Vetter" <daniel@ffwll.ch>,
	"Guido Günther" <agx@sigxcpu.org>,
	"Purism Kernel Team" <kernel@puri.sm>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Chen-Yu Tsai" <wens@csie.org>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Icenowy Zheng" <icenowy@aosc.io>
Cc: Ondrej Jirman <megous@megous.com>,
	devicetree@vger.kernel.org, Samuel Holland <samuel@sholland.org>,
	Bhushan Shah <bshah@kde.org>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	Luca Weiss <luca@z3ntu.xyz>, Martijn Braam <martijn@brixit.nl>,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 10/13] drm/panel: st7703: Enter sleep after display off
Date: Fri, 26 Jun 2020 02:55:58 +0200
Message-ID: <20200626005601.241022-11-megous@megous.com> (raw)
In-Reply-To: <20200626005601.241022-1-megous@megous.com>

The datasheet suggests to issue sleep in after display off
as a part of the panel's shutdown sequence.

Signed-off-by: Ondrej Jirman <megous@megous.com>
---
 drivers/gpu/drm/panel/panel-sitronix-st7703.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
index 33611419059a..e771281eb547 100644
--- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c
+++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
@@ -394,8 +394,19 @@ static int st7703_disable(struct drm_panel *panel)
 {
 	struct st7703 *ctx = panel_to_st7703(panel);
 	struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
+	int ret;
+
+	ret = mipi_dsi_dcs_set_display_off(dsi);
+	if (ret < 0)
+		DRM_DEV_ERROR(ctx->dev,
+			      "Failed to turn off the display: %d\n", ret);
 
-	return mipi_dsi_dcs_set_display_off(dsi);
+	ret = mipi_dsi_dcs_enter_sleep_mode(dsi);
+	if (ret < 0)
+		DRM_DEV_ERROR(ctx->dev,
+			      "Failed to enter sleep mode: %d\n", ret);
+
+	return 0;
 }
 
 static int st7703_unprepare(struct drm_panel *panel)
-- 
2.27.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply index

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-26  0:55 [PATCH v5 00/13] Add support for PinePhone LCD panel Ondrej Jirman
2020-06-26  0:55 ` [PATCH v5 01/13] dt-bindings: vendor-prefixes: Add Xingbangda Ondrej Jirman
2020-06-26  0:55 ` [PATCH v5 02/13] dt-bindings: panel: Convert rocktech, jh057n00900 to yaml Ondrej Jirman
2020-06-29 22:02   ` Rob Herring
2020-06-26  0:55 ` [PATCH v5 03/13] dt-bindings: panel: Add compatible for Xingbangda XBD599 panel Ondrej Jirman
2020-06-26  0:55 ` [PATCH v5 04/13] drm/panel: rocktech-jh057n00900: Rename the driver to st7703 Ondrej Jirman
2020-07-01  7:47   ` Linus Walleij
2020-06-26  0:55 ` [PATCH v5 05/13] drm/panel: st7703: Rename functions from jh057n prefix " Ondrej Jirman
2020-07-01  7:48   ` Linus Walleij
2020-06-26  0:55 ` [PATCH v5 06/13] drm/panel: st7703: Prepare for supporting multiple panels Ondrej Jirman
2020-07-01  7:48   ` Linus Walleij
2020-06-26  0:55 ` [PATCH v5 07/13] drm/panel: st7703: Move code specific to jh057n closer together Ondrej Jirman
2020-07-01  7:49   ` Linus Walleij
2020-06-26  0:55 ` [PATCH v5 08/13] drm/panel: st7703: Move generic part of init sequence to enable callback Ondrej Jirman
2020-07-01  7:50   ` Linus Walleij
2020-06-26  0:55 ` [PATCH v5 09/13] drm/panel: st7703: Add support for Xingbangda XBD599 Ondrej Jirman
2020-07-01  7:50   ` Linus Walleij
2020-07-01 10:34     ` Ondřej Jirman
2020-06-26  0:55 ` Ondrej Jirman [this message]
2020-07-01  7:51   ` [PATCH v5 10/13] drm/panel: st7703: Enter sleep after display off Linus Walleij
2020-06-26  0:55 ` [PATCH v5 11/13] drm/panel: st7703: Assert reset prior to powering down the regulators Ondrej Jirman
2020-07-01  7:51   ` Linus Walleij
2020-06-26  0:56 ` [PATCH v5 12/13] arm64: dts: sun50i-a64-pinephone: Enable LCD support on PinePhone Ondrej Jirman
2020-07-01  7:52   ` Linus Walleij
2020-06-26  0:56 ` [PATCH v5 13/13] arm64: dts: sun50i-a64-pinephone: Add touchscreen support Ondrej Jirman
2020-07-01  7:52   ` Linus Walleij

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=20200626005601.241022-11-megous@megous.com \
    --to=megous@megous.com \
    --cc=agx@sigxcpu.org \
    --cc=airlied@linux.ie \
    --cc=bshah@kde.org \
    --cc=daniel@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=icenowy@aosc.io \
    --cc=kernel@puri.sm \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=luca@z3ntu.xyz \
    --cc=martijn@brixit.nl \
    --cc=mripard@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=sam@ravnborg.org \
    --cc=samuel@sholland.org \
    --cc=thierry.reding@gmail.com \
    --cc=wens@csie.org \
    /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

dri-devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dri-devel/0 dri-devel/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 dri-devel dri-devel/ https://lore.kernel.org/dri-devel \
		dri-devel@lists.freedesktop.org
	public-inbox-index dri-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.freedesktop.lists.dri-devel


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