linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Zhang <markz-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Mark Zhang <markz-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Subject: [PATCH v2] drm/panel: sharp: lq101r1sx01: Send cmds to panel from link2
Date: Wed, 25 Mar 2015 14:56:42 +0800	[thread overview]
Message-ID: <1427266602-31905-1-git-send-email-markz@nvidia.com> (raw)

Sharp lq101r1sx01 panel works as left-right gang mode. So link2
should send cmds like "exit sleep mode", "set display on"
to panel as well.

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 3cce3ca19601..13e67a0ad3d9 100644
--- a/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c
+++ b/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c
@@ -119,10 +119,18 @@ static int sharp_panel_unprepare(struct drm_panel *panel)
 	err = mipi_dsi_dcs_set_display_off(sharp->link1);
 	if (err < 0)
 		dev_err(panel->dev, "failed to set display off: %d\n", err);
+	err = mipi_dsi_dcs_set_display_off(sharp->link2);
+	if (err < 0)
+		dev_err(panel->dev, "link2: failed to set display off: %d\n",
+					err);
 
 	err = mipi_dsi_dcs_enter_sleep_mode(sharp->link1);
 	if (err < 0)
 		dev_err(panel->dev, "failed to enter sleep mode: %d\n", err);
+	err = mipi_dsi_dcs_enter_sleep_mode(sharp->link2);
+	if (err < 0)
+		dev_err(panel->dev, "link2: failed to enter sleep mode: %d\n",
+					err);
 
 	msleep(120);
 
@@ -193,6 +201,12 @@ static int sharp_panel_prepare(struct drm_panel *panel)
 		dev_err(panel->dev, "failed to exit sleep mode: %d\n", err);
 		goto poweroff;
 	}
+	err = mipi_dsi_dcs_exit_sleep_mode(sharp->link2);
+	if (err < 0) {
+		dev_err(panel->dev, "link2: failed to exit sleep mode: %d\n",
+					err);
+		goto poweroff;
+	}
 
 	/*
 	 * The MIPI DCS specification mandates this delay only between the
@@ -222,6 +236,12 @@ static int sharp_panel_prepare(struct drm_panel *panel)
 		dev_err(panel->dev, "failed to set pixel format: %d\n", err);
 		goto poweroff;
 	}
+	err = mipi_dsi_dcs_set_pixel_format(sharp->link2, format);
+	if (err < 0) {
+		dev_err(panel->dev, "link2: failed to set pixel format: %d\n",
+					err);
+		goto poweroff;
+	}
 
 	/*
 	 * TODO: The device supports both left-right and even-odd split
@@ -243,6 +263,12 @@ static int sharp_panel_prepare(struct drm_panel *panel)
 		dev_err(panel->dev, "failed to set display on: %d\n", err);
 		goto poweroff;
 	}
+	err = mipi_dsi_dcs_set_display_on(sharp->link2);
+	if (err < 0) {
+		dev_err(panel->dev, "link2: failed to set display on: %d\n",
+					err);
+		goto poweroff;
+	}
 
 	sharp->prepared = true;
 
-- 
2.1.4

             reply	other threads:[~2015-03-25  6:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-25  6:56 Mark Zhang [this message]
     [not found] ` <1427266602-31905-1-git-send-email-markz-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-03-25 14:17   ` [PATCH v2] drm/panel: sharp: lq101r1sx01: Send cmds to panel from link2 Stephen Warren
     [not found]     ` <5512C384.3070803-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2015-03-26  1:12       ` 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=1427266602-31905-1-git-send-email-markz@nvidia.com \
    --to=markz-ddmlm1+adcrqt0dzr+alfa@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;
as well as URLs for NNTP newsgroup(s).