On Mon, 17 Aug 2009 22:22:34 +0200
Thomas Hellström <tho...@shipmail.org> wrote:

> Kristian Høgsberg wrote:
> > This patch adds a vblank synced pageflip ioctl for to the
> > modesetting family of ioctls.  The ioctl takes a crtc and an fb and
> > schedules a pageflip to the new fb at the next coming vertical
> > blank event.  This feature lets userspace implement tear-free
> > updating of the screen contents with hw-guaranteed low latency page
> > flipping.
> >
> > The ioctl is asynchronous in that it returns immediately and then
> > later notifies the client by making an event available for reading
> > on the drm fd. This lets applications add the drm fd to their main
> > loop and handle other tasks while waiting for the flip to happen.
> > The event includes the time of the flip, the frame counter and a 64
> > bit opaque token provided by user space in the ioctl.
> >
> > Based on work and suggestions from
> >     Jesse Barnes <jbar...@virtuousgeek.org>,
> >     Jakob Bornecrantz <wallbra...@gmail.com>,
> >     Chris Wilson <ch...@chris-wilson.co.uk>
> >
> > Signed-off-by: Kristian Høgsberg <k...@redhat.com>
> > Signed-off-by: Jesse Barnes <jbar...@virtuousgeek.org>
> > ---
> >
> > Ok, another version of this patch.  This one has fixes to work with
> > radeon kms plus a missing list head init that would cause an oops
> > in the case where we schedule a flip before the previous one has
> > been queued.
> >
> > I'm now ready to propose this patch for the 2.6.32 merge window.
> >
> >   
> Hi!
> First a general question: There is some hardware (for example
> Unichromes and Chrome9) that can schedule
> page-flips in the command stream after optional vblank barriers. For 
> this kind of hardware the pageflip would be a matter of scheduling
> the flip and fence the old and new buffers.  No need for delayed
> unpins and explicit user-space notifications, although the workqueue
> could be handy to avoid command processing stalls in the vblank
> barriers. How would such a scheme fit into the framework below?

If you fence the flip, doesn't that mean you only unpin after it's
completed?  The initial version of this patch used a command stream
flip, but I still had to worry about pinning...

If you don't need the userspace notifications we could probably factor
that out; do you see any issues with the flip ioctl itself?  If not, we
can change things as needed if/when more drivers support it...

> A couple of years ago, any attempt to return anything else than 0
> from drm poll resulted in an X server error.
> http://freedesktop.org/bugzilla/show_bug.cgi?id=1505. The fix
> mentioned in the bug was actually to return 0 from drm poll, and a
> comment about this is still present in drm.git. The above breaks drm
> for old X servers and all drivers, which I think is against drm
> policy?

Ouch... I remember Kristian had some issues with this part, but I don't
think this was one of them.

-- 
Jesse Barnes, Intel Open Source Technology Center

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to