On Fri, 15 May 2009 12:16:14 -0700
Jesse Barnes <jbar...@virtuousgeek.org> wrote:

> On Thu, 14 May 2009 23:04:51 -0400
> Kristian Høgsberg <k...@bitplanet.net> wrote:
> 
> > From: Kristian Høgsberg <k...@redhat.com>
> > 
> > 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 initial work and suggestions from
> >     Jesse Barnes <jbar...@virtuousgeek.org> and
> >     Jakob Bornecrantz <wallbra...@gmail.com>.
> > 
> > Signed-off-by: Kristian Høgsberg <k...@redhat.com>
> > ---
> > 
> > This update addresses a few of the issues brought up by Jakob:
> > 
> >     - the u64 user_data field is moved the page flip event
> >       from the drm header struct.
> > 
> >     - the implementation of the page flip ioctl is moved to
> >       drm_crtc.h instead of drm_crtc_helper.c
> > 
> > and cleanup in drm_release() is simpler and should clean up
> > everything (it was missing an unpin before, now we just use the
> > same code as the normal drm_read() case).
> > 
> > What's still missing is:
> > 
> >     - don't block on setting the domain in set_base
> > 
> >     - the synchronous version of the ioctl; userspace can
> >       just use the ioctl followed by a read loop.
> 
> Here's an update that makes the set_base async using a new
> work_struct.  I'll push the libdrm changes into the kms-pageflip
> branch now too.
> 
> The set_base thing is really ugly; apparently on x86 there's a
> set_base macro in the global namespace now, gross.  Hopefully that
> will be fixed before this is pushed upstream.

Just realized this one has a potential deadlock in the teardown path.
We should probably flush the work queue *after* the crtc has been
removed from the list, but w/o holding the struct mutex, since the
async_work func needs that.

Doesn't look like I'll have much more time today to work on the
userspace side though...

-- 
Jesse Barnes, Intel Open Source Technology Center

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to