Re: realtime use of X Windows / svgalib

Search this archive.

From: Matan Ziv-Av (matan@svgalib.org)
Date: Thu 04 Jan 2001 - 18:26:59 IST


On Thu, 4 Jan 2001, Tomas Sieger wrote:

> Hello,
> i write hard realtime application (under Linux) in which i need
> to use some graphics. No problem with OS load - i plan to use RtLinux.
> The problem is that i must ensure that graphics will appear at exact
> times (on order of miliseconds or hunderds of microseconds).

You can't do that with CRT. Even if you set a mode that has 200Hz
refresh rate, it means that it might take up to 5ms from the time you
set the video memory to the time it displays on the monitor. I don't
know about modern display technologies (LCD, TFT), but I believe they
also have this scan latency issue.

> The question is concentrated on graphics libraries throughput.
> Now i study power of X Windows and svgalib. It is clear that svgalib
> is designed in a completely different way, so svgalib reaction time
> could be much less than X Windows' one.
> I wonder if it is possible to tell how much time does svgalib / X
> Windows spend processing graphics (i assume no OS load - no other
> apps, no swapping etc., and one station only - no X Windows network
> connection). On X Windows there will be probably need to 'flush' or
> 'sync' the screen due to buffering.
>
> Does exist general answer? Specially on i86 platform? Does it depends
> on graphics cards / XWin/svgalib versions?

On typical svgalib use, all svgalib does is set the correct mode, which
might take a few miliseconds, but needs only be done once. After that,
your program draws by writing directly to the video memory, so the
speed/latency of that depends on your program, not svgalib's. 
 
> Can X Windows / svgalib wait for vertical retrace?
> (there issuch function in svgalib - does it work on all platforms /
> graphic cards?; but i'm afraid X Windows are not designed for such use).

Svgalib has such a function which works on all vga compatible graphics
cards. It is done by busy waiting. Most new cards can probably do this
with an interrupt, but no svgalib drvier supports this currently.


-- 
Matan Ziv-Av.                         matan@svgalib.org


------------------------------------------------------------------
Unsubscribe:  To:   listbot@svgalib.org
              Body: unsubscribe linux-svgalib


This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:23 IST