From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 1/2] drm/i915: time out of load detect busy-waits
Date: Wed, 25 Apr 2012 21:26:50 +0200 [thread overview]
Message-ID: <20120425192650.GG5079@phenom.ffwll.local> (raw)
In-Reply-To: <1335374112_49610@CP5-2952>
On Wed, Apr 25, 2012 at 06:14:37PM +0100, Chris Wilson wrote:
> On Fri, 20 Apr 2012 21:03:35 +0200, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> > If we try to do that and the scanlines just wouldn't advance, we
> > busy-hang the machine holding the modeset mutex. Not great for
> > debugging.
> >
> > References: https://bugzilla.kernel.org/show_bug.cgi?id=43020
> > Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>
> Reviewer hangs head in shame:
>
> > + if (wait_for(I915_READ(pipe_dsl_reg) >= vactive, 1000))
> > + DRM_ERROR("timed out waiting for vactive in "
> > + "load_detect, scanline: %u\n",
> > + I915_READ(pipe_dsl_reg));
> > + if (wait_for((dsl = I915_READ(pipe_dsl_reg)) <= vsample, 1000))
> > + DRM_ERROR("timed out waiting for vsample in "
> > + "load_detect, scanline: %u\n",
> > + I915_READ(pipe_dsl_reg));
>
> wait_for() catches us out everytime we convert and existing while(),
> because the predicate is when it stops. Perhaps if we had a wait_until,
> but anyway the fix here is:
>
> if (wait_for(I915_READ(pipe_dsl_reg) < vactive, 1000))
> ...
> if (wait_for((dsl = I915_READ(pipe_dsl_reg)) > vsample, 1000))
> ...
dinq rectified, it never happened. Thanks for catching this.
/me hides in the shame corner
-Daniel
--
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48
next prev parent reply other threads:[~2012-04-25 19:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-20 19:03 [PATCH 1/2] drm/i915: time out of load detect busy-waits Daniel Vetter
2012-04-20 19:03 ` [PATCH 2/2] drm/i915: fixup load-detect on enabled, but not active pipe Daniel Vetter
2012-04-20 19:44 ` Chris Wilson
2012-04-22 9:17 ` Daniel Vetter
2012-04-20 19:25 ` [PATCH] drm/fixup: fixup tv load-detect on enabled but not active crtc Daniel Vetter
2012-04-20 19:42 ` [PATCH 1/2] drm/i915: time out of load detect busy-waits Chris Wilson
2012-04-25 17:14 ` Chris Wilson
2012-04-25 19:26 ` Daniel Vetter [this message]
2012-04-28 21:00 ` Chris Wilson
2012-05-01 17:26 ` 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=20120425192650.GG5079@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