2
* Id: chips.h,v 1.2 1999/11/02 08:17:24 keithp Exp $
4
* Copyright � 1999 Keith Packard
6
* Permission to use, copy, modify, distribute, and sell this software and its
7
* documentation for any purpose is hereby granted without fee, provided that
8
* the above copyright notice appear in all copies and that both that
9
* copyright notice and this permission notice appear in supporting
10
* documentation, and that the name of Keith Packard not be used in
11
* advertising or publicity pertaining to distribution of the software without
12
* specific, written prior permission. Keith Packard makes no
13
* representations about the suitability of this software for any purpose. It
14
* is provided "as is" without express or implied warranty.
16
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
18
* EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
19
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
20
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
21
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
22
* PERFORMANCE OF THIS SOFTWARE.
24
/* $RCSId: xc/programs/Xserver/hw/kdrive/chips/chips.h,v 1.9 2000/11/29 08:42:25 keithp Exp $ */
31
* offset from ioport beginning
36
#define CHIPS_MMIO_BASE(c) ((c)->vesa.fb_phys + 0x400000)
38
#define CHIPS_MMIO_BASE(c) ((c)->vesa.fb_phys + 0x200000)
40
#define CHIPS_MMIO_SIZE(c) (0x20000)
42
typedef volatile CARD8 VOL8;
43
typedef volatile CARD16 VOL16;
44
typedef volatile CARD32 VOL32;
46
typedef struct _chipsSave {
50
typedef struct _chipsCardInfo {
57
#define getChipsCardInfo(kd) ((ChipsCardInfo *) ((kd)->card->driver))
58
#define chipsCardInfo(kd) ChipsCardInfo *chipsc = getChipsCardInfo(kd)
60
typedef struct _chipsCursor {
68
#define CHIPS_CURSOR_WIDTH 64
69
#define CHIPS_CURSOR_HEIGHT 64
71
typedef struct _chipsScreenInfo {
72
VesaScreenPrivRec vesa;
82
#define getChipsScreenInfo(kd) ((ChipsScreenInfo *) ((kd)->screen->driver))
83
#define chipsScreenInfo(kd) ChipsScreenInfo *chipss = getChipsScreenInfo(kd)
86
chipsDrawInit (ScreenPtr pScreen);
89
chipsDrawEnable (ScreenPtr pScreen);
92
chipsDrawDisable (ScreenPtr pScreen);
95
chipsDrawFini (ScreenPtr pScreen);
98
chipsReadXR (ChipsScreenInfo *chipsc, CARD8 index);
101
chipsWriteXR (ChipsScreenInfo *chipsc, CARD8 index, CARD8 value);
104
chipsCursorInit (ScreenPtr pScreen);
107
chipsCursorEnable (ScreenPtr pScreen);
110
chipsCursorDisable (ScreenPtr pScreen);
113
chipsCursorFini (ScreenPtr pScreen);
116
chipsRecolorCursor (ScreenPtr pScreen, int ndef, xColorItem *pdef);
118
extern KdCardFuncs chipsFuncs;
120
#endif /* _CHIPS_H_ */