All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] drm/panel: sharp: lq101r1sx01: Send cmds to panel from link2
@ 2015-03-25  6:56 Mark Zhang
       [not found] ` <1427266602-31905-1-git-send-email-markz-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Zhang @ 2015-03-25  6:56 UTC (permalink / raw)
  To: thierry.reding-Re5JQEeQqe8AvxtiuMwx3w
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, Mark Zhang

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] drm/panel: sharp: lq101r1sx01: Send cmds to panel from link2
       [not found] ` <1427266602-31905-1-git-send-email-markz-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2015-03-25 14:17   ` Stephen Warren
       [not found]     ` <5512C384.3070803-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Warren @ 2015-03-25 14:17 UTC (permalink / raw)
  To: Mark Zhang, thierry.reding-Re5JQEeQqe8AvxtiuMwx3w
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA

On 03/25/2015 12:56 AM, Mark Zhang wrote:
> 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.

What's the changelog v1->v2?

I expect you should CC the DRM list and maintainer too?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] drm/panel: sharp: lq101r1sx01: Send cmds to panel from link2
       [not found]     ` <5512C384.3070803-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
@ 2015-03-26  1:12       ` Mark Zhang
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Zhang @ 2015-03-26  1:12 UTC (permalink / raw)
  To: Stephen Warren, thierry.reding-Re5JQEeQqe8AvxtiuMwx3w
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA

I've talked with Thierry about this. The patch doesn't make sense for
now. So please ignore it, thanks Stephen/Thierry.

Mark
On 03/25/2015 10:17 PM, Stephen Warren wrote:
> On 03/25/2015 12:56 AM, Mark Zhang wrote:
>> 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.
> 
> What's the changelog v1->v2?
> 
> I expect you should CC the DRM list and maintainer too?

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-03-26  1:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-25  6:56 [PATCH v2] drm/panel: sharp: lq101r1sx01: Send cmds to panel from link2 Mark Zhang
     [not found] ` <1427266602-31905-1-git-send-email-markz-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-03-25 14:17   ` Stephen Warren
     [not found]     ` <5512C384.3070803-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2015-03-26  1:12       ` Mark Zhang

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.