fix various typos in comments, mainly s/pallete/palette/.diff -r1.7 -r1.8 src/sys/arch/atari/include/video.h
(andvar)
--- src/sys/arch/atari/include/video.h 2009/10/20 19:10:11 1.7
+++ src/sys/arch/atari/include/video.h 2022/07/03 11:30:48 1.8
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: video.h,v 1.7 2009/10/20 19:10:11 snj Exp $ */ | 1 | /* $NetBSD: video.h,v 1.8 2022/07/03 11:30:48 andvar Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1995 Leo Weppelman. | 4 | * Copyright (c) 1995 Leo Weppelman. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | 9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | 11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
@@ -102,27 +102,27 @@ struct video { | @@ -102,27 +102,27 @@ struct video { | |||
102 | 102 | |||
103 | /* values for vd_st_res: */ | 103 | /* values for vd_st_res: */ | |
104 | #define RES_LOW 0x00 /* 320x200, 16 colors */ | 104 | #define RES_LOW 0x00 /* 320x200, 16 colors */ | |
105 | #define RES_MID 0x01 /* 640x200, 4 colors */ | 105 | #define RES_MID 0x01 /* 640x200, 4 colors */ | |
106 | #define RES_HIGH 0x02 /* 640x400, monochrome */ | 106 | #define RES_HIGH 0x02 /* 640x400, monochrome */ | |
107 | 107 | |||
108 | /* masks for vd_tt_res: */ | 108 | /* masks for vd_tt_res: */ | |
109 | #define RES_STLOW 0x0000 /* 320x200, 16 colors */ | 109 | #define RES_STLOW 0x0000 /* 320x200, 16 colors */ | |
110 | #define RES_STMID 0x0100 /* 640x200, 4 colors */ | 110 | #define RES_STMID 0x0100 /* 640x200, 4 colors */ | |
111 | #define RES_STHIGH 0x0200 /* 640x400, monochrome */ | 111 | #define RES_STHIGH 0x0200 /* 640x400, monochrome */ | |
112 | #define RES_TTMID 0x0400 /* 640x480, 16 colors */ | 112 | #define RES_TTMID 0x0400 /* 640x480, 16 colors */ | |
113 | #define RES_TTHIGH 0x0600 /* 1280x960, monochrome */ | 113 | #define RES_TTHIGH 0x0600 /* 1280x960, monochrome */ | |
114 | #define RES_TTLOW 0x0700 /* 320x480, 256 colors */ | 114 | #define RES_TTLOW 0x0700 /* 320x480, 256 colors */ | |
115 | #define TT_PALLET 0x000f /* Pallette number */ | 115 | #define TT_PALLET 0x000f /* Palette number */ | |
116 | #define TT_HYMONO 0x8000 /* Hyper mono mode */ | 116 | #define TT_HYMONO 0x8000 /* Hyper mono mode */ | |
117 | #define TT_SHOLD 0x1000 /* Sample/hold mode */ | 117 | #define TT_SHOLD 0x1000 /* Sample/hold mode */ | |
118 | 118 | |||
119 | /* The falcon video modes */ | 119 | /* The falcon video modes */ | |
120 | #define RES_FALAUTO 0 /* Falcon resolution dedected at boot */ | 120 | #define RES_FALAUTO 0 /* Falcon resolution dedected at boot */ | |
121 | #define RES_VGA2 1 /* 640x480, 2 colors */ | 121 | #define RES_VGA2 1 /* 640x480, 2 colors */ | |
122 | #define RES_VGA4 2 /* 640x480, 4 colors */ | 122 | #define RES_VGA4 2 /* 640x480, 4 colors */ | |
123 | #define RES_VGA16 3 /* 640x480, 16 colors */ | 123 | #define RES_VGA16 3 /* 640x480, 16 colors */ | |
124 | #define RES_VGA256 4 /* 640x480, 256 colors */ | 124 | #define RES_VGA256 4 /* 640x480, 256 colors */ | |
125 | #define RES_DIRECT 5 /* 320x200, 65536 colors */ | 125 | #define RES_DIRECT 5 /* 320x200, 65536 colors */ | |
126 | #define RES_FAL_STLOW 6 /* 320x200, 16 colors */ | 126 | #define RES_FAL_STLOW 6 /* 320x200, 16 colors */ | |
127 | #define RES_FAL_STMID 7 /* 640x200, 4 colors */ | 127 | #define RES_FAL_STMID 7 /* 640x200, 4 colors */ | |
128 | #define RES_FAL_STHIGH 8 /* 640x400, 2 colors */ | 128 | #define RES_FAL_STHIGH 8 /* 640x400, 2 colors */ |
--- src/sys/arch/hp300/dev/sti_sgc.c 2021/08/07 16:18:53 1.6
+++ src/sys/arch/hp300/dev/sti_sgc.c 2022/07/03 11:30:48 1.7
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: sti_sgc.c,v 1.6 2021/08/07 16:18:53 thorpej Exp $ */ | 1 | /* $NetBSD: sti_sgc.c,v 1.7 2022/07/03 11:30:48 andvar Exp $ */ | |
2 | /* $OpenBSD: sti_sgc.c,v 1.14 2007/05/26 00:36:03 krw Exp $ */ | 2 | /* $OpenBSD: sti_sgc.c,v 1.14 2007/05/26 00:36:03 krw Exp $ */ | |
3 | 3 | |||
4 | /* | 4 | /* | |
5 | * Copyright (c) 2005, Miodrag Vallat | 5 | * Copyright (c) 2005, Miodrag Vallat | |
6 | * | 6 | * | |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | 9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | 11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
@@ -17,27 +17,27 @@ | @@ -17,27 +17,27 @@ | |||
17 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
19 | * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, | 19 | * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, | |
20 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
23 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | 23 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
24 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN | 24 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN | |
25 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 25 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
26 | * POSSIBILITY OF SUCH DAMAGE. | 26 | * POSSIBILITY OF SUCH DAMAGE. | |
27 | * | 27 | * | |
28 | */ | 28 | */ | |
29 | #include <sys/cdefs.h> | 29 | #include <sys/cdefs.h> | |
30 | __KERNEL_RCSID(0, "$NetBSD: sti_sgc.c,v 1.6 2021/08/07 16:18:53 thorpej Exp $"); | 30 | __KERNEL_RCSID(0, "$NetBSD: sti_sgc.c,v 1.7 2022/07/03 11:30:48 andvar Exp $"); | |
31 | 31 | |||
32 | #include <sys/param.h> | 32 | #include <sys/param.h> | |
33 | #include <sys/device.h> | 33 | #include <sys/device.h> | |
34 | #include <sys/bus.h> | 34 | #include <sys/bus.h> | |
35 | 35 | |||
36 | #include <uvm/uvm_extern.h> | 36 | #include <uvm/uvm_extern.h> | |
37 | 37 | |||
38 | #include <dev/wscons/wsconsio.h> | 38 | #include <dev/wscons/wsconsio.h> | |
39 | #include <dev/wscons/wsdisplayvar.h> | 39 | #include <dev/wscons/wsdisplayvar.h> | |
40 | 40 | |||
41 | #include <dev/ic/stireg.h> | 41 | #include <dev/ic/stireg.h> | |
42 | #include <dev/ic/stivar.h> | 42 | #include <dev/ic/stivar.h> | |
43 | 43 | |||
@@ -249,27 +249,27 @@ sti_sgc_probe(bus_space_tag_t iot, int s | @@ -249,27 +249,27 @@ sti_sgc_probe(bus_space_tag_t iot, int s | |||
249 | bus_space_handle_t ioh; | 249 | bus_space_handle_t ioh; | |
250 | int devtype; | 250 | int devtype; | |
251 | 251 | |||
252 | if (bus_space_map(iot, (bus_addr_t)sgc_slottopa(slot), | 252 | if (bus_space_map(iot, (bus_addr_t)sgc_slottopa(slot), | |
253 | PAGE_SIZE, 0, &ioh)) | 253 | PAGE_SIZE, 0, &ioh)) | |
254 | return 0; | 254 | return 0; | |
255 | 255 | |||
256 | devtype = bus_space_read_1(iot, ioh, 3); | 256 | devtype = bus_space_read_1(iot, ioh, 3); | |
257 | 257 | |||
258 | bus_space_unmap(iot, ioh, PAGE_SIZE); | 258 | bus_space_unmap(iot, ioh, PAGE_SIZE); | |
259 | 259 | |||
260 | /* | 260 | /* | |
261 | * This might not be reliable enough. On the other hand, non-STI | 261 | * This might not be reliable enough. On the other hand, non-STI | |
262 | * SGC cards will apparently not initialize in an hp300, to the | 262 | * SGC cards will apparently not initialize in the hp300, to the | |
263 | * point of not even answering bus probes (checked with an | 263 | * point of not even answering bus probes (checked with an | |
264 | * Harmony/FDDI SGC card). | 264 | * Harmony/FDDI SGC card). | |
265 | */ | 265 | */ | |
266 | if (devtype != STI_DEVTYPE1 && devtype != STI_DEVTYPE4) | 266 | if (devtype != STI_DEVTYPE1 && devtype != STI_DEVTYPE4) | |
267 | return 0; | 267 | return 0; | |
268 | 268 | |||
269 | return 1; | 269 | return 1; | |
270 | } | 270 | } | |
271 | 271 | |||
272 | static int | 272 | static int | |
273 | sti_evrx_putcmap(struct sti_screen *scr, u_int index, u_int count) | 273 | sti_evrx_putcmap(struct sti_screen *scr, u_int index, u_int count) | |
274 | { | 274 | { | |
275 | struct sti_rom *rom = scr->scr_rom; | 275 | struct sti_rom *rom = scr->scr_rom; | |
@@ -307,27 +307,27 @@ sti_evrx_resetramdac(struct sti_screen * | @@ -307,27 +307,27 @@ sti_evrx_resetramdac(struct sti_screen * | |||
307 | * Initialize the Bt458. When we write to control registers, | 307 | * Initialize the Bt458. When we write to control registers, | |
308 | * the address is not incremented automatically. So we specify | 308 | * the address is not incremented automatically. So we specify | |
309 | * it ourselves for each control register. | 309 | * it ourselves for each control register. | |
310 | */ | 310 | */ | |
311 | 311 | |||
312 | /* all planes will be read */ | 312 | /* all planes will be read */ | |
313 | bus_space_write_1(bst, bsh, EVRX_BT458_ADDR, 0x04); | 313 | bus_space_write_1(bst, bsh, EVRX_BT458_ADDR, 0x04); | |
314 | bus_space_write_1(bst, bsh, EVRX_BT458_CTRL, 0xff); | 314 | bus_space_write_1(bst, bsh, EVRX_BT458_CTRL, 0xff); | |
315 | 315 | |||
316 | /* all planes have non-blink */ | 316 | /* all planes have non-blink */ | |
317 | bus_space_write_1(bst, bsh, EVRX_BT458_ADDR, 0x05); | 317 | bus_space_write_1(bst, bsh, EVRX_BT458_ADDR, 0x05); | |
318 | bus_space_write_1(bst, bsh, EVRX_BT458_CTRL, 0x00); | 318 | bus_space_write_1(bst, bsh, EVRX_BT458_CTRL, 0x00); | |
319 | 319 | |||
320 | /* pallete enabled, ovly plane disabled */ | 320 | /* palette enabled, ovly plane disabled */ | |
321 | bus_space_write_1(bst, bsh, EVRX_BT458_ADDR, 0x06); | 321 | bus_space_write_1(bst, bsh, EVRX_BT458_ADDR, 0x06); | |
322 | bus_space_write_1(bst, bsh, EVRX_BT458_CTRL, 0x40); | 322 | bus_space_write_1(bst, bsh, EVRX_BT458_CTRL, 0x40); | |
323 | 323 | |||
324 | /* no test mode */ | 324 | /* no test mode */ | |
325 | bus_space_write_1(bst, bsh, EVRX_BT458_ADDR, 0x07); | 325 | bus_space_write_1(bst, bsh, EVRX_BT458_ADDR, 0x07); | |
326 | bus_space_write_1(bst, bsh, EVRX_BT458_CTRL, 0x00); | 326 | bus_space_write_1(bst, bsh, EVRX_BT458_CTRL, 0x00); | |
327 | 327 | |||
328 | /* magic initialization from HP-UX woodInitializeHardware() */ | 328 | /* magic initialization from HP-UX woodInitializeHardware() */ | |
329 | bus_space_write_4(bst, bsh, EVRX_MAGIC00, 0x00000001); | 329 | bus_space_write_4(bst, bsh, EVRX_MAGIC00, 0x00000001); | |
330 | bus_space_write_4(bst, bsh, EVRX_MAGIC04, 0x00000001); | 330 | bus_space_write_4(bst, bsh, EVRX_MAGIC04, 0x00000001); | |
331 | bus_space_write_4(bst, bsh, EVRX_MAGIC08, 0x00000001); | 331 | bus_space_write_4(bst, bsh, EVRX_MAGIC08, 0x00000001); | |
332 | bus_space_write_4(bst, bsh, EVRX_MAGIC0C, 0x00000001); | 332 | bus_space_write_4(bst, bsh, EVRX_MAGIC0C, 0x00000001); | |
333 | bus_space_write_4(bst, bsh, EVRX_MAGIC18, 0xFFFFFFFF); | 333 | bus_space_write_4(bst, bsh, EVRX_MAGIC18, 0xFFFFFFFF); |
--- src/sys/arch/hpcmips/dev/ite8181reg.h 2005/12/11 12:17:33 1.4
+++ src/sys/arch/hpcmips/dev/ite8181reg.h 2022/07/03 11:30:48 1.5
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: ite8181reg.h,v 1.4 2005/12/11 12:17:33 christos Exp $ */ | 1 | /* $NetBSD: ite8181reg.h,v 1.5 2022/07/03 11:30:48 andvar Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2000 SATO Kazumi | 4 | * Copyright (c) 2000 SATO Kazumi | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | 9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | 11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
@@ -28,38 +28,38 @@ | @@ -28,38 +28,38 @@ | |||
28 | */ | 28 | */ | |
29 | 29 | |||
30 | /* ITE8181 configuration registers */ | 30 | /* ITE8181 configuration registers */ | |
31 | #define ITE8181_CONF_OFFSET ((8192 -1) * 1024) /* offset of config reg */ | 31 | #define ITE8181_CONF_OFFSET ((8192 -1) * 1024) /* offset of config reg */ | |
32 | #define ITE8181_ID 0x00 /* Device ID, Vender ID */ | 32 | #define ITE8181_ID 0x00 /* Device ID, Vender ID */ | |
33 | #define ITE8181_DATA_ID 0x81811283 | 33 | #define ITE8181_DATA_ID 0x81811283 | |
34 | #define ITE8181_PRODUCT_ID 0x8181 | 34 | #define ITE8181_PRODUCT_ID 0x8181 | |
35 | #define ITE8181_VENDER_ID 0x1283 | 35 | #define ITE8181_VENDER_ID 0x1283 | |
36 | #define ITE8181_SCMD 0x04 /* Status, Command Reg. */ | 36 | #define ITE8181_SCMD 0x04 /* Status, Command Reg. */ | |
37 | #define ITE8181_CLASS 0x08 /* Class, Sub-class, PRG, revision */ | 37 | #define ITE8181_CLASS 0x08 /* Class, Sub-class, PRG, revision */ | |
38 | #define ITE8181_DATA_CLASS 0x03800000 | 38 | #define ITE8181_DATA_CLASS 0x03800000 | |
39 | #define ITE8181_CLASS_MASK 0xffff0000 | 39 | #define ITE8181_CLASS_MASK 0xffff0000 | |
40 | #define ITE8181_REV_MASK 0x000000ff | 40 | #define ITE8181_REV_MASK 0x000000ff | |
41 | #define ITE8181_MBA 0x10 /* Memory Base Address(4MB bounday) */ | 41 | #define ITE8181_MBA 0x10 /* Memory Base Address(4MB boundary) */ | |
42 | #define ITE8181_GBA 0x14 /* GUI Base Address(32KB boundary) */ | 42 | #define ITE8181_GBA 0x14 /* GUI Base Address(32KB boundary) */ | |
43 | #define ITE8181_SBA 0x18 /* Graphic Base Address (64KB boundary) */ | 43 | #define ITE8181_SBA 0x18 /* Graphic Base Address (64KB boundary) */ | |
44 | #define ITE8181_TEST 0x40 /* Test Reg. */ | 44 | #define ITE8181_TEST 0x40 /* Test Reg. */ | |
45 | #define ITE8181_STANDBY 0x44 /* Standby Reg. */ | 45 | #define ITE8181_STANDBY 0x44 /* Standby Reg. */ | |
46 | #define ITE8181_DATA_PLL2_TEST 0xc0000 /* PLL2 is test mode */ | 46 | #define ITE8181_DATA_PLL2_TEST 0xc0000 /* PLL2 is test mode */ | |
47 | #define ITE8181_DATA_PLL1_TEST 0x30000 /* PLL1 is test mode */ | 47 | #define ITE8181_DATA_PLL1_TEST 0x30000 /* PLL1 is test mode */ | |
48 | #define ITE8181_DATA_PLL2_RESET 0x8000 /* PLL2 reset */ | 48 | #define ITE8181_DATA_PLL2_RESET 0x8000 /* PLL2 reset */ | |
49 | #define ITE8181_DATA_PLL1_RESET 0x4000 /* PLL1 reset */ | 49 | #define ITE8181_DATA_PLL1_RESET 0x4000 /* PLL1 reset */ | |
50 | #define ITE8181_DATA_PLL2_PWDOWN 0x2000 /* PLL2 powerdown */ | 50 | #define ITE8181_DATA_PLL2_PWDOWN 0x2000 /* PLL2 powerdown */ | |
51 | #define ITE8181_DATA_PLL1_PWDOWN 0x1000 /* PLL1 powerdown */ | 51 | #define ITE8181_DATA_PLL1_PWDOWN 0x1000 /* PLL1 powerdown */ | |
52 | #define ITE8181_DATA_PALETTESTBY 0x0200 /* Pallete RAM standby */ | 52 | #define ITE8181_DATA_PALETTESTBY 0x0200 /* Palette RAM standby */ | |
53 | #define ITE8181_DATA_CURSORSTBY 0x0100 /* Cursor standby */ | 53 | #define ITE8181_DATA_CURSORSTBY 0x0100 /* Cursor standby */ | |
54 | #define ITE8181_DATA_BITBLTSTBY 0x0080 /* BitBlt engine standby */ | 54 | #define ITE8181_DATA_BITBLTSTBY 0x0080 /* BitBlt engine standby */ | |
55 | #define ITE8181_DATA_LINESTBY 0x0040 /* Line Draw standby */ | 55 | #define ITE8181_DATA_LINESTBY 0x0040 /* Line Draw standby */ | |
56 | #define ITE8181_DATA_DACCLKSTOP 0x0020 /* DAC Clock stop */ | 56 | #define ITE8181_DATA_DACCLKSTOP 0x0020 /* DAC Clock stop */ | |
57 | #define ITE8181_DATA_DACPOWERON 0x0010 /* DAC Power ON */ | 57 | #define ITE8181_DATA_DACPOWERON 0x0010 /* DAC Power ON */ | |
58 | #define ITE8181_DATA_GATEPLL2IN 0x0008 /* Gate PLL2 input clock */ | 58 | #define ITE8181_DATA_GATEPLL2IN 0x0008 /* Gate PLL2 input clock */ | |
59 | #define ITE8181_DATA_GATEPLL1IN 0x0004 /* Gate PLL1 input clock */ | 59 | #define ITE8181_DATA_GATEPLL1IN 0x0004 /* Gate PLL1 input clock */ | |
60 | #define ITE8181_DATA_CLOCKSTOP 0x0001 /* 14.318MHZ CLock Stop */ | 60 | #define ITE8181_DATA_CLOCKSTOP 0x0001 /* 14.318MHZ CLock Stop */ | |
61 | #define ITE8181_PLL1 0x48 /* PLL1 Reg. */ | 61 | #define ITE8181_PLL1 0x48 /* PLL1 Reg. */ | |
62 | #define ITE8181_PLL2 0x4c /* PLL2 Reg. */ | 62 | #define ITE8181_PLL2 0x4c /* PLL2 Reg. */ | |
63 | 63 | |||
64 | /* ITE8181 GUI 32bit registers */ | 64 | /* ITE8181 GUI 32bit registers */ | |
65 | #define ITE8181_GUI_BSLE 0x00 /* BitBlt src/Line Draw End */ | 65 | #define ITE8181_GUI_BSLE 0x00 /* BitBlt src/Line Draw End */ | |
@@ -194,27 +194,27 @@ | @@ -194,27 +194,27 @@ | |||
194 | #define ITE8181_TRC_MASK 0x10 /* text reverse control */ | 194 | #define ITE8181_TRC_MASK 0x10 /* text reverse control */ | |
195 | #define ITE8181_TRC_NOTREVERSE 0x00 | 195 | #define ITE8181_TRC_NOTREVERSE 0x00 | |
196 | #define ITE8181_TRC_TREVERSE 0x10 | 196 | #define ITE8181_TRC_TREVERSE 0x10 | |
197 | 197 | |||
198 | #define ITE8181_CM_MASK 0x01 /* color to mono map */ | 198 | #define ITE8181_CM_MASK 0x01 /* color to mono map */ | |
199 | #define ITE8181_CM_NTSC 0x00 /* NTSC weighting */ | 199 | #define ITE8181_CM_NTSC 0x00 /* NTSC weighting */ | |
200 | #define ITE8181_CM_GREEN 0x01 /* green only */ | 200 | #define ITE8181_CM_GREEN 0x01 /* green only */ | |
201 | 201 | |||
202 | #define ITE8181_EMA_FRCCOL 0xa2 /* FRC Color */ | 202 | #define ITE8181_EMA_FRCCOL 0xa2 /* FRC Color */ | |
203 | #define ITE8181_FRCCOL_MASK 0x80 /* FRC color option */ | 203 | #define ITE8181_FRCCOL_MASK 0x80 /* FRC color option */ | |
204 | #define ITE8181_FRCCOL_8 0x80 /* option1, 8 color */ | 204 | #define ITE8181_FRCCOL_8 0x80 /* option1, 8 color */ | |
205 | #define ITE8181_FRCCOL_16 0x00 /* option2, 16 color */ | 205 | #define ITE8181_FRCCOL_16 0x00 /* option2, 16 color */ | |
206 | 206 | |||
207 | #define ITE8181_EMA_FRCPAT 0xa3 /* select frame rate perttern */ | 207 | #define ITE8181_EMA_FRCPAT 0xa3 /* select frame rate pattern */ | |
208 | #define ITE8181_FRCPAT_PROGRAM 0x80 | 208 | #define ITE8181_FRCPAT_PROGRAM 0x80 | |
209 | #define ITE8181_FRCPAT_CONSTANT 0x00 | 209 | #define ITE8181_FRCPAT_CONSTANT 0x00 | |
210 | 210 | |||
211 | #define ITE8181_EMA_FBADDR1 0xa8 /* FB addr1 [21:14] */ | 211 | #define ITE8181_EMA_FBADDR1 0xa8 /* FB addr1 [21:14] */ | |
212 | #define ITE8181_EMA_FBADDR2 0xa9 /* FB addr2 [21:14] */ | 212 | #define ITE8181_EMA_FBADDR2 0xa9 /* FB addr2 [21:14] */ | |
213 | #define ITE8181_EMA_FBADDR3 0xaa /* FB addr3 [21:14] */ | 213 | #define ITE8181_EMA_FBADDR3 0xaa /* FB addr3 [21:14] */ | |
214 | 214 | |||
215 | #define ITE8181_EMA_REDBCOLOR 0xaa /* Red Border color */ | 215 | #define ITE8181_EMA_REDBCOLOR 0xaa /* Red Border color */ | |
216 | #define ITE8181_EMA_GREENBCOLOR 0xab /* Green Border color */ | 216 | #define ITE8181_EMA_GREENBCOLOR 0xab /* Green Border color */ | |
217 | #define ITE8181_EMA_BLUEBCOLOR 0xac /* Blue Border color */ | 217 | #define ITE8181_EMA_BLUEBCOLOR 0xac /* Blue Border color */ | |
218 | 218 | |||
219 | #define ITE8181_EMA_DISPERSION1 0xb0 /* Dispersion-1 B0-B7 */ | 219 | #define ITE8181_EMA_DISPERSION1 0xb0 /* Dispersion-1 B0-B7 */ | |
220 | #define ITE8181_EMA_DISPERSION2 0xb8 /* Dispersion-2 B8-BF */ | 220 | #define ITE8181_EMA_DISPERSION2 0xb8 /* Dispersion-2 B8-BF */ |
--- src/sys/arch/hpcsh/dev/hd64461/hd64461video.c 2022/05/24 06:28:00 1.56
+++ src/sys/arch/hpcsh/dev/hd64461/hd64461video.c 2022/07/03 11:30:48 1.57
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: hd64461video.c,v 1.56 2022/05/24 06:28:00 andvar Exp $ */ | 1 | /* $NetBSD: hd64461video.c,v 1.57 2022/07/03 11:30:48 andvar Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2001, 2002, 2004 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2001, 2002, 2004 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to The NetBSD Foundation | 7 | * This code is derived from software contributed to The NetBSD Foundation | |
8 | * by UCHIYAMA Yasushi. | 8 | * by UCHIYAMA Yasushi. | |
9 | * | 9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | 10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | 11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | 12 | * are met: | |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. | |
@@ -20,27 +20,27 @@ | @@ -20,27 +20,27 @@ | |||
20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | 20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | |
21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | 22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | |
23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
29 | * POSSIBILITY OF SUCH DAMAGE. | 29 | * POSSIBILITY OF SUCH DAMAGE. | |
30 | */ | 30 | */ | |
31 | 31 | |||
32 | #include <sys/cdefs.h> | 32 | #include <sys/cdefs.h> | |
33 | __KERNEL_RCSID(0, "$NetBSD: hd64461video.c,v 1.56 2022/05/24 06:28:00 andvar Exp $"); | 33 | __KERNEL_RCSID(0, "$NetBSD: hd64461video.c,v 1.57 2022/07/03 11:30:48 andvar Exp $"); | |
34 | 34 | |||
35 | #include "opt_hd64461video.h" | 35 | #include "opt_hd64461video.h" | |
36 | // #define HD64461VIDEO_HWACCEL | 36 | // #define HD64461VIDEO_HWACCEL | |
37 | 37 | |||
38 | #include <sys/param.h> | 38 | #include <sys/param.h> | |
39 | #include <sys/kernel.h> | 39 | #include <sys/kernel.h> | |
40 | #include <sys/systm.h> | 40 | #include <sys/systm.h> | |
41 | #include <sys/device.h> | 41 | #include <sys/device.h> | |
42 | #include <sys/malloc.h> | 42 | #include <sys/malloc.h> | |
43 | #include <sys/bus.h> | 43 | #include <sys/bus.h> | |
44 | 44 | |||
45 | #include <sys/conf.h> /* cdev_decl */ | 45 | #include <sys/conf.h> /* cdev_decl */ | |
46 | #include <dev/cons.h> /* consdev */ | 46 | #include <dev/cons.h> /* consdev */ | |
@@ -1117,51 +1117,51 @@ hd64461video_frame_buffer_size(struct hd | @@ -1117,51 +1117,51 @@ hd64461video_frame_buffer_size(struct hd | |||
1117 | *(volatile int *)(page + 4) != ~x) | 1117 | *(volatile int *)(page + 4) != ~x) | |
1118 | return (0); | 1118 | return (0); | |
1119 | 1119 | |||
1120 | fbend_found: | 1120 | fbend_found: | |
1121 | return (page - startaddr); | 1121 | return (page - startaddr); | |
1122 | } | 1122 | } | |
1123 | 1123 | |||
1124 | STATIC void | 1124 | STATIC void | |
1125 | hd64461video_set_clut(struct hd64461video_chip *vc, int idx, int cnt, | 1125 | hd64461video_set_clut(struct hd64461video_chip *vc, int idx, int cnt, | |
1126 | uint8_t *r, uint8_t *g, uint8_t *b) | 1126 | uint8_t *r, uint8_t *g, uint8_t *b) | |
1127 | { | 1127 | { | |
1128 | KASSERT(r && g && b); | 1128 | KASSERT(r && g && b); | |
1129 | 1129 | |||
1130 | /* index pallete */ | 1130 | /* index palette */ | |
1131 | hd64461_reg_write_2(HD64461_LCDCPTWAR_REG16, | 1131 | hd64461_reg_write_2(HD64461_LCDCPTWAR_REG16, | |
1132 | HD64461_LCDCPTWAR_SET(0, idx)); | 1132 | HD64461_LCDCPTWAR_SET(0, idx)); | |
1133 | /* set data */ | 1133 | /* set data */ | |
1134 | while (cnt && LEGAL_CLUT_INDEX(idx)) { | 1134 | while (cnt && LEGAL_CLUT_INDEX(idx)) { | |
1135 | uint16_t v; | 1135 | uint16_t v; | |
1136 | #define HD64461VIDEO_SET_CLUT(x) \ | 1136 | #define HD64461VIDEO_SET_CLUT(x) \ | |
1137 | v = (x >> 2) & 0x3f; \ | 1137 | v = (x >> 2) & 0x3f; \ | |
1138 | hd64461_reg_write_2(HD64461_LCDCPTWDR_REG16, v) | 1138 | hd64461_reg_write_2(HD64461_LCDCPTWDR_REG16, v) | |
1139 | HD64461VIDEO_SET_CLUT(*r); | 1139 | HD64461VIDEO_SET_CLUT(*r); | |
1140 | HD64461VIDEO_SET_CLUT(*g); | 1140 | HD64461VIDEO_SET_CLUT(*g); | |
1141 | HD64461VIDEO_SET_CLUT(*b); | 1141 | HD64461VIDEO_SET_CLUT(*b); | |
1142 | #undef HD64461VIDEO_SET_CLUT | 1142 | #undef HD64461VIDEO_SET_CLUT | |
1143 | r++, g++, b++; | 1143 | r++, g++, b++; | |
1144 | idx++, cnt--; | 1144 | idx++, cnt--; | |
1145 | } | 1145 | } | |
1146 | } | 1146 | } | |
1147 | 1147 | |||
1148 | STATIC void | 1148 | STATIC void | |
1149 | hd64461video_get_clut(struct hd64461video_chip *vc, int idx, int cnt, | 1149 | hd64461video_get_clut(struct hd64461video_chip *vc, int idx, int cnt, | |
1150 | uint8_t *r, uint8_t *g, uint8_t *b) | 1150 | uint8_t *r, uint8_t *g, uint8_t *b) | |
1151 | { | 1151 | { | |
1152 | KASSERT(r && g && b); | 1152 | KASSERT(r && g && b); | |
1153 | 1153 | |||
1154 | /* index pallete */ | 1154 | /* index palette */ | |
1155 | hd64461_reg_write_2(HD64461_LCDCPTRAR_REG16, | 1155 | hd64461_reg_write_2(HD64461_LCDCPTRAR_REG16, | |
1156 | HD64461_LCDCPTRAR_SET(0, idx)); | 1156 | HD64461_LCDCPTRAR_SET(0, idx)); | |
1157 | 1157 | |||
1158 | /* get data */ | 1158 | /* get data */ | |
1159 | while (cnt && LEGAL_CLUT_INDEX(idx)) { | 1159 | while (cnt && LEGAL_CLUT_INDEX(idx)) { | |
1160 | uint16_t v; | 1160 | uint16_t v; | |
1161 | #define HD64461VIDEO_GET_CLUT(x) \ | 1161 | #define HD64461VIDEO_GET_CLUT(x) \ | |
1162 | v = hd64461_reg_read_2(HD64461_LCDCPTRDR_REG16); \ | 1162 | v = hd64461_reg_read_2(HD64461_LCDCPTRDR_REG16); \ | |
1163 | x = HD64461_LCDCPTRDR(v); \ | 1163 | x = HD64461_LCDCPTRDR(v); \ | |
1164 | x <<= 2 | 1164 | x <<= 2 | |
1165 | HD64461VIDEO_GET_CLUT(*r); | 1165 | HD64461VIDEO_GET_CLUT(*r); | |
1166 | HD64461VIDEO_GET_CLUT(*g); | 1166 | HD64461VIDEO_GET_CLUT(*g); | |
1167 | HD64461VIDEO_GET_CLUT(*b); | 1167 | HD64461VIDEO_GET_CLUT(*b); |
--- src/sys/arch/luna68k/dev/lunafb.c 2021/08/07 16:18:57 1.43
+++ src/sys/arch/luna68k/dev/lunafb.c 2022/07/03 11:30:48 1.44
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: lunafb.c,v 1.43 2021/08/07 16:18:57 thorpej Exp $ */ | 1 | /* $NetBSD: lunafb.c,v 1.44 2022/07/03 11:30:48 andvar Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2000 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2000 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to The NetBSD Foundation | 7 | * This code is derived from software contributed to The NetBSD Foundation | |
8 | * by Tohru Nishimura. | 8 | * by Tohru Nishimura. | |
9 | * | 9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | 10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | 11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | 12 | * are met: | |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. | |
@@ -21,27 +21,27 @@ | @@ -21,27 +21,27 @@ | |||
21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | 22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | |
23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
29 | * POSSIBILITY OF SUCH DAMAGE. | 29 | * POSSIBILITY OF SUCH DAMAGE. | |
30 | */ | 30 | */ | |
31 | 31 | |||
32 | #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ | 32 | #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ | |
33 | 33 | |||
34 | __KERNEL_RCSID(0, "$NetBSD: lunafb.c,v 1.43 2021/08/07 16:18:57 thorpej Exp $"); | 34 | __KERNEL_RCSID(0, "$NetBSD: lunafb.c,v 1.44 2022/07/03 11:30:48 andvar Exp $"); | |
35 | 35 | |||
36 | #include <sys/param.h> | 36 | #include <sys/param.h> | |
37 | #include <sys/systm.h> | 37 | #include <sys/systm.h> | |
38 | #include <sys/conf.h> | 38 | #include <sys/conf.h> | |
39 | #include <sys/device.h> | 39 | #include <sys/device.h> | |
40 | #include <sys/ioctl.h> | 40 | #include <sys/ioctl.h> | |
41 | #include <sys/kmem.h> | 41 | #include <sys/kmem.h> | |
42 | #include <sys/mman.h> | 42 | #include <sys/mman.h> | |
43 | #include <sys/proc.h> | 43 | #include <sys/proc.h> | |
44 | #include <sys/tty.h> | 44 | #include <sys/tty.h> | |
45 | #include <sys/errno.h> | 45 | #include <sys/errno.h> | |
46 | #include <sys/buf.h> | 46 | #include <sys/buf.h> | |
47 | 47 | |||
@@ -420,27 +420,27 @@ omfb_resetcmap(struct om_hwdevconfig *dc | @@ -420,27 +420,27 @@ omfb_resetcmap(struct om_hwdevconfig *dc | |||
420 | } else if (hwplanemask == 0xff) { | 420 | } else if (hwplanemask == 0xff) { | |
421 | struct bt458 *ndac = (struct bt458 *)OMFB_RAMDAC; | 421 | struct bt458 *ndac = (struct bt458 *)OMFB_RAMDAC; | |
422 | 422 | |||
423 | /* | 423 | /* | |
424 | * Initialize the Bt458. When we write to control registers, | 424 | * Initialize the Bt458. When we write to control registers, | |
425 | * the address is not incremented automatically. So we specify | 425 | * the address is not incremented automatically. So we specify | |
426 | * it ourselves for each control register. | 426 | * it ourselves for each control register. | |
427 | */ | 427 | */ | |
428 | ndac->bt_addr = 0x04; | 428 | ndac->bt_addr = 0x04; | |
429 | ndac->bt_ctrl = 0xff; /* all planes will be read */ | 429 | ndac->bt_ctrl = 0xff; /* all planes will be read */ | |
430 | ndac->bt_addr = 0x05; | 430 | ndac->bt_addr = 0x05; | |
431 | ndac->bt_ctrl = 0x00; /* all planes have non-blink */ | 431 | ndac->bt_ctrl = 0x00; /* all planes have non-blink */ | |
432 | ndac->bt_addr = 0x06; | 432 | ndac->bt_addr = 0x06; | |
433 | ndac->bt_ctrl = 0x40; /* pallete enabled, ovly plane disabled */ | 433 | ndac->bt_ctrl = 0x40; /* palette enabled, ovly plane disabled */ | |
434 | ndac->bt_addr = 0x07; | 434 | ndac->bt_addr = 0x07; | |
435 | ndac->bt_ctrl = 0x00; /* no test mode */ | 435 | ndac->bt_ctrl = 0x00; /* no test mode */ | |
436 | 436 | |||
437 | /* | 437 | /* | |
438 | * Set ANSI 16 colors. We only supports 4bpp console right | 438 | * Set ANSI 16 colors. We only supports 4bpp console right | |
439 | * now, repeat 16 colors in 256 colormap. | 439 | * now, repeat 16 colors in 256 colormap. | |
440 | */ | 440 | */ | |
441 | ndac->bt_addr = 0; | 441 | ndac->bt_addr = 0; | |
442 | for (i = 0; i < 256; i++) { | 442 | for (i = 0; i < 256; i++) { | |
443 | ndac->bt_cmap = dc->dc_cmap.r[i] = ansicmap[i % 16].r; | 443 | ndac->bt_cmap = dc->dc_cmap.r[i] = ansicmap[i % 16].r; | |
444 | ndac->bt_cmap = dc->dc_cmap.g[i] = ansicmap[i % 16].g; | 444 | ndac->bt_cmap = dc->dc_cmap.g[i] = ansicmap[i % 16].g; | |
445 | ndac->bt_cmap = dc->dc_cmap.b[i] = ansicmap[i % 16].b; | 445 | ndac->bt_cmap = dc->dc_cmap.b[i] = ansicmap[i % 16].b; | |
446 | } | 446 | } |
--- src/sys/dev/pci/tgareg.h 2005/12/11 12:22:50 1.6
+++ src/sys/dev/pci/tgareg.h 2022/07/03 11:30:48 1.7
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: tgareg.h,v 1.6 2005/12/11 12:22:50 christos Exp $ */ | 1 | /* $NetBSD: tgareg.h,v 1.7 2022/07/03 11:30:48 andvar Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1995, 1996 Carnegie-Mellon University. | 4 | * Copyright (c) 1995, 1996 Carnegie-Mellon University. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Author: Chris G. Demetriou | 7 | * Author: Chris G. Demetriou | |
8 | * | 8 | * | |
9 | * Permission to use, copy, modify and distribute this software and | 9 | * Permission to use, copy, modify and distribute this software and | |
10 | * its documentation is hereby granted, provided that both the copyright | 10 | * its documentation is hereby granted, provided that both the copyright | |
11 | * notice and this permission notice appear in all copies of the | 11 | * notice and this permission notice appear in all copies of the | |
12 | * software, derivative works or modified versions, and any portions | 12 | * software, derivative works or modified versions, and any portions | |
13 | * thereof, and that both notices appear in supporting documentation. | 13 | * thereof, and that both notices appear in supporting documentation. | |
14 | * | 14 | * | |
@@ -101,27 +101,27 @@ typedef u_int32_t tga_reg_t; | @@ -101,27 +101,27 @@ typedef u_int32_t tga_reg_t; | |||
101 | #define TGA_REG_GBIR 0x023 /* Blue Increment */ | 101 | #define TGA_REG_GBIR 0x023 /* Blue Increment */ | |
102 | #define TGA_REG_GZIR_L 0x024 /* Z-increment Low */ | 102 | #define TGA_REG_GZIR_L 0x024 /* Z-increment Low */ | |
103 | #define TGA_REG_GZIR_H 0x025 /* Z-Increment High */ | 103 | #define TGA_REG_GZIR_H 0x025 /* Z-Increment High */ | |
104 | #define TGA_REG_GDBR 0x026 /* DMA Base Address */ | 104 | #define TGA_REG_GDBR 0x026 /* DMA Base Address */ | |
105 | #define TGA_REG_GBWR 0x027 /* Bresenham Width */ | 105 | #define TGA_REG_GBWR 0x027 /* Bresenham Width */ | |
106 | #define TGA_REG_GZVR_L 0x028 /* Z-value Low */ | 106 | #define TGA_REG_GZVR_L 0x028 /* Z-value Low */ | |
107 | #define TGA_REG_GZVR_H 0x029 /* Z-value High */ | 107 | #define TGA_REG_GZVR_H 0x029 /* Z-value High */ | |
108 | #define TGA_REG_GZBR 0x02a /* Z-base address */ | 108 | #define TGA_REG_GZBR 0x02a /* Z-base address */ | |
109 | /* GADR alias 0x02b */ | 109 | /* GADR alias 0x02b */ | |
110 | #define TGA_REG_GRVR 0x02c /* Red Value */ | 110 | #define TGA_REG_GRVR 0x02c /* Red Value */ | |
111 | #define TGA_REG_GGVR 0x02d /* Green Value */ | 111 | #define TGA_REG_GGVR 0x02d /* Green Value */ | |
112 | #define TGA_REG_GBVR 0x02e /* Blue Value */ | 112 | #define TGA_REG_GBVR 0x02e /* Blue Value */ | |
113 | #define TGA_REG_GSWR 0x02f /* Span Width */ | 113 | #define TGA_REG_GSWR 0x02f /* Span Width */ | |
114 | #define TGA_REG_EPSR 0x030 /* Pallete and DAC Setup */ | 114 | #define TGA_REG_EPSR 0x030 /* Palette and DAC Setup */ | |
115 | 115 | |||
116 | /* reserved 0x031 - 0x3f */ | 116 | /* reserved 0x031 - 0x3f */ | |
117 | 117 | |||
118 | #define TGA_REG_GSNR0 0x040 /* Slope-no-go 0 */ | 118 | #define TGA_REG_GSNR0 0x040 /* Slope-no-go 0 */ | |
119 | #define TGA_REG_GSNR1 0x041 /* Slope-no-go 1 */ | 119 | #define TGA_REG_GSNR1 0x041 /* Slope-no-go 1 */ | |
120 | #define TGA_REG_GSNR2 0x042 /* Slope-no-go 2 */ | 120 | #define TGA_REG_GSNR2 0x042 /* Slope-no-go 2 */ | |
121 | #define TGA_REG_GSNR3 0x043 /* Slope-no-go 3 */ | 121 | #define TGA_REG_GSNR3 0x043 /* Slope-no-go 3 */ | |
122 | #define TGA_REG_GSNR4 0x044 /* Slope-no-go 4 */ | 122 | #define TGA_REG_GSNR4 0x044 /* Slope-no-go 4 */ | |
123 | #define TGA_REG_GSNR5 0x045 /* Slope-no-go 5 */ | 123 | #define TGA_REG_GSNR5 0x045 /* Slope-no-go 5 */ | |
124 | #define TGA_REG_GSNR6 0x046 /* Slope-no-go 6 */ | 124 | #define TGA_REG_GSNR6 0x046 /* Slope-no-go 6 */ | |
125 | #define TGA_REG_GSNR7 0x047 /* Slope-no-go 7 */ | 125 | #define TGA_REG_GSNR7 0x047 /* Slope-no-go 7 */ | |
126 | 126 | |||
127 | #define TGA_REG_GSLR0 0x048 /* Slope 0 */ | 127 | #define TGA_REG_GSLR0 0x048 /* Slope 0 */ | |
@@ -146,27 +146,27 @@ typedef u_int32_t tga_reg_t; | @@ -146,27 +146,27 @@ typedef u_int32_t tga_reg_t; | |||
146 | #define TGA_REG_GCDR 0x059 /* Copy 64 Destination */ | 146 | #define TGA_REG_GCDR 0x059 /* Copy 64 Destination */ | |
147 | /* GC[SD]R aliases 0x05a - 0x05f */ | 147 | /* GC[SD]R aliases 0x05a - 0x05f */ | |
148 | 148 | |||
149 | /* reserved 0x060 - 0x077 */ | 149 | /* reserved 0x060 - 0x077 */ | |
150 | 150 | |||
151 | #define TGA_REG_ERWR 0x078 /* EEPROM write */ | 151 | #define TGA_REG_ERWR 0x078 /* EEPROM write */ | |
152 | 152 | |||
153 | /* reserved 0x079 */ | 153 | /* reserved 0x079 */ | |
154 | 154 | |||
155 | #define TGA_REG_ECGR 0x07a /* Clock */ | 155 | #define TGA_REG_ECGR 0x07a /* Clock */ | |
156 | 156 | |||
157 | /* reserved 0x07b */ | 157 | /* reserved 0x07b */ | |
158 | 158 | |||
159 | #define TGA_REG_EPDR 0x07c /* Pallete and DAC Data */ | 159 | #define TGA_REG_EPDR 0x07c /* Palette and DAC Data */ | |
160 | 160 | |||
161 | /* reserved 0x07d */ | 161 | /* reserved 0x07d */ | |
162 | 162 | |||
163 | #define TGA_REG_SCSR 0x07e /* Command Status */ | 163 | #define TGA_REG_SCSR 0x07e /* Command Status */ | |
164 | 164 | |||
165 | /* reserved 0x07f */ | 165 | /* reserved 0x07f */ | |
166 | 166 | |||
167 | /* | 167 | /* | |
168 | * Video Valid Register | 168 | * Video Valid Register | |
169 | */ | 169 | */ | |
170 | #define VVR_VIDEOVALID 0x00000001 /* 0 VGA, 1 TGA2 (TGA2 only) */ | 170 | #define VVR_VIDEOVALID 0x00000001 /* 0 VGA, 1 TGA2 (TGA2 only) */ | |
171 | #define VVR_BLANK 0x00000002 /* 0 active, 1 blank */ | 171 | #define VVR_BLANK 0x00000002 /* 0 active, 1 blank */ | |
172 | #define VVR_CURSOR 0x00000004 /* 0 disable, 1 enable (TGA2 R/O) */ | 172 | #define VVR_CURSOR 0x00000004 /* 0 disable, 1 enable (TGA2 R/O) */ |