Home | History | Annotate | Download | only in gfx

Lines Matching refs:vga

27  * This file contains routines to set modes using the VGA registers.  
47 /* MODE TABLES FOR VGA REGISTERS */
275 * This routine looks for the VGA PCI header. It checks to see that bit 1
281 * command register and have the proper effect (enable trapping of VGA).
282 * Otherwise, if we enable VGA via the PCI header, trapping really won't be
283 * enabled and the VGA register writes will go out to the external card.
326 * Bit 0: Enable VGA IO
327 * Bit 1: Enable VGA memory
361 * This routine sets the standard VGA sequencer, graphics controller, and
365 * the "gfx_vga_restore" routine. Most OSs that use VGA to set modes save
366 * and restore the standard VGA registers themselves, which is why these
390 * This routine searches the VGA mode table for a match of the specified
391 * mode and then fills in the VGA structure with the associated VGA register
397 gfx_vga_mode(gfx_vga_struct * vga, int xres, int yres, int bpp, int hz)
407 *vga = gfx_vga_modes[i];
419 vga->stdCRTCregs[0x13] = (unsigned char) pitch;
420 vga->extCRTCregs[0x05] = (unsigned char) ((pitch >> 8) & 0x03);
427 vga->extCRTCregs[0x06] = CRTC_BIT_16BPP | CRTC_BIT_555;
430 vga->extCRTCregs[0x06] = CRTC_BIT_16BPP;
433 vga->extCRTCregs[0x06] = 0;
445 * This routine updates the VGA regisers in the specified VGA structure for
450 gfx_vga_pitch(gfx_vga_struct * vga, unsigned short pitch)
453 vga->stdCRTCregs[0x13] = (unsigned char) pitch;
454 vga->extCRTCregs[0x05] = (unsigned char) ((pitch >> 8) & 0x03);
461 * This routine saves the state of the VGA registers into the specified
467 gfx_vga_save(gfx_vga_struct * vga, int flags)
480 vga->miscOutput = INB(0x3CC);
490 vga->stdCRTCregs[i] = INB(crtcdata);
501 vga->extCRTCregs[i] = INB(crtcdata);
511 * behave like standard VGA.
537 * This routine restores the state of the VGA registers from the specified
543 gfx_vga_restore(gfx_vga_struct * vga, int flags)
556 OUTB(0x3C2, vga->miscOutput);
571 OUTB(crtcdata, vga->stdCRTCregs[i]);
588 OUTB(crtcdata, vga->extCRTCregs[i]);
598 if (vga->extCRTCregs[0x03] & 1) {