dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/panel: simple: Initialize unprepared_time in probe
@ 2023-07-09 13:52 Marek Vasut
  2023-07-09 15:08 ` Sam Ravnborg
  2023-07-18 14:17 ` Doug Anderson
  0 siblings, 2 replies; 15+ messages in thread
From: Marek Vasut @ 2023-07-09 13:52 UTC (permalink / raw)
  To: dri-devel; +Cc: Marek Vasut, Neil Armstrong, Sam Ravnborg, Douglas Anderson

The unprepared_time has to be initialized during probe to probe time
ktime, otherwise panel_simple_resume() panel_simple_wait() call may
wait too short time, or no time at all, which would violate the panel
timing specification. Initializing the unprepared_time() to probe time
ktime assures the delay is at least what the panel requires from the
time kernel started. The unprepared_time is then updated every time
the panel is suspended in panel_simple_suspend() too.

Fixes: e5e30dfcf3db ("drm: panel: simple: Defer unprepare delay till next prepare to shorten it")
Signed-off-by: Marek Vasut <marex@denx.de>
---
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: David Airlie <airlied@gmail.com>
Cc: Douglas Anderson <dianders@chromium.org>
Cc: Neil Armstrong <neil.armstrong@linaro.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: dri-devel@lists.freedesktop.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 d3238088b7f80..37afed67fea7e 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -567,6 +567,7 @@ static int panel_simple_probe(struct device *dev, const struct panel_desc *desc)
 
 	panel->enabled = false;
 	panel->prepared_time = 0;
+	panel->unprepared_time = ktime_get_boottime();
 	panel->desc = desc;
 
 	panel->supply = devm_regulator_get(dev, "power");
-- 
2.40.1


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

end of thread, other threads:[~2023-07-31 21:54 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-09 13:52 [PATCH] drm/panel: simple: Initialize unprepared_time in probe Marek Vasut
2023-07-09 15:08 ` Sam Ravnborg
2023-07-09 16:19   ` Marek Vasut
2023-07-18 14:17 ` Doug Anderson
2023-07-18 15:36   ` Marek Vasut
2023-07-18 16:15     ` Doug Anderson
2023-07-18 17:37       ` Marek Vasut
2023-07-18 19:33         ` Doug Anderson
2023-07-23 22:47           ` Marek Vasut
2023-07-24 13:49             ` Doug Anderson
2023-07-31 18:03               ` Marek Vasut
2023-07-31 19:50                 ` Doug Anderson
2023-07-31 21:15                   ` Marek Vasut
2023-07-31 21:34                     ` Doug Anderson
2023-07-31 21:53                       ` Marek Vasut

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).