4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #ifndef _SYS_VGASUBR_H
28 #define _SYS_VGASUBR_H
30 #pragma ident "%Z%%M% %I% %E% SMI" /* SunOS4.1 1.11 */
38 ddi_acc_handle_t handle
;
42 extern int vga_get_reg(struct vgaregmap
*reg
, int i
);
43 extern void vga_set_reg(struct vgaregmap
*reg
, int i
, int v
);
44 extern int vga_get_crtc(struct vgaregmap
*reg
, int i
);
45 extern void vga_set_crtc(struct vgaregmap
*reg
, int i
, int v
);
46 extern int vga_get_seq(struct vgaregmap
*reg
, int i
);
47 extern void vga_set_seq(struct vgaregmap
*reg
, int i
, int v
);
48 extern int vga_get_grc(struct vgaregmap
*reg
, int i
);
49 extern void vga_set_grc(struct vgaregmap
*reg
, int i
, int v
);
50 extern int vga_get_atr(struct vgaregmap
*reg
, int i
);
51 extern void vga_set_atr(struct vgaregmap
*reg
, int i
, int v
);
52 extern void vga_put_cmap(struct vgaregmap
*reg
,
53 int index
, unsigned char r
, unsigned char g
, unsigned char b
);
54 extern void vga_get_cmap(struct vgaregmap
*reg
,
55 int index
, unsigned char *r
, unsigned char *g
, unsigned char *b
);
56 extern void vga_get_hardware_settings(struct vgaregmap
*reg
,
57 int *width
, int *height
);
58 extern void vga_set_indexed(struct vgaregmap
*reg
, int indexreg
,
59 int datareg
, unsigned char index
, unsigned char val
);
60 extern int vga_get_indexed(struct vgaregmap
*reg
, int indexreg
,
61 int datareg
, unsigned char index
);
63 #define VGA_MISC_TEXT 0x67
64 #define NUM_CRTC_REG 25
67 #define NUM_ATR_REG 21
69 extern unsigned char VGA_ATR_TEXT
[NUM_ATR_REG
];
70 extern unsigned char VGA_SEQ_TEXT
[NUM_SEQ_REG
];
71 extern unsigned char VGA_CRTC_TEXT
[NUM_CRTC_REG
];
72 extern unsigned char VGA_GRC_TEXT
[NUM_GRC_REG
];
73 extern unsigned char VGA_TEXT_PALETTES
[64][3];
76 extern void vga_dump_regs(struct vgaregmap
*reg
,
77 int maxseq
, int maxcrtc
, int maxatr
, int maxgrc
);
85 #endif /* _SYS_VGASUBR_H */