Lines Matching refs:vga
5 * This file contains routines to set modes using the VGA registers.
148 /* MODE TABLES FOR VGA REGISTERS */
300 * This routine looks for the VGA PCI header. It checks to see that bit 1
306 * command register and have the proper effect (enable trapping of VGA).
307 * Otherwise, if we enable VGA via the PCI header, trapping really won't be
308 * enabled and the VGA register writes will go out to the external card.
351 * Bit 0: Enable VGA IO
352 * Bit 1: Enable VGA memory
386 * This routine sets the standard VGA sequencer, graphics controller, and
390 * the "gfx_vga_restore" routine. Most OSs that use VGA to set modes save
391 * and restore the standard VGA registers themselves, which is why these
415 * This routine searches the VGA mode table for a match of the specified
416 * mode and then fills in the VGA structure with the associated VGA register
422 gfx_vga_mode(gfx_vga_struct * vga, int xres, int yres, int bpp, int hz)
432 *vga = gfx_vga_modes[i];
444 vga->stdCRTCregs[0x13] = (unsigned char)pitch;
445 vga->extCRTCregs[0x05] = (unsigned char)((pitch >> 8) & 0x03);
452 vga->extCRTCregs[0x06] = CRTC_BIT_16BPP | CRTC_BIT_555;
455 vga->extCRTCregs[0x06] = CRTC_BIT_16BPP;
458 vga->extCRTCregs[0x06] = 0;
470 * This routine updates the VGA regisers in the specified VGA structure for
475 gfx_vga_pitch(gfx_vga_struct * vga, unsigned short pitch)
478 vga->stdCRTCregs[0x13] = (unsigned char)pitch;
479 vga->extCRTCregs[0x05] = (unsigned char)((pitch >> 8) & 0x03);
486 * This routine saves the state of the VGA registers into the specified
492 gfx_vga_save(gfx_vga_struct * vga, int flags)
505 vga->miscOutput = INB(0x3CC);
515 vga->stdCRTCregs[i] = INB(crtcdata);
526 vga->extCRTCregs[i] = INB(crtcdata);
536 * behave like standard VGA.
562 * This routine restores the state of the VGA registers from the specified
568 gfx_vga_restore(gfx_vga_struct * vga, int flags)
581 OUTB(0x3C2, vga->miscOutput);
596 OUTB(crtcdata, vga->stdCRTCregs[i]);
613 OUTB(crtcdata, vga->extCRTCregs[i]);
623 if (vga->extCRTCregs[0x03] & 1) {