From: Eric Anholt <eric@anholt.net>
To: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: don't queue flips during a flip pending event
Date: Thu, 01 Jul 2010 16:09:00 -0700 [thread overview]
Message-ID: <878w5uyf3n.fsf@pollan.anholt.net> (raw)
In-Reply-To: <20100503124030.2250fbf8@jbarnes-x201>
[-- Attachment #1.1: Type: text/plain, Size: 1761 bytes --]
On Mon, 3 May 2010 12:40:30 -0700, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> On Thu, 29 Apr 2010 15:52:36 -0700
> Eric Anholt <eric@anholt.net> wrote:
> > > + if (intel_crtc->plane)
> > > + flip_mask =
> > > I915_DISPLAY_PLANE_B_FLIP_PENDING_INTERRUPT;
> > > + else
> > > + flip_mask =
> > > I915_DISPLAY_PLANE_A_FLIP_PENDING_INTERRUPT; +
> > > + /* Wait for any previous flip to finish */
> > > + while (I915_READ(ISR) & flip_mask)
> > > + ;
> > > +
> >
> > I'm confused about how this patch works. It looks like there's a race
> > where the ISR bit could get set at this point after the loop checking
> > it, and you would lose. The whole thing seems very dubious -- why
> > does the state of the ISR at the time you queue a flip matter? I
> > could imagine there being an issue with the state of the ISR at the
> > point that a flip packet is processed, but this doesn't handle that
> > (seems like only throttling flips to avoid outstanding flips would)
>
> [We talked about this in person; this is for posterity]
>
> We have mutexes and spinlocks in place to make sure only one flip is
> queued at once, so checking the ISR should be safe here.
>
> The reason we need to check is that hw could have queued a previous
> flip, and we may even have completed the first half of it (due to the
> flip pending interrupt). But until the flip actually completes at
> vblank time, queuing another one will be "undefined" according to the
> docs. Turns out in this case "undefined" means hangs and other bad
> behavior.
>
> That said, I think this needs an Ironlake check too, since the bits
> have moved recently.
status update: taking this one off my todo list, since it needs to be
updated for ironlake
[-- Attachment #1.2: Type: application/pgp-signature, Size: 197 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2010-07-01 23:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20100405140831.00892ba7@jbarnes-piketon>
2010-04-29 22:52 ` [PATCH] drm/i915: don't queue flips during a flip pending event Eric Anholt
2010-05-03 19:40 ` Jesse Barnes
2010-07-01 23:09 ` Eric Anholt [this message]
2010-07-01 23:08 ` Jesse Barnes
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=878w5uyf3n.fsf@pollan.anholt.net \
--to=eric@anholt.net \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jbarnes@virtuousgeek.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.