mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/panel: simple: ensure Sharp lq123p1jx31 isn't turned off too soon
@ 2017-02-02 23:38 Douglas Anderson
  2017-02-04  2:36 ` Doug Anderson
  2017-02-06 12:03 ` Thierry Reding
  0 siblings, 2 replies; 4+ messages in thread
From: Douglas Anderson @ 2017-02-02 23:38 UTC (permalink / raw)
  To: thierry.reding
  Cc: seanpaul, marcheu, briannorris, hoegsberg, Douglas Anderson,
	airlied, dri-devel, linux-kernel

The Sharp lq123p1jx31 has a requirement that the VDD is on for at
least 300 ms before being turned off.  At the moment nothing anywhere
in the kernel is ensuring this.

The simplest way to ensure this is to add a "disable" timing of 150
ms.  With this the we know that there will be at least 300 ms between
the regulator/gpio being turned on and being turned off.
Specifically, here's what happens after this change:

* prepare: enable regulator, delay 110 ms (10 for regulator, then 100)
* enable: delay 50 ms
* disable: delay 150 ms, then disable regulator
* unprepare: delay 550 ms (50 for regulator, 500 to off=>on too quick)

As you can see, even giving the regulator 10 ms (the max the panel
spec allows) for ramping up we are sure that the regulator was on for
300 ms now.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
---
 drivers/gpu/drm/panel/panel-simple.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 89eb0422821c..dbaadfa6b823 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -1622,6 +1622,7 @@ static const struct panel_desc sharp_lq123p1jx31 = {
 	.delay = {
 		.prepare = 110,
 		.enable = 50,
+		.disable = 150,
 		.unprepare = 550,
 	},
 };
-- 
2.11.0.483.g087da7b7c-goog

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

end of thread, other threads:[~2017-02-06 16:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-02 23:38 [PATCH] drm/panel: simple: ensure Sharp lq123p1jx31 isn't turned off too soon Douglas Anderson
2017-02-04  2:36 ` Doug Anderson
2017-02-06 12:03 ` Thierry Reding
2017-02-06 16:15   ` Doug Anderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®