FreeBSD/Linux Kernel Cross Reference
sys/chips/pm_defs.h
1 /*
2 * Mach Operating System
3 * Copyright (c) 1991,1990,1989 Carnegie Mellon University
4 * All Rights Reserved.
5 *
6 * Permission to use, copy, modify and distribute this software and its
7 * documentation is hereby granted, provided that both the copyright
8 * notice and this permission notice appear in all copies of the
9 * software, derivative works or modified versions, and any portions
10 * thereof, and that both notices appear in supporting documentation.
11 *
12 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
13 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
14 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
15 *
16 * Carnegie Mellon requests users of this software to return to
17 *
18 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
19 * School of Computer Science
20 * Carnegie Mellon University
21 * Pittsburgh PA 15213-3890
22 *
23 * any improvements or extensions that they make and grant Carnegie Mellon
24 * the rights to redistribute these changes.
25 */
26 /*
27 * HISTORY
28 * $Log: pm_defs.h,v $
29 * Revision 2.7 91/08/24 11:52:36 af
30 * Dropped predefines of frame sizes.
31 * [91/08/02 02:16:00 af]
32 *
33 * Revision 2.6 91/06/19 11:54:04 rvb
34 * mips->DECSTATION; vax->VAXSTATION
35 * [91/06/12 14:01:57 rvb]
36 *
37 * File moved here from mips/PMAX since it tries to be generic;
38 * it is used on the PMAX and the Vax3100.
39 * [91/06/04 rvb]
40 *
41 * Revision 2.5 91/05/14 17:25:16 mrt
42 * Correcting copyright
43 *
44 * Revision 2.4 91/02/05 17:43:06 mrt
45 * Added author notices
46 * [91/02/04 11:15:49 mrt]
47 *
48 * Changed to use new Mach copyright
49 * [91/02/02 12:14:35 mrt]
50 *
51 * Revision 2.3 90/12/05 23:33:14 af
52 * Cleanups.
53 * [90/12/03 23:30:06 af]
54 *
55 * Revision 2.1.1.1 90/11/01 03:36:24 af
56 * Created.
57 * [90/09/03 af]
58 */
59 /*
60 * File: pm_defs.h
61 * Author: Alessandro Forin, Carnegie Mellon University
62 * Date: 9/90
63 *
64 * Definitions specific to the "pm" simple framebuffer driver,
65 * exported across sub-modules. Some other framebuffer drivers
66 * that share code with pm use these defs also.
67 */
68
69 /* Hardware state (to be held in the screen descriptor) */
70
71 typedef struct {
72 char *cursor_registers; /* opaque, for sharing */
73 unsigned short cursor_state; /* some regs are W-only */
74 short unused; /* padding, free */
75 char *vdac_registers; /* opaque, for sharing */
76 unsigned char *framebuffer;
77 unsigned char *plane_mask;
78 } pm_softc_t;
79
80 extern pm_softc_t *pm_alloc(/* unit, curs, framebuf, planem */);
81
82 /* user mapping sizes */
83 #define USER_INFO_SIZE PAGE_SIZE
84 #define PMASK_SIZE PAGE_SIZE
85 #define BITMAP_SIZE(sc) \
86 ((sc)->frame_height * (((sc)->flags & COLOR_SCREEN) ? \
87 sc->frame_scanline_width : \
88 sc->frame_scanline_width>>3))
89
90 #define PM_SIZE(sc) (USER_INFO_SIZE+PMASK_SIZE+BITMAP_SIZE(sc))
Cache object: ade0aa3dc94fcb7b3ea603b6fc8095f8
|