Why VGA needs IRQ?
Posted: Sun Feb 24, 2008 9:35 am
I am wondering why VGA needs IRQ.
Where is used from the OS?
Where is used from the OS?
The VGA can be programmed to trigger an IRQ when reaching the vertical sync.Osbios wrote:The VGA IRQ is used for vsync.
That's bull. Even on CGA this was possible (although causing horrible snowy artifacts).On old GFX Cards you can only access the video memory between screen refresh.
Maybe, but can you think of something a "refresh rate dependant" timer can do that can't be done better by something designed to be used as a timer (PIT, RTC, HPET, local APIC timer)?AJ wrote:OT: So, out of interest, can the (now seemingly redundant?) VGA IRQ be used as an additional timer, then - if you know you have a 60Hz refresh rate and weren't using the IRQ for anything else, say?
!-->Jef wrote:So actually in modern OSs not needed/used.
And for vsync even if you don't use it all the time.Brendan wrote:For modern video cards, most (all?) of them use bus mastering/DMA to transfer graphics data (and commands for the graphics accelerator) into the video card. In this case the IRQ is used for "transfer complete" and/or for "command queue empty".
Changing the refresh rate is part of the GFX driver. I don't know how VGA handles it but you can change it if you use VESA. At last if the Card supports the last VESA standard what is not the case on some (or all?) ATI Chips.Jef wrote:btw, how you change the refresh rate in PMode ?
VGA has two refresh rates, 60Hz for 480 line modes and 70Hz for 400 line modes.Osbios wrote:Changing the refresh rate is part of the GFX driver. I don't know how VGA handles it but you can change it if you use VESA.
I'd rather say, two clock sources. One's 25MHz and the others 28MHz. Divide them by the amount of pixels in a frame (including the blank sections) and you get the refresh rate. That means that you can change the clock and get 640x480 at 67MHz. You can also change the resolution and get frequencies from 40 - 80Hz for different resolutions. The key to success is however that the H and V frequencies stay within tolerance limits of the monitor. For old fixed-frequency VGA monitors, that is indeed 60 or 70 Hz.jal wrote:VGA has two refresh rates, 60Hz for 480 line modes and 70Hz for 400 line modes.Osbios wrote:Changing the refresh rate is part of the GFX driver. I don't know how VGA handles it but you can change it if you use VESA.
Yeah, that's the long (and more correct) version :).Combuster wrote:I'd rather say, two clock sources. One's 25MHz and the others 28MHz.jal wrote:VGA has two refresh rates, 60Hz for 480 line modes and 70Hz for 400 line modes.