alp.h revision 1ae1b5e8
1/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp.h,v 1.8 2001/10/01 13:44:05 eich Exp $ */
2
3/* (c) Itai Nahshon */
4
5#ifndef ALP_H
6#define ALP_H
7
8extern ScrnInfoPtr AlpProbe(int entity);
9extern const OptionInfoRec *	AlpAvailableOptions(int chipid);
10
11# ifdef _ALP_PRIVATE_
12/* Saved registers that are not part of the core VGA */
13/* CRTC >= 0x19; Sequencer >= 0x05; Graphics >= 0x09; Attribute >= 0x15 */
14
15enum {
16	/* CR regs */
17	CR1A,
18	CR1B,
19	CR1D,
20	/* SR regs */
21	SR07,
22	SR0E,
23	SR12,
24	SR13,
25	SR17,
26	SR1E,
27	SR21,
28	SR2D,
29	/* GR regs */
30	GR17,
31	GR18,
32	/* HDR */
33	HDR,
34	/* Must be last! */
35	CIR_NSAVED
36};
37
38typedef enum {LCD_NONE, LCD_DUAL_MONO, LCD_UNKNOWN, LCD_DSTN, LCD_TFT} LCDType;
39
40typedef struct {
41	unsigned char	ExtVga[CIR_NSAVED];
42} AlpRegRec, *AlpRegPtr;
43
44extern Bool AlpHWCursorInit(ScreenPtr pScreen, int size);
45extern Bool AlpXAAInit(ScreenPtr pScreen);
46extern Bool AlpXAAInitMMIO(ScreenPtr pScreen);
47extern Bool AlpDGAInit(ScreenPtr pScreen);
48extern Bool AlpI2CInit(ScrnInfoPtr pScrn);
49
50/* Card-specific driver information */
51#define ALPPTR(p) ((AlpPtr)((p)->chip.alp))
52
53typedef struct alpRec {
54	unsigned char * HWCursorBits;
55	unsigned char *	CursorBits;
56
57	AlpRegRec		SavedReg;
58	AlpRegRec		ModeReg;
59        LCDType                 lcdType;
60        int                     lcdWidth, lcdHeight;
61        int                 CursorWidth;
62        int                 CursorHeight;
63        int                 waitMsk;
64        int                 scanlineDest;
65        int                 scanlineCount;
66        int                 scanlineWidth;
67
68        int                 SubsequentColorExpandScanlineDest;
69        int                 SubsequentColorExpandScanlineByteWidth;
70        int                 SubsequentColorExpandScanlineDWordWidth;
71
72        /* Offset into framebuffer of a 8-byte scratch area for fills */
73        CARD32 monoPattern8x8;
74
75        Bool                autoStart;
76
77	/* MMIO Base for BitBLT operation. This is
78	   IOBase for 5446 and 7548, IOBase+0x100 for 5480 */
79	unsigned char *	    BLTBase;
80        CARD32              transRop;
81/* XXX For XF86Config based mem configuration */
82	CARD32			sr0f, sr17;
83} AlpRec, *AlpPtr;
84
85# endif /* _ALP_PRIVATE_ */
86#endif /* ALP_H */
87
88