Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 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
	if(cflag)
14
		return;
15
	/*
16
	 * Use of the on-chip hwgc requires using enhanced mode.
17
	 */
18
	if(vga->ctlr == 0 || (vga->ctlr->flag & Henhanced) == 0 || vga->mode->z < 8){
19
		cflag = 1;
20
		return;
21
	}
22
	resyncinit(vga, ctlr, Uenhanced, 0);
23
}
24
 
25
static void
26
load(Vga* vga, Ctlr* ctlr)
27
{
28
	ctlr->flag |= Fload;
29
 
30
	if(cflag)
31
		return;
32
	/*
33
	 * Use of the on-chip hwgc requires using enhanced mode.
34
	 */
35
	if(vga->ctlr == 0 || (vga->ctlr->flag & Uenhanced) == 0 || vga->mode->z < 8)
36
		cflag = 1;
37
}
38
 
39
Ctlr bt485hwgc = {
40
	"bt485hwgc",			/* name */
41
	0,				/* snarf */
42
	0,				/* options */
43
	0,				/* init */
44
	0,				/* load */
45
	0,				/* dump */
46
};
47
 
48
Ctlr rgb524hwgc = {
49
	"rgb524hwgc",			/* name */
50
	0,				/* snarf */
51
	0,				/* options */
52
	0,				/* init */
53
	0,				/* load */
54
	0,				/* dump */
55
};
56
 
57
Ctlr s3hwgc = {
58
	"s3hwgc",			/* name */
59
	0,				/* snarf */
60
	0,				/* options */
61
	init,				/* init */
62
	load,				/* load */
63
	0,				/* dump */
64
};
65
 
66
Ctlr tvp3020hwgc = {
67
	"tvp3020hwgc",			/* name */
68
	0,				/* snarf */
69
	0,				/* options */
70
	0,				/* init */
71
	0,				/* load */
72
	0,				/* dump */
73
};
74
 
75
Ctlr tvp3026hwgc = {
76
	"tvp3026hwgc",			/* name */
77
	0,				/* snarf */
78
	0,				/* options */
79
	0,				/* init */
80
	0,				/* load */
81
	0,				/* dump */
82
};