[Intel-gfx] [PATCH] i915: add page flipping ioctl
Chris Wilson
chris at chris-wilson.co.uk
Fri Feb 20 10:52:19 CET 2009
On Thu, 2009-02-19 at 16:43 -0800, Jesse Barnes wrote:
> On Thursday 19 February 2009 11:37:01 Chris Wilson wrote:
> > With a few additional suggestions by Jesse, I've managed to get
> > tear-free compositing working on i915. Here's the diff on top of the
> > original patch (though obviously this is just a suggestion, still need
> > to prevent multiple pending flips to the same plane and ensure that the
> > old buffer is eventually unpinned, and you might choose to drop the
> > mutex around the wait_for_vblank ;-):
>
> Yeah, looks pretty reasonable. Here's what I've been working with. It adds a
> couple of more changes (and slightly different cleanups) over your version:
> - added a seqno to wait for
> - wait for flip before queuing another
> but it's missing thew 915 changes you added (btw did I get the pitch wrong?
> or are you submitting a different value for your objects?).
No, you wrote "pitch = (stride / 8) * 8", I was halfway through
converting that into an -EINVAL guard as opposed to rounding down an
invalid stride.
> I added a new seqno since it's possible (even likely) that the next vblank
> won't actually reflect the flip, if the GPU is busy processing a large
> batchbuffer when the ring command goes in for example.
Yes, that might explain the rare tearing glitch I see.
> Also it might be a good idea to wait for any previous flip before queuing a
> new one. Anyway still tracking down some issues with the X side, but it seems
> like it's approaching readiness.
Give or take not checking for errors and not holding the mutex for long
enough. ;-)
-ickle
More information about the Intel-gfx
mailing list