1 /* (c) Itai Nahshon */
2 
3 #ifndef ALP_H
4 #define ALP_H
5 
6 extern ScrnInfoPtr AlpProbe(int entity);
7 extern const OptionInfoRec *	AlpAvailableOptions(int chipid);
8 
9 # ifdef _ALP_PRIVATE_
10 /* Saved registers that are not part of the core VGA */
11 /* CRTC >= 0x19; Sequencer >= 0x05; Graphics >= 0x09; Attribute >= 0x15 */
12 
13 enum {
14 	/* CR regs */
15 	CR1A,
16 	CR1B,
17 	CR1D,
18 	/* SR regs */
19 	SR07,
20 	SR0E,
21 	SR12,
22 	SR13,
23 	SR17,
24 	SR1E,
25 	SR21,
26 	SR2D,
27 	/* GR regs */
28 	GR17,
29 	GR18,
30 	/* HDR */
31 	HDR,
32 	/* Must be last! */
33 	CIR_NSAVED
34 };
35 
36 typedef enum {LCD_NONE, LCD_DUAL_MONO, LCD_UNKNOWN, LCD_DSTN, LCD_TFT} LCDType;
37 
38 typedef struct {
39 	unsigned char	ExtVga[CIR_NSAVED];
40 } AlpRegRec, *AlpRegPtr;
41 
42 extern Bool AlpHWCursorInit(ScreenPtr pScreen, int size);
43 #ifdef HAVE_XAA_H
44 extern Bool AlpXAAInit(ScreenPtr pScreen);
45 extern Bool AlpXAAInitMMIO(ScreenPtr pScreen);
46 #endif
47 extern Bool AlpDGAInit(ScreenPtr pScreen);
48 extern Bool AlpI2CInit(ScrnInfoPtr pScrn);
49 
50 /* Card-specific driver information */
51 #define ALPPTR(p) ((AlpPtr)((p)->chip.alp))
52 
53 typedef 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