All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Marek Vasut <marex@denx.de>
Cc: Neil Armstrong <neil.armstrong@linaro.org>,
	dri-devel@lists.freedesktop.org,
	Douglas Anderson <dianders@chromium.org>
Subject: Re: [PATCH] drm/panel: simple: Initialize unprepared_time in probe
Date: Sun, 9 Jul 2023 17:08:24 +0200	[thread overview]
Message-ID: <20230709150824.GA697428@ravnborg.org> (raw)
In-Reply-To: <20230709135231.449636-1-marex@denx.de>

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@denx.de>

Looks OK,

Reviewed-by: Sam Ravnborg <sam@ravnborg.org>

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@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

  reply	other threads:[~2023-07-09 15:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-09 13:52 [PATCH] drm/panel: simple: Initialize unprepared_time in probe Marek Vasut
2023-07-09 15:08 ` Sam Ravnborg [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230709150824.GA697428@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=dianders@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=marex@denx.de \
    --cc=neil.armstrong@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.