diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /drivers/video/controlfb.h |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'drivers/video/controlfb.h')
-rw-r--r-- | drivers/video/controlfb.h | 145 |
1 files changed, 145 insertions, 0 deletions
diff --git a/drivers/video/controlfb.h b/drivers/video/controlfb.h new file mode 100644 index 000000000000..6026c60fc100 --- /dev/null +++ b/drivers/video/controlfb.h | |||
@@ -0,0 +1,145 @@ | |||
1 | /* | ||
2 | * controlfb_hw.h: Constants of all sorts for controlfb | ||
3 | * | ||
4 | * Copyright (C) 1998 Daniel Jacobowitz <dan@debian.org> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the License, or (at your option) any later version. | ||
10 | * | ||
11 | * Based on an awful lot of code, including: | ||
12 | * | ||
13 | * control.c: Console support for PowerMac "control" display adaptor. | ||
14 | * Copyright (C) 1996 Paul Mackerras. | ||
15 | * | ||
16 | * The so far unpublished platinumfb.c | ||
17 | * Copyright (C) 1998 Jon Howell | ||
18 | */ | ||
19 | |||
20 | /* | ||
21 | * Structure of the registers for the RADACAL colormap device. | ||
22 | */ | ||
23 | struct cmap_regs { | ||
24 | unsigned char addr; /* index for both cmap and misc registers */ | ||
25 | char pad1[15]; | ||
26 | unsigned char crsr; /* cursor palette */ | ||
27 | char pad2[15]; | ||
28 | unsigned char dat; /* RADACAL misc register data */ | ||
29 | char pad3[15]; | ||
30 | unsigned char lut; /* cmap data */ | ||
31 | char pad4[15]; | ||
32 | }; | ||
33 | |||
34 | /* | ||
35 | * Structure of the registers for the "control" display adaptor. | ||
36 | */ | ||
37 | #define PAD(x) char x[12] | ||
38 | |||
39 | struct preg { /* padded register */ | ||
40 | unsigned r; | ||
41 | char pad[12]; | ||
42 | }; | ||
43 | |||
44 | struct control_regs { | ||
45 | struct preg vcount; /* vertical counter */ | ||
46 | /* Vertical parameters are in units of 1/2 scan line */ | ||
47 | struct preg vswin; /* between vsblank and vssync */ | ||
48 | struct preg vsblank; /* vert start blank */ | ||
49 | struct preg veblank; /* vert end blank (display start) */ | ||
50 | struct preg vewin; /* between vesync and veblank */ | ||
51 | struct preg vesync; /* vert end sync */ | ||
52 | struct preg vssync; /* vert start sync */ | ||
53 | struct preg vperiod; /* vert period */ | ||
54 | struct preg piped; /* pipe delay hardware cursor */ | ||
55 | /* Horizontal params are in units of 2 pixels */ | ||
56 | struct preg hperiod; /* horiz period - 2 */ | ||
57 | struct preg hsblank; /* horiz start blank */ | ||
58 | struct preg heblank; /* horiz end blank */ | ||
59 | struct preg hesync; /* horiz end sync */ | ||
60 | struct preg hssync; /* horiz start sync */ | ||
61 | struct preg heq; /* half horiz sync len */ | ||
62 | struct preg hlfln; /* half horiz period */ | ||
63 | struct preg hserr; /* horiz period - horiz sync len */ | ||
64 | struct preg cnttst; | ||
65 | struct preg ctrl; /* display control */ | ||
66 | struct preg start_addr; /* start address: 5 lsbs zero */ | ||
67 | struct preg pitch; /* addrs diff between scan lines */ | ||
68 | struct preg mon_sense; /* monitor sense bits */ | ||
69 | struct preg vram_attr; /* enable vram banks */ | ||
70 | struct preg mode; | ||
71 | struct preg rfrcnt; /* refresh count */ | ||
72 | struct preg intr_ena; /* interrupt enable */ | ||
73 | struct preg intr_stat; /* interrupt status */ | ||
74 | struct preg res[5]; | ||
75 | }; | ||
76 | |||
77 | struct control_regints { | ||
78 | /* Vertical parameters are in units of 1/2 scan line */ | ||
79 | unsigned vswin; /* between vsblank and vssync */ | ||
80 | unsigned vsblank; /* vert start blank */ | ||
81 | unsigned veblank; /* vert end blank (display start) */ | ||
82 | unsigned vewin; /* between vesync and veblank */ | ||
83 | unsigned vesync; /* vert end sync */ | ||
84 | unsigned vssync; /* vert start sync */ | ||
85 | unsigned vperiod; /* vert period */ | ||
86 | unsigned piped; /* pipe delay hardware cursor */ | ||
87 | /* Horizontal params are in units of 2 pixels */ | ||
88 | /* Except, apparently, for hres > 1024 (or == 1280?) */ | ||
89 | unsigned hperiod; /* horiz period - 2 */ | ||
90 | unsigned hsblank; /* horiz start blank */ | ||
91 | unsigned heblank; /* horiz end blank */ | ||
92 | unsigned hesync; /* horiz end sync */ | ||
93 | unsigned hssync; /* horiz start sync */ | ||
94 | unsigned heq; /* half horiz sync len */ | ||
95 | unsigned hlfln; /* half horiz period */ | ||
96 | unsigned hserr; /* horiz period - horiz sync len */ | ||
97 | }; | ||
98 | |||
99 | /* | ||
100 | * Dot clock rate is | ||
101 | * 3.9064MHz * 2**clock_params[2] * clock_params[1] / clock_params[0]. | ||
102 | */ | ||
103 | struct control_regvals { | ||
104 | unsigned regs[16]; /* for vswin .. hserr */ | ||
105 | unsigned char mode; | ||
106 | unsigned char radacal_ctrl; | ||
107 | unsigned char clock_params[3]; | ||
108 | }; | ||
109 | |||
110 | #define CTRLFB_OFF 16 /* position of pixel 0 in frame buffer */ | ||
111 | |||
112 | |||
113 | /* | ||
114 | * Best cmode supported by control | ||
115 | */ | ||
116 | struct max_cmodes { | ||
117 | int m[2]; /* 0: 2MB vram, 1: 4MB vram */ | ||
118 | }; | ||
119 | |||
120 | /* | ||
121 | * Video modes supported by macmodes.c | ||
122 | */ | ||
123 | static struct max_cmodes control_mac_modes[] = { | ||
124 | {{-1,-1}}, /* 512x384, 60Hz interlaced (NTSC) */ | ||
125 | {{-1,-1}}, /* 512x384, 60Hz */ | ||
126 | {{-1,-1}}, /* 640x480, 50Hz interlaced (PAL) */ | ||
127 | {{-1,-1}}, /* 640x480, 60Hz interlaced (NTSC) */ | ||
128 | {{ 2, 2}}, /* 640x480, 60Hz (VGA) */ | ||
129 | {{ 2, 2}}, /* 640x480, 67Hz */ | ||
130 | {{-1,-1}}, /* 640x870, 75Hz (portrait) */ | ||
131 | {{-1,-1}}, /* 768x576, 50Hz (PAL full frame) */ | ||
132 | {{ 2, 2}}, /* 800x600, 56Hz */ | ||
133 | {{ 2, 2}}, /* 800x600, 60Hz */ | ||
134 | {{ 2, 2}}, /* 800x600, 72Hz */ | ||
135 | {{ 2, 2}}, /* 800x600, 75Hz */ | ||
136 | {{ 1, 2}}, /* 832x624, 75Hz */ | ||
137 | {{ 1, 2}}, /* 1024x768, 60Hz */ | ||
138 | {{ 1, 2}}, /* 1024x768, 70Hz (or 72Hz?) */ | ||
139 | {{ 1, 2}}, /* 1024x768, 75Hz (VESA) */ | ||
140 | {{ 1, 2}}, /* 1024x768, 75Hz */ | ||
141 | {{ 1, 2}}, /* 1152x870, 75Hz */ | ||
142 | {{ 0, 1}}, /* 1280x960, 75Hz */ | ||
143 | {{ 0, 1}}, /* 1280x1024, 75Hz */ | ||
144 | }; | ||
145 | |||