accessing legacy(?) VGA input status register 1 on 945GM/xf86-video-intel
Theo.Veenker at let.uu.nl
Thu Sep 25 06:00:51 PDT 2008
I have an application that presents audio-visual stimuli to subjects. To
be able to precisely synchronize the audio and graphics the application
needs to know when a vsync occurs. My application (from 1994) doesn't yet use
libdrm. I'm using a real-time module which (among other things) monitors
the vretrace bit in the VGA input status register 1 at 0x3DA and signals
the application on each vsync event. It works fine on most graphics hardware.
Now I need to make this application work on a laptop with an Intel 945GM.
The vretrace bit at IO address 0x3DA doesn't work (under X) unless I connect
an external VGA display. Then it works, but it reflects the retrace of the
external monitor and not that of the laptop's LCD screen.
Since also drmWaitVBlank() didn't work for me on this system, I applied the
change hinted in http://lists.freedesktop.org/archives/xorg/2007-June/025166.html
to the xf86-video-intel driver (2.4.2). That makes drmWaitVBlank() work (but
only after I briefly run a GL application like glxgears first).
I understand the LCD screen is on pipe B and the VGA screen on pipe A.
Can I somehow swap current behaviour so that when I monitor IO address 0x3DA
I can detect vretraces for pipe B instead of for pipe A? That would save me
the trouble of hacking DRM into this legacy aplication.
More information about the xorg