All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/3] drm/i915: Decouple the stuck pageflip on modeset
Date: Tue, 10 Jun 2014 14:29:25 +0300	[thread overview]
Message-ID: <20140610112925.GY27580@intel.com> (raw)
In-Reply-To: <1402394642-6263-2-git-send-email-chris@chris-wilson.co.uk>

On Tue, Jun 10, 2014 at 11:04:01AM +0100, Chris Wilson wrote:
> If we successfully confuse the hardware, and cause it to drop a queued
> pageflip, we wait for 60s and issue a warning before continuing on with
> the modeset. However, this leaves the pending pageflip still stuck
> indefinitely. Pretend to userspace that it does complete, and let us
> start afresh following the modeset.
> 
> v2: Rebase after refactor
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>

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

still stands.

> ---
>  drivers/gpu/drm/i915/intel_display.c |   16 +++++++++++++---
>  1 file changed, 13 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index b87b4ce..9ecc6bf 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -3363,9 +3363,19 @@ void intel_crtc_wait_for_pending_flips(struct drm_crtc *crtc)
>  
>  	WARN_ON(waitqueue_active(&dev_priv->pending_flip_queue));
>  
> -	WARN_ON(wait_event_timeout(dev_priv->pending_flip_queue,
> -				   !intel_crtc_has_pending_flip(crtc),
> -				   60*HZ) == 0);
> +	if (WARN_ON(wait_event_timeout(dev_priv->pending_flip_queue,
> +				       !intel_crtc_has_pending_flip(crtc),
> +				       60*HZ) == 0)) {
> +		struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
> +		unsigned long flags;
> +
> +		spin_lock_irqsave(&dev->event_lock, flags);
> +		if (intel_crtc->unpin_work) {
> +			WARN_ONCE(1, "Removing stuck page flip\n");
> +			page_flip_completed(intel_crtc);
> +		}
> +		spin_unlock_irqrestore(&dev->event_lock, flags);
> +	}
>  
>  	mutex_lock(&dev->struct_mutex);
>  	intel_finish_fb(crtc->primary->fb);
> -- 
> 1.7.9.5

-- 
Ville Syrjälä
Intel OTC

  reply	other threads:[~2014-06-10 11:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-10 10:04 [PATCH 1/3] drm/i915: Check for a stalled page flip after each vblank Chris Wilson
2014-06-10 10:04 ` [PATCH 2/3] drm/i915: Decouple the stuck pageflip on modeset Chris Wilson
2014-06-10 11:29   ` Ville Syrjälä [this message]
2014-06-10 10:04 ` [PATCH 3/3] drm/i915: Boost GPU frequency if we detect outstanding pageflips Chris Wilson
2014-06-10 11:41   ` Ville Syrjälä
2014-06-10 11:49     ` Chris Wilson
2014-06-10 12:32   ` Ville Syrjälä
2014-06-10 11:25 ` [PATCH 1/3] drm/i915: Check for a stalled page flip after each vblank Ville Syrjälä
2014-06-10 11:33   ` Chris Wilson
2014-06-10 11:47     ` Ville Syrjälä
2014-06-10 13:26       ` Daniel Vetter
  -- strict thread matches above, loose matches on Subject: below --
2014-06-10 12:46 Chris Wilson
2014-06-10 12:46 ` [PATCH 2/3] drm/i915: Decouple the stuck pageflip on modeset Chris Wilson
2014-06-17 21:33   ` Daniel Vetter
2014-05-30 16:16 [PATCH 1/3] drm/i915: Check for a stalled page flip after each vblank Chris Wilson
2014-05-30 16:16 ` [PATCH 2/3] drm/i915: Decouple the stuck pageflip on modeset Chris Wilson
2014-06-09 13:09   ` Ville Syrjälä

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=20140610112925.GY27580@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --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 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.