On Wed, 17 Jul 2002, Daniel Sheltraw wrote:
> I have a general VGA question. I see from Ferraro\\\'s book that
> the legacy port 0x3C2 (bit 7) reports on whether a vertical
> retrace interrupt has occured. Is this bit cleared after reading
> it so that it can be used properly in the case of shared interrupts?

VGADOC4B has this to say:

3C2h (R):  Input Status #0 Register
bit   4  Status of the switch selected by the Miscellaneous Output
         Register 3C2h bit 2-3. Switch high if set.
      7  (EGA Only ??) If set IRQ 2 has happened due to Vertical Retrace.
         Should be cleared by IRQ 2 interrupt routine by clearing port 3d4h
         index 11h bit 4.

> Do most cards support this port and bit?

Those that support interrupts, probably, but you shouldn't use it:

1) In a multi-headed system, only one of the graphics cards, 
if any, will have legacy ports enabled.

2) Most other cards have other bits in proprietary registers that 
give better information, like the actual raster position and whether any GPU
interrupts are also pending, so drivers should use the registers for their
particular card.

So, unless the card in question has no other bit in its proprietary set
for this, you should steer clear of IOports.

BTW, waiting for retrace/blank is actually a pretty complicated real-time
issue.  See the documentation directory of a recent copy of LibGGIMISC
for the file retrace.txt for some good notes.  I find the facts
that neither the Linux fb drivers aside from Matrox, nor the various 
X extensions which all offer APIs for retrace detection have 
adequate actual support on the driver end (for example in XF86DGA's 
case those few drivers that actually do support retrace do so by very
primitive busy-polling mechanisms) very disturbing and wish
you luck in any attempts to improve the situation.  (I cannot speak 
as to BSD's support for this but I haven't heard my BSD using 
cohorts extoling the virtues of BSD's video support so I'm 
guessing not much there either.)

--
Brian

_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert

Reply via email to