xref: /csrg-svn/sys/hp/dev/grfvar.h (revision 41480)
1*41480Smckusick /*
2*41480Smckusick  * Copyright (c) 1988 University of Utah.
3*41480Smckusick  * Copyright (c) 1990 The Regents of the University of California.
4*41480Smckusick  * All rights reserved.
5*41480Smckusick  *
6*41480Smckusick  * This code is derived from software contributed to Berkeley by
7*41480Smckusick  * the Systems Programming Group of the University of Utah Computer
8*41480Smckusick  * Science Department.
9*41480Smckusick  *
10*41480Smckusick  * %sccs.include.redist.c%
11*41480Smckusick  *
12*41480Smckusick  * from: Utah $Hdr: grfvar.h 1.8 89/01/18$
13*41480Smckusick  *
14*41480Smckusick  *	@(#)grfvar.h	7.1 (Berkeley) 05/08/90
15*41480Smckusick  */
16*41480Smckusick 
17*41480Smckusick #define GRFMAXLCK	256
18*41480Smckusick 
19*41480Smckusick /* per display info */
20*41480Smckusick struct	grf_softc {
21*41480Smckusick 	int	g_flags;		/* software flags */
22*41480Smckusick 	int	g_type;			/* type of display */
23*41480Smckusick 	struct	grfinfo g_display;	/* hardware description */
24*41480Smckusick 	struct	proc *g_lockp;		/* process holding lock */
25*41480Smckusick 	int	g_lockpslot;		/* g_pid entry of g_lockp */
26*41480Smckusick 	u_char	*g_locks;		/* lock page associated with device */
27*41480Smckusick 	short	*g_pid;			/* array of pids with device open */
28*41480Smckusick };
29*41480Smckusick 
30*41480Smckusick /* flags */
31*41480Smckusick #define	GF_ALIVE	0x01
32*41480Smckusick #define GF_OPEN		0x02
33*41480Smckusick #define GF_EXCLUDE	0x04
34*41480Smckusick #define GF_WANTED	0x08
35*41480Smckusick #define GF_BSDOPEN	0x10
36*41480Smckusick #define GF_HPUXOPEN	0x20
37*41480Smckusick 
38*41480Smckusick /* display types - indices into grfdev */
39*41480Smckusick #define	GT_TOPCAT	0
40*41480Smckusick #define	GT_GATORBOX	1
41*41480Smckusick #define	GT_RENAISSANCE	2
42*41480Smckusick #define GT_LRCATSEYE	3
43*41480Smckusick #define GT_HRCCATSEYE	4
44*41480Smckusick #define GT_HRMCATSEYE	5
45*41480Smckusick #define GT_DAVINCI	6
46*41480Smckusick 
47*41480Smckusick struct	grfdev {
48*41480Smckusick 	int	gd_hardid;	/* secondary id returned by hardware */
49*41480Smckusick 	int	gd_softid;	/* id returned by HP-UX */
50*41480Smckusick 	int	(*gd_init)();	/* boot time initialization */
51*41480Smckusick 	int	(*gd_mode)();	/* misc functions */
52*41480Smckusick 	char	*gd_desc;	/* text description */
53*41480Smckusick };
54*41480Smckusick 
55*41480Smckusick /* hardware ids */
56*41480Smckusick #define GID_GATORBOX	1
57*41480Smckusick #define	GID_TOPCAT	2
58*41480Smckusick #define GID_RENAISSANCE	4
59*41480Smckusick #define GID_LRCATSEYE	5
60*41480Smckusick #define GID_HRCCATSEYE	6
61*41480Smckusick #define GID_HRMCATSEYE	7
62*41480Smckusick #define GID_DAVINCI	8
63*41480Smckusick 
64*41480Smckusick /* software ids defined in grfioctl.h */
65*41480Smckusick 
66*41480Smckusick /* requests to mode routine */
67*41480Smckusick #define GM_GRFON	1
68*41480Smckusick #define GM_GRFOFF	2
69*41480Smckusick #define GM_GRFOVON	3
70*41480Smckusick #define GM_GRFOVOFF	4
71*41480Smckusick 
72*41480Smckusick struct	grfreg {
73*41480Smckusick 	char	gr_pad0;
74*41480Smckusick 	u_char	gr_id;		/* +0x01 */
75*41480Smckusick 	char	gr_pad1[0x13];
76*41480Smckusick 	u_char	gr_id2;		/* +0x15 */
77*41480Smckusick 	char	gr_pad2[0x47];
78*41480Smckusick 	u_char	gr_fbomsb;	/* +0x5d */
79*41480Smckusick 	char	gr_pad3;
80*41480Smckusick 	u_char	gr_fbolsb;	/* +0x5f */
81*41480Smckusick };
82*41480Smckusick /* bitmapped display hardware id */
83*41480Smckusick #define GRFHWID		0x39
84*41480Smckusick 
85*41480Smckusick /* internal bitmapped display address */
86*41480Smckusick #define GRFIADDR	0x560000
87*41480Smckusick 
88*41480Smckusick /* minor device interpretation */
89*41480Smckusick #define GRFOVDEV	0x10	/* overlay planes */
90*41480Smckusick #define GRFIMDEV	0x20	/* images planes */
91*41480Smckusick #define GRFUNIT(d)	((d) & 0x7)
92*41480Smckusick 
93*41480Smckusick #ifdef KERNEL
94*41480Smckusick extern	struct grf_softc grf_softc[];
95*41480Smckusick #endif
96