From: Daniel Vetter <daniel@ffwll.ch>
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, 17 Jun 2014 23:33:02 +0200 [thread overview]
Message-ID: <20140617213302.GU5821@phenom.ffwll.local> (raw)
In-Reply-To: <1402404416-12127-2-git-send-email-chris@chris-wilson.co.uk>
On Tue, Jun 10, 2014 at 01:46:55PM +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>
Since I've shredded a few machines with this ...
Queued for -next, thanks for the patch.
-Daniel
> ---
> 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 ec166e41a27e..5261c145e633 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);
> --
> 2.0.0
>
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
next prev parent reply other threads:[~2014-06-17 21:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-10 12:46 [PATCH 1/3] drm/i915: Check for a stalled page flip after each vblank 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 [this message]
2014-06-10 12:46 ` [PATCH 3/3] drm/i915: Boost GPU frequency if we detect outstanding pageflips Chris Wilson
2014-06-17 21:16 ` Daniel Vetter
2014-06-10 13:46 ` [PATCH 1/3] drm/i915: Check for a stalled page flip after each vblank Ville Syrjälä
2014-06-11 10:47 ` [PATCH] " Chris Wilson
2014-06-24 12:44 ` Jani Nikula
2014-06-24 12:46 ` Chris Wilson
-- strict thread matches above, loose matches on Subject: below --
2014-06-10 10:04 [PATCH 1/3] " 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ä
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=20140617213302.GU5821@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox