On Tue, 2009-01-06 at 10:41 -0800, Jesse Barnes wrote:
> This patch adds a sanity check to drmWaitVBlank to prevent hangs.  Since the
> server interrupts syscalls pretty frequently with SIGALM, we tend to restart
> syscalls when EINTR is returned.  That means when a vblank timeout happens,
> we probably won't catch it (it happens after 3s, and SIGALM happens every few
> ms), so we can fairly easily get stuck restarting the vblank wait ioctl if
> something fishy is going on (like vblank interrupts are disabled for some
> reason).
> 
> So this patch removes the top level restart code, pushing it into the vblank
> wait ioctl wrapper, while adding a timeout. 

Do you even need to touch drmIoctl()? Looks like drmWaitVBlank() will
never return EINTR anyway.

> If there are cases where more than 1s waits are desirable, we'd
> probably need to check the sequence numbers and come up with a more
> reasonable value, or add a new call that takes a timeout parameter.

I agree, 1s should be enough, otherwise let's add new API with a timeout
value.

The established error code for timeout is EBUSY, not ETIME, otherwise
this looks good to me.


-- 
Earthling Michel Dänzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer

------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to