public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/i915: Don't die in wait_for_pending_flips
Date: Mon, 19 May 2014 08:06:06 -0700	[thread overview]
Message-ID: <20140519080606.19afa359@jbarnes-desktop> (raw)
In-Reply-To: <1400508575-8041-1-git-send-email-daniel.vetter@ffwll.ch>

On Mon, 19 May 2014 16:09:35 +0200
Daniel Vetter <daniel.vetter@ffwll.ch> wrote:

> We can apperently miss them, but breaking the entire driver hampers
> testing. So bail out after one minute, our customerary "this is a lost
> cause" timeout.
> 
> References: https://bugs.freedesktop.org/show_bug.cgi?id=78383
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 0f8f9bcb3012..6eca24d8b282 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -3284,8 +3284,9 @@ static void intel_crtc_wait_for_pending_flips(struct drm_crtc *crtc)
>  
>  	WARN_ON(waitqueue_active(&dev_priv->pending_flip_queue));
>  
> -	wait_event(dev_priv->pending_flip_queue,
> -		   !intel_crtc_has_pending_flip(crtc));
> +	WARN_ON(wait_event_timeout(dev_priv->pending_flip_queue,
> +				   !intel_crtc_has_pending_flip(crtc),
> +				   60*HZ) == 0);
>  
>  	mutex_lock(&dev->struct_mutex);
>  	intel_finish_fb(crtc->primary->fb);

Updating our page flip ioctl man page (hah!) with the timeout info
would be good, in case people like Mario queue flips for after lunch. :)

-- 
Jesse Barnes, Intel Open Source Technology Center

  reply	other threads:[~2014-05-19 15:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-19 14:09 [PATCH] drm/i915: Don't die in wait_for_pending_flips Daniel Vetter
2014-05-19 15:06 ` Jesse Barnes [this message]
2014-05-19 15:18   ` Daniel Vetter
2014-05-19 15:35     ` Jesse Barnes
2014-05-19 15:41       ` Chris Wilson
2014-05-19 15:52         ` 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=20140519080606.19afa359@jbarnes-desktop \
    --to=jbarnes@virtuousgeek.org \
    --cc=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.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