[Intel-gfx] [RFC] DRI2 swapbuffers (yes yet again)

Jesse Barnes jbarnes at virtuousgeek.org
Thu Apr 30 00:09:33 CEST 2009


Ok, this set addresses all the shortcomings of the last set, and things
seem quite solid, aside from output detection on my test platform which
causes me to wait on flips from pipes with no outputs attached.  Note
that this meant changing the locking semantics for the set_pipe_base
call to avoid racing between the base update and getting a seqno for
the vblank wait.

Dave & Jakob suggested possibly making the ioctl KMS generic.  I think
this might be possible, but I'd appreciate review of it to make sure
the interfaces look ok, since I'd like to push this out soon (this week
if possible).

This one still uses the setBuffers call, but I kind of like it now that
I've worked with it more.  It makes the DRI driver a little cleaner
(separating actual buffer acquisition from renderbuffer updates), but
I'm still open to better ways of doing it that don't involve a bunch
more round trips.

Overall, this patchset adds a new ioctl to the kernel,
DRM_I915_GEM_PAGE_FLIP, with two flags, I915_PAGE_FLIP_WAIT and
I915_PAGE_FLIP_ASYNC.  PAGE_FLIP_WAIT will block the return of the
ioctl until the flip completes (useful for throttling perhaps), while
PAGE_FLIP_ASYNC queues the flip immediately and doesn't wait for any
outstanding flips to finish.

The ioctl is exposed in libdrm as drm_intel_flip_bufs().  New DRI2
protocol is added to send swapbuffers requests to the server from DRI
clients.  The server and AIGLX clients call into the driver directly,
and update client buffers with the returned value.

I'm still working through mutlihead issues on the kernel side; the
flip waits should wait for *both* vblank events before completing the
flip.  But other than that, I'm pretty happy with things.

I'm attaching them this time because I don't want to send a ton of
mail again.

-- 
Jesse Barnes, Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dri2proto-dri2-swapbuffers-6.patch
Type: text/x-patch
Size: 2875 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20090429/cafcf2de/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libdrm-dri2-swapbuffers-4.patch
Type: text/x-patch
Size: 2346 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20090429/cafcf2de/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: i915-dri2-swapbuffers-13.patch
Type: text/x-patch
Size: 17435 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20090429/cafcf2de/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mesa-dri2-swapbuffers-13.patch
Type: text/x-patch
Size: 19341 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20090429/cafcf2de/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: i830-dri2-swapbuffers-15.patch
Type: text/x-patch
Size: 10696 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20090429/cafcf2de/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xserver-dri2-swapbuffers-15.patch
Type: text/x-patch
Size: 7622 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20090429/cafcf2de/attachment-0005.bin>


More information about the Intel-gfx mailing list