dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Sean Paul <seanpaul@chromium.org>,
	Sam Ravnborg <sam@ravnborg.org>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/atomic-helper: Bump vblank timeout to 100 ms
Date: Tue, 30 Apr 2019 13:44:19 +0300	[thread overview]
Message-ID: <20190430104419.GD24299@intel.com> (raw)
In-Reply-To: <20190430093746.26485-1-linus.walleij@linaro.org>

On Tue, Apr 30, 2019 at 11:37:46AM +0200, Linus Walleij wrote:
> The 50 ms default timeout waiting for vblanks is too small
> for the first vblank from the ST-Ericsson MCDE display
> controller over DSI. Presumably this is because the DSI
> display is command-mode only and the state machine will
> take some time setting up its state for the first display
> update, and we hit a timeout. 100 ms makes it pass without
> problems.
> 
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> After a quite prolonged hunting for the cause of missed
> vblanks in the MCDE driver I finally realized it timed
> out because it was simply taking some time on the first
> vblank. 50 ms makes sense on 60Hz monitors for sure,
> but an embedded DSI state machine can be slow, as it
> turns out.
> 
> Tell me if this should be a per-driver variable and I
> will think of something.
> ---
>  drivers/gpu/drm/drm_atomic_helper.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> index 40ac19848034..f0aa7b195d79 100644
> --- a/drivers/gpu/drm/drm_atomic_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_helper.c
> @@ -1424,7 +1424,7 @@ drm_atomic_helper_wait_for_vblanks(struct drm_device *dev,
>  		ret = wait_event_timeout(dev->vblank[i].queue,
>  				old_state->crtcs[i].last_vblank_count !=
>  					drm_crtc_vblank_count(crtc),
> -				msecs_to_jiffies(50));
> +				msecs_to_jiffies(100));

50ms is pretty tight for 24Hz as well. I suppose we could make this
depend on the expected frame/field duration, but it's generally
indicative of a programming error of some sort, so as long as it's
long enough I think we're good.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

>  
>  		WARN(!ret, "[CRTC:%d:%s] vblank wait timed out\n",
>  		     crtc->base.id, crtc->name);
> -- 
> 2.20.1

-- 
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2019-04-30 10:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-30  9:37 [PATCH] drm/atomic-helper: Bump vblank timeout to 100 ms Linus Walleij
2019-04-30 10:44 ` Ville Syrjälä [this message]
2019-04-30 14:43   ` Daniel Vetter

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=20190430104419.GD24299@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linus.walleij@linaro.org \
    --cc=sam@ravnborg.org \
    --cc=seanpaul@chromium.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 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).