Commit | Line | Data |
---|---|---|
60f56dfc KM |
1 | /* |
2 | * Copyright (c) 1988 University of Utah. | |
3 | * Copyright (c) 1990 The Regents of the University of California. | |
4 | * All rights reserved. | |
5 | * | |
6 | * This code is derived from software contributed to Berkeley by | |
7 | * the Systems Programming Group of the University of Utah Computer | |
8 | * Science Department. | |
9 | * | |
10 | * %sccs.include.redist.c% | |
11 | * | |
7b7da76f | 12 | * from: Utah $Hdr: grfvar.h 1.10 92/01/21$ |
60f56dfc | 13 | * |
7b7da76f | 14 | * @(#)grfvar.h 7.4 (Berkeley) %G% |
60f56dfc KM |
15 | */ |
16 | ||
b5c05ed5 | 17 | /* internal structure of lock page */ |
60f56dfc | 18 | #define GRFMAXLCK 256 |
b5c05ed5 MH |
19 | struct grf_lockpage { |
20 | u_char gl_locks[GRFMAXLCK]; | |
21 | }; | |
22 | #define gl_lockslot gl_locks[0] | |
60f56dfc | 23 | |
7b7da76f MH |
24 | /* |
25 | * Static configuration info for display types | |
26 | */ | |
27 | struct grfsw { | |
28 | int gd_hwid; /* id returned by hardware */ | |
29 | int gd_swid; /* id to be returned by software */ | |
30 | char *gd_desc; /* description printed at config time */ | |
31 | int (*gd_init)(); /* boot time init routine */ | |
32 | int (*gd_mode)(); /* misc function routine */ | |
33 | }; | |
34 | ||
60f56dfc KM |
35 | /* per display info */ |
36 | struct grf_softc { | |
37 | int g_flags; /* software flags */ | |
7b7da76f | 38 | struct grfsw *g_sw; /* static configuration info */ |
b5c05ed5 MH |
39 | caddr_t g_regkva; /* KVA of registers */ |
40 | caddr_t g_fbkva; /* KVA of framebuffer */ | |
41 | struct grfinfo g_display; /* hardware description (for ioctl) */ | |
42 | struct grf_lockpage *g_lock; /* lock page associated with device */ | |
60f56dfc | 43 | struct proc *g_lockp; /* process holding lock */ |
60f56dfc | 44 | short *g_pid; /* array of pids with device open */ |
b5c05ed5 MH |
45 | int g_lockpslot; /* g_pid entry of g_lockp */ |
46 | caddr_t g_data; /* device dependent data */ | |
60f56dfc KM |
47 | }; |
48 | ||
49 | /* flags */ | |
50 | #define GF_ALIVE 0x01 | |
51 | #define GF_OPEN 0x02 | |
52 | #define GF_EXCLUDE 0x04 | |
53 | #define GF_WANTED 0x08 | |
54 | #define GF_BSDOPEN 0x10 | |
55 | #define GF_HPUXOPEN 0x20 | |
56 | ||
60f56dfc KM |
57 | /* requests to mode routine */ |
58 | #define GM_GRFON 1 | |
59 | #define GM_GRFOFF 2 | |
60 | #define GM_GRFOVON 3 | |
61 | #define GM_GRFOVOFF 4 | |
7b7da76f | 62 | #define GM_DESCRIBE 5 |
60f56dfc KM |
63 | |
64 | /* minor device interpretation */ | |
65 | #define GRFOVDEV 0x10 /* overlay planes */ | |
66 | #define GRFIMDEV 0x20 /* images planes */ | |
67 | #define GRFUNIT(d) ((d) & 0x7) | |
68 | ||
69 | #ifdef KERNEL | |
70 | extern struct grf_softc grf_softc[]; | |
7b7da76f MH |
71 | extern struct grfsw grfsw[]; |
72 | extern int ngrfsw; | |
60f56dfc | 73 | #endif |