]> git.lizzy.rs Git - plan9front.git/blob - sys/src/cmd/aux/vga/et4000hwgc.c
Import sources from 2011-03-30 iso image
[plan9front.git] / sys / src / cmd / aux / vga / et4000hwgc.c
1 #include <u.h>
2 #include <libc.h>
3 #include <bio.h>
4
5 #include "pci.h"
6 #include "vga.h"
7
8 static void
9 init(Vga* vga, Ctlr* ctlr)
10 {
11         ctlr->flag |= Finit;
12
13         /*
14          * Use of the hwgc requires
15          *      a W32 chip,
16          *      8-bits,
17          *      not 2x8-bit mode.
18          */
19         if(cflag)
20                 return;
21         if(vga->ctlr == 0 || strncmp(vga->ctlr->name, "et4000-w32", 10))
22                 cflag = 1;
23         if(vga->mode->z != 8 || (ctlr->flag & Upclk2x8))
24                 cflag = 1;
25 }
26
27 Ctlr et4000hwgc = {
28         "et4000hwgc",                   /* name */
29         0,                              /* snarf */
30         0,                              /* options */
31         init,                           /* init */
32         0,                              /* load */
33         0,                              /* dump */
34 };