From: Mark Zhang <markz-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [RFC PATCH 10/12] drm: panel: Add idle/busy in Sharp lq101r1sx01 driver
Date: Mon, 11 May 2015 09:38:29 +0800 [thread overview]
Message-ID: <1431308311-4470-11-git-send-email-markz@nvidia.com> (raw)
In-Reply-To: <1431308311-4470-1-git-send-email-markz-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Mark Zhang <markz-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c | 26 +++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c b/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c
index 654575607864..a0a7c80f23d6 100644
--- a/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c
+++ b/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c
@@ -90,6 +90,18 @@ static __maybe_unused int sharp_panel_read(struct sharp_panel *sharp,
return err;
}
+static int sharp_panel_idle(struct drm_panel *panel)
+{
+ struct sharp_panel *sharp = to_sharp_panel(panel);
+ int err = 0;
+
+ err = mipi_dsi_dcs_enter_idle_mode(sharp->link1);
+ if (err < 0)
+ dev_err(panel->dev, "failed to enter idle: %d\n", err);
+
+ return err;
+}
+
static int sharp_panel_disable(struct drm_panel *panel)
{
struct sharp_panel *sharp = to_sharp_panel(panel);
@@ -168,6 +180,18 @@ static int sharp_setup_symmetrical_split(struct mipi_dsi_device *left,
return 0;
}
+static int sharp_panel_busy(struct drm_panel *panel)
+{
+ struct sharp_panel *sharp = to_sharp_panel(panel);
+ int err = 0;
+
+ err = mipi_dsi_dcs_exit_idle_mode(sharp->link1);
+ if (err < 0)
+ dev_err(panel->dev, "failed to exit idle: %d\n", err);
+
+ return err;
+}
+
static int sharp_panel_prepare(struct drm_panel *panel)
{
struct sharp_panel *sharp = to_sharp_panel(panel);
@@ -324,6 +348,8 @@ static int sharp_panel_get_modes(struct drm_panel *panel)
}
static const struct drm_panel_funcs sharp_panel_funcs = {
+ .idle = sharp_panel_idle,
+ .busy = sharp_panel_busy,
.disable = sharp_panel_disable,
.unprepare = sharp_panel_unprepare,
.prepare = sharp_panel_prepare,
--
2.1.4
next prev parent reply other threads:[~2015-05-11 1:38 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-11 1:38 [RFC PATCH 00/12] Tegra: Add DC one-shot support Mark Zhang
[not found] ` <1431308311-4470-1-git-send-email-markz-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-05-11 1:38 ` [RFC PATCH 01/12] drm: Add a new mode flag: DRM_MODE_FLAG_PREFER_ONE_SHOT Mark Zhang
[not found] ` <1431308311-4470-2-git-send-email-markz-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-05-11 9:27 ` Daniel Vetter
[not found] ` <20150511092743.GO15256-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2015-05-11 16:34 ` Mark Zhang
2015-05-12 6:35 ` Daniel Vetter
2015-05-12 8:23 ` Thierry Reding
2015-05-12 11:31 ` Daniel Vetter
2015-05-11 1:38 ` [RFC PATCH 02/12] drm: panel: Add one-shot flag to Sharp lq101r1sx01 driver Mark Zhang
2015-05-11 1:38 ` [RFC PATCH 03/12] drm: panel: Turn on TE(Tearing Effect) on Sharp lq101r1sx01 Mark Zhang
2015-05-11 1:38 ` [RFC PATCH 04/12] drm: Add DRM mode flag TE polarity Mark Zhang
2015-05-11 1:38 ` [RFC PATCH 05/12] dt: panel: Add property "te-polarity" Mark Zhang
2015-05-11 1:38 ` [RFC PATCH 06/12] drm: panel: Parse "te-polarity" in Sharp lq101r1sx01 driver Mark Zhang
2015-05-11 1:38 ` [RFC PATCH 07/12] drm/tegra: Set NC(Non-contiguous) mode to dc for one-shot Mark Zhang
2015-05-11 1:38 ` [RFC PATCH 08/12] drm/panel: Add panel func: idle/busy Mark Zhang
2015-05-11 1:38 ` [RFC PATCH 09/12] drm: dsi: Add "enter idle" & "exit idle" dcs functions Mark Zhang
2015-05-11 1:38 ` Mark Zhang [this message]
2015-05-11 1:38 ` [RFC PATCH 11/12] drm/tegra: Suspend dc/dsi/panel in one-shot mode Mark Zhang
2015-05-11 1:38 ` [RFC PATCH 12/12] JUST FOR TEST: Add one-shot trigger to update display Mark Zhang
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=1431308311-4470-11-git-send-email-markz@nvidia.com \
--to=markz-ddmlm1+adcrqt0dzr+alfa@public.gmane.org \
--cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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
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