lg.h revision 76888252
1/* 2 * Common strutures and function for CL-GD546x -- The Laguna family 3 * 4 * lg.h 5 * 6 * (c) 1998 Corin Anderson. 7 * corina@the4cs.com 8 * Tukwila, WA 9 * 10 * Inspired by cir.h 11 */ 12 13/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/cirrus/lg.h,v 1.11 2000/12/06 15:35:16 eich Exp $ */ 14 15#ifndef LG_H 16#define LG_H 17#define LG_DEBUG 18 19extern ScrnInfoPtr LgProbe(int entity); 20extern const OptionInfoRec * LgAvailableOptions(int chipid); 21 22# ifdef _LG_PRIVATE_ 23 24/* Saved registers that are not part of the core VGA */ 25/* CRTC >= 0x19; Sequencer >= 0x05; Graphics >= 0x09; Attribute >= 0x15 */ 26 /* CR regs */ 27enum { 28 /* CR regs */ 29 CR1A, 30 CR1B, 31 CR1D, 32 CR1E, 33 /* SR regs */ 34 SR07, 35 SR0E, 36 SR12, 37 SR13, 38 SR1E, 39 /* Must be last! */ 40 LG_LAST_REG 41}; 42 43#undef FORMAT 44 45typedef struct { 46 unsigned char ExtVga[LG_LAST_REG]; 47 48 /* Laguna regs */ 49 CARD8 TILE, BCLK; 50 CARD16 FORMAT, DTTC, TileCtrl, CONTROL; 51 CARD32 VSC; 52} LgRegRec, *LgRegPtr; 53 54typedef struct { 55 int tilesPerLine; /* Number of tiles per line */ 56 int pitch; /* Display pitch, in bytes */ 57 int width; /* Tile width. 0 = 128 byte 1 = 256 byte */ 58} LgLineDataRec, *LgLineDataPtr; 59 60 61/* lg_driver.c */ 62extern LgLineDataRec LgLineData[]; 63 64/* lg_xaa.c */ 65extern Bool LgXAAInit(ScreenPtr pScreen); 66 67/* lg_hwcurs.c */ 68extern Bool LgHWCursorInit(ScreenPtr pScreen); 69extern void LgHideCursor(ScrnInfoPtr pScrn); 70extern void LgShowCursor(ScrnInfoPtr pScrn); 71 72/* lg_i2c.c */ 73extern Bool LgI2CInit(ScrnInfoPtr pScrn); 74 75#define memrb(off) MMIO_IN8(pCir->IOBase,off) 76#define memrw(off) MMIO_IN16(pCir->IOBase,off) 77#define memrl(off) MMIO_IN32(pCir->IOBase,off) 78#define memwb(off,val) MMIO_OUT8(pCir->IOBase,off,val) 79#define memww(off,val) MMIO_OUT16(pCir->IOBase,off,val) 80#define memwl(off,val) MMIO_OUT32(pCir->IOBase,off,val) 81 82/* Card-specific driver information */ 83#define LGPTR(p) ((LgPtr)((p)->chip.lg)) 84 85typedef struct lgRec { 86 CARD32 HWCursorAddr; 87 int HWCursorImageX; 88 int HWCursorImageY; 89 int HWCursorTileWidth; 90 int HWCursorTileHeight; 91 92 int lineDataIndex; 93 94 int memInterleave; 95 96 LgRegRec SavedReg; 97 LgRegRec ModeReg; 98 99 CARD32 oldBitmask; 100 Bool blitTransparent; 101 int blitYDir; 102} LgRec, *LgPtr; 103 104# endif /* _LG_PRIVATE_ */ 105#endif /* LG_H */ 106 107 108 109 110 111