diff options
author | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-26 22:48:59 +0000 |
---|---|---|
committer | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-26 22:48:59 +0000 |
commit | b56dd6bacff59e17249b5a1427f99edf93657f30 (patch) | |
tree | 35b54cb736b90c40f13185173092c178038b7e8c /src/nv_type.h | |
parent | 6962e55a393c6b1cddf6b23f9c39842234b4ef7d (diff) |
merge latest (4.3.99.16) from XFree86 (vendor) branch
Diffstat (limited to 'src/nv_type.h')
-rw-r--r-- | src/nv_type.h | 149 |
1 files changed, 90 insertions, 59 deletions
diff --git a/src/nv_type.h b/src/nv_type.h index 9e9e2bd..5730cb5 100644 --- a/src/nv_type.h +++ b/src/nv_type.h @@ -1,15 +1,19 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_type.h,v 1.39 2002/11/28 23:02:13 mvojkovi Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_type.h,v 1.44 2003/09/08 20:00:27 mvojkovi Exp $ */ #ifndef __NV_STRUCT_H__ #define __NV_STRUCT_H__ -#include "riva_hw.h" #include "colormapst.h" #include "vgaHW.h" #include "xaa.h" #include "xf86Cursor.h" #include "xf86int10.h" +#define NV_ARCH_04 0x04 +#define NV_ARCH_10 0x10 +#define NV_ARCH_20 0x20 +#define NV_ARCH_30 0x30 + #define BITMASK(t,b) (((unsigned)(1U << (((t)-(b)+1)))-1) << (b)) #define MASKEXPAND(mask) BITMASK(1?mask,0?mask) @@ -19,27 +23,6 @@ #define SetBit(n) (1<<(n)) #define Set8Bits(value) ((value)&0xff) -typedef RIVA_HW_STATE* NVRegPtr; - -typedef struct { - Bool isHwCursor; - int CursorMaxWidth; - int CursorMaxHeight; - int CursorFlags; - int CursorOffscreenMemSize; - Bool (*UseHWCursor)(ScreenPtr, CursorPtr); - void (*LoadCursorImage)(ScrnInfoPtr, unsigned char*); - void (*ShowCursor)(ScrnInfoPtr); - void (*HideCursor)(ScrnInfoPtr); - void (*SetCursorPosition)(ScrnInfoPtr, int, int); - void (*SetCursorColors)(ScrnInfoPtr, int, int); - long maxPixelClock; - void (*LoadPalette)(ScrnInfoPtr, int, int*, LOCO*, VisualPtr); - void (*Save)(ScrnInfoPtr, vgaRegPtr, NVRegPtr, Bool); - void (*Restore)(ScrnInfoPtr, vgaRegPtr, NVRegPtr, Bool); - Bool (*ModeInit)(ScrnInfoPtr, DisplayModePtr); -} NVRamdacRec, *NVRamdacPtr; - typedef struct { int bitsPerPixel; int depth; @@ -48,88 +31,136 @@ typedef struct { DisplayModePtr mode; } NVFBLayout; +typedef struct _riva_hw_state +{ + U032 bpp; + U032 width; + U032 height; + U032 interlace; + U032 repaint0; + U032 repaint1; + U032 screen; + U032 scale; + U032 dither; + U032 extra; + U032 pixel; + U032 horiz; + U032 arbitration0; + U032 arbitration1; + U032 pll; + U032 pllB; + U032 vpll; + U032 vpll2; + U032 vpllB; + U032 vpll2B; + U032 pllsel; + U032 general; + U032 crtcOwner; + U032 head; + U032 head2; + U032 config; + U032 cursorConfig; + U032 cursor0; + U032 cursor1; + U032 cursor2; +} RIVA_HW_STATE, *NVRegPtr; + + typedef struct { - RIVA_HW_INST riva; RIVA_HW_STATE SavedReg; RIVA_HW_STATE ModeReg; + RIVA_HW_STATE *CurrentState; + CARD32 Architecture; + CARD32 CursorStart; EntityInfoPtr pEnt; pciVideoPtr PciInfo; PCITAG PciTag; - xf86AccessRec Access; int Chipset; int ChipRev; Bool Primary; CARD32 IOAddress; unsigned long FbAddress; - int FbBaseReg; - unsigned char * IOBase; unsigned char * FbBase; unsigned char * FbStart; - long FbMapSize; - long FbUsableSize; - NVRamdacRec Dac; + CARD32 FbMapSize; + CARD32 FbUsableSize; + CARD32 ScratchBufferSize; + CARD32 ScratchBufferStart; Bool NoAccel; Bool HWCursor; - Bool ShowCache; Bool ShadowFB; unsigned char * ShadowPtr; int ShadowPitch; - int MinClock; - int MaxClock; + CARD32 MinVClockFreqKHz; + CARD32 MaxVClockFreqKHz; + CARD32 CrystalFreqKHz; + CARD32 RamAmountKBytes; + + volatile U032 *REGS; + volatile U032 *PCRTC0; + volatile U032 *PCRTC; + volatile U032 *PRAMDAC0; + volatile U032 *PFB; + volatile U032 *PFIFO; + volatile U032 *PGRAPH; + volatile U032 *PEXTDEV; + volatile U032 *PTIMER; + volatile U032 *PMC; + volatile U032 *PRAMIN; + volatile U032 *FIFO; + volatile U032 *CURSOR; + volatile U008 *PCIO0; + volatile U008 *PCIO; + volatile U008 *PVIO; + volatile U008 *PDIO0; + volatile U008 *PDIO; + volatile U032 *PRAMDAC; + XAAInfoRecPtr AccelInfoRec; xf86CursorInfoPtr CursorInfoRec; DGAModePtr DGAModes; int numDGAModes; Bool DGAactive; int DGAViewportStatus; - void (*Save)(ScrnInfoPtr, vgaRegPtr, NVRegPtr, Bool); - void (*Restore)(ScrnInfoPtr, vgaRegPtr, NVRegPtr, Bool); - Bool (*ModeInit)(ScrnInfoPtr, DisplayModePtr); void (*PointerMoved)(int index, int x, int y); ScreenBlockHandlerProcPtr BlockHandler; CloseScreenProcPtr CloseScreen; Bool FBDev; - /* Color expansion */ - unsigned char *expandBuffer; - unsigned char *expandFifo; - int expandWidth; - int expandRows; - CARD32 FgColor; - CARD32 BgColor; int Rotate; NVFBLayout CurrentLayout; /* Cursor */ CARD32 curFg, curBg; CARD32 curImage[256]; - /* Misc flags */ - unsigned int opaqueMonochrome; - int currentRop; /* I2C / DDC */ - unsigned int (*ddc1Read)(ScrnInfoPtr); - void (*DDC1SetSpeed)(ScrnInfoPtr, xf86ddcSpeed); - Bool (*i2cInit)(ScrnInfoPtr); I2CBusPtr I2C; xf86Int10InfoPtr pInt; void (*VideoTimerCallback)(ScrnInfoPtr, Time); + void (*DMAKickoffCallback)(ScrnInfoPtr); XF86VideoAdaptorPtr overlayAdaptor; + XF86VideoAdaptorPtr blitAdaptor; int videoKey; int FlatPanel; Bool FPDither; - Bool SecondCRTC; - int forceCRTC; + Bool Television; + int CRTCnumber; OptionInfoPtr Options; Bool alphaCursor; unsigned char DDCBase; -} NVRec, *NVPtr; + Bool twoHeads; + Bool twoStagePLL; + Bool fpScaler; + int fpWidth; + int fpHeight; -#define NVPTR(p) ((NVPtr)((p)->driverPrivate)) + CARD32 dmaPut; + CARD32 dmaCurrent; + CARD32 dmaFree; + CARD32 dmaMax; + CARD32 *dmaBase; -void NVRefreshArea(ScrnInfoPtr pScrn, int num, BoxPtr pbox); -void NVRefreshArea8(ScrnInfoPtr pScrn, int num, BoxPtr pbox); -void NVRefreshArea16(ScrnInfoPtr pScrn, int num, BoxPtr pbox); -void NVRefreshArea32(ScrnInfoPtr pScrn, int num, BoxPtr pbox); -void NVPointerMoved(int index, int x, int y); + CARD32 currentRop; +} NVRec, *NVPtr; -int RivaGetConfig(NVPtr); +#define NVPTR(p) ((NVPtr)((p)->driverPrivate)) #endif /* __NV_STRUCT_H__ */ |