[PATCH] drm/panel: simple: Initialize unprepared_time in probe
Marek Vasut
marex at denx.de
Sun Jul 9 13:52:31 UTC 2023
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 at denx.de>
---
Cc: Daniel Vetter <daniel at ffwll.ch>
Cc: David Airlie <airlied at gmail.com>
Cc: Douglas Anderson <dianders at chromium.org>
Cc: Neil Armstrong <neil.armstrong at linaro.org>
Cc: Sam Ravnborg <sam at ravnborg.org>
Cc: dri-devel at 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
More information about the dri-devel
mailing list