Hi Marek. On Sun, Jul 09, 2023 at 03:52:31PM +0200, Marek Vasut wrote: > 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@xxxxxxx> Looks OK, Reviewed-by: Sam Ravnborg <sam@xxxxxxxxxxxx> It looks like prepared_time is not used anymore. Could you dig a little into this while you are in the waiting area. Sam > --- > Cc: Daniel Vetter <daniel@xxxxxxxx> > Cc: David Airlie <airlied@xxxxxxxxx> > Cc: Douglas Anderson <dianders@xxxxxxxxxxxx> > Cc: Neil Armstrong <neil.armstrong@xxxxxxxxxx> > Cc: Sam Ravnborg <sam@xxxxxxxxxxxx> > Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx > --- > 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