1 /* (c) Itai Nahshon */ 2 3 #ifndef CIR_H 4 #define CIR_H 5 6 #include "xf86Cursor.h" 7 #ifdef HAVE_XAA_H 8 #include "xaa.h" 9 #endif 10 #include "xf86i2c.h" 11 #include <string.h> 12 #include <stdlib.h> 13 14 #include "compat-api.h" 15 #include "cir_pcirename.h" 16 17 /* Card-specific driver information */ 18 #define CIRPTR(p) ((CirPtr)((p)->driverPrivate)) 19 struct lgRec; 20 struct alpRec; 21 22 typedef struct { 23 ScrnInfoPtr pScrn; 24 CARD32 properties; 25 pciVideoPtr PciInfo; 26 #ifndef XSERVER_LIBPCIACCESS 27 PCITAG PciTag; 28 #endif 29 unsigned long PIOReg; 30 union { 31 struct lgRec *lg; 32 struct alpRec *alp; 33 } chip; 34 EntityInfoPtr pEnt; 35 int Chipset; 36 int ChipRev; 37 int Rounding; 38 int BppShift; 39 Bool HasFBitBlt; 40 CARD32 IOAddress; 41 CARD32 FbAddress; 42 void * IOBase; 43 void * FbBase; 44 long FbMapSize; 45 long IoMapSize; 46 int MinClock; 47 int MaxClock; 48 Bool NoAccel; 49 Bool HWCursor; 50 Bool UseMMIO; 51 #ifdef HAVE_XAA_H 52 XAAInfoRecPtr AccelInfoRec; 53 #endif 54 xf86CursorInfoPtr CursorInfoRec; 55 int DGAnumModes; 56 DGAModePtr DGAModes; 57 Bool DGAactive; 58 Bool (*DGAModeInit)(ScrnInfoPtr, DisplayModePtr); 59 int DGAViewportStatus; 60 I2CBusPtr I2CPtr1; 61 I2CBusPtr I2CPtr2; 62 CloseScreenProcPtr CloseScreen; 63 64 Bool CursorIsSkewed; 65 Bool shadowFB; 66 int rotate; 67 int ShadowPitch; 68 unsigned char * ShadowPtr; 69 void (*PointerMoved)(SCRN_ARG_TYPE arg, int x, int y); 70 int pitch; 71 72 unsigned char ** ScanlineColorExpandBuffers; 73 void (*InitAccel)(ScrnInfoPtr); 74 int offscreen_size; 75 int offscreen_offset; 76 OptionInfoPtr Options; 77 } CirRec, *CirPtr; 78 79 /* CirrusClk.c */ 80 extern Bool 81 CirrusFindClock(int *rfreq, int max_clock, int *num_out, int *den_out); 82 83 /* cir_driver.c */ 84 extern SymTabRec CIRChipsets[]; 85 extern PciChipsets CIRPciChipsets[]; 86 87 extern Bool CirMapMem(CirPtr pCir, int scrnIndex); 88 extern Bool CirUnmapMem(CirPtr pCir, int scrnIndex); 89 extern void cirProbeDDC(ScrnInfoPtr pScrn, int index); 90 91 /* cir_dga.c */ 92 extern Bool CirDGAInit(ScreenPtr pScreen); 93 94 /* in cir_shadow.c */ 95 void cirPointerMoved(SCRN_ARG_TYPE arg, int x, int y); 96 void cirRefreshArea(ScrnInfoPtr pScrn, int num, BoxPtr pbox); 97 void cirRefreshArea8(ScrnInfoPtr pScrn, int num, BoxPtr pbox); 98 void cirRefreshArea16(ScrnInfoPtr pScrn, int num, BoxPtr pbox); 99 void cirRefreshArea24(ScrnInfoPtr pScrn, int num, BoxPtr pbox); 100 void cirRefreshArea32(ScrnInfoPtr pScrn, int num, BoxPtr pbox); 101 102 /* properties */ 103 #define HWCUR64 0x1 104 #define ACCEL_AUTOSTART 0x2 105 106 #endif /* CIR_H */ 107