0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #define NEO_BS0_BLT_BUSY 0x00000001
0012 #define NEO_BS0_FIFO_AVAIL 0x00000002
0013 #define NEO_BS0_FIFO_PEND 0x00000004
0014
0015 #define NEO_BC0_DST_Y_DEC 0x00000001
0016 #define NEO_BC0_X_DEC 0x00000002
0017 #define NEO_BC0_SRC_TRANS 0x00000004
0018 #define NEO_BC0_SRC_IS_FG 0x00000008
0019 #define NEO_BC0_SRC_Y_DEC 0x00000010
0020 #define NEO_BC0_FILL_PAT 0x00000020
0021 #define NEO_BC0_SRC_MONO 0x00000040
0022 #define NEO_BC0_SYS_TO_VID 0x00000080
0023
0024 #define NEO_BC1_DEPTH8 0x00000100
0025 #define NEO_BC1_DEPTH16 0x00000200
0026 #define NEO_BC1_X_320 0x00000400
0027 #define NEO_BC1_X_640 0x00000800
0028 #define NEO_BC1_X_800 0x00000c00
0029 #define NEO_BC1_X_1024 0x00001000
0030 #define NEO_BC1_X_1152 0x00001400
0031 #define NEO_BC1_X_1280 0x00001800
0032 #define NEO_BC1_X_1600 0x00001c00
0033 #define NEO_BC1_DST_TRANS 0x00002000
0034 #define NEO_BC1_MSTR_BLT 0x00004000
0035 #define NEO_BC1_FILTER_Z 0x00008000
0036
0037 #define NEO_BC2_WR_TR_DST 0x00800000
0038
0039 #define NEO_BC3_SRC_XY_ADDR 0x01000000
0040 #define NEO_BC3_DST_XY_ADDR 0x02000000
0041 #define NEO_BC3_CLIP_ON 0x04000000
0042 #define NEO_BC3_FIFO_EN 0x08000000
0043 #define NEO_BC3_BLT_ON_ADDR 0x10000000
0044 #define NEO_BC3_SKIP_MAPPING 0x80000000
0045
0046 #define NEO_MODE1_DEPTH8 0x0100
0047 #define NEO_MODE1_DEPTH16 0x0200
0048 #define NEO_MODE1_DEPTH24 0x0300
0049 #define NEO_MODE1_X_320 0x0400
0050 #define NEO_MODE1_X_640 0x0800
0051 #define NEO_MODE1_X_800 0x0c00
0052 #define NEO_MODE1_X_1024 0x1000
0053 #define NEO_MODE1_X_1152 0x1400
0054 #define NEO_MODE1_X_1280 0x1800
0055 #define NEO_MODE1_X_1600 0x1c00
0056 #define NEO_MODE1_BLT_ON_ADDR 0x2000
0057
0058
0059 #define NEOREG_CURSCNTL 0x00
0060 #define NEOREG_CURSX 0x04
0061 #define NEOREG_CURSY 0x08
0062 #define NEOREG_CURSBGCOLOR 0x0C
0063 #define NEOREG_CURSFGCOLOR 0x10
0064 #define NEOREG_CURSMEMPOS 0x14
0065
0066 #define NEO_CURS_DISABLE 0x00000000
0067 #define NEO_CURS_ENABLE 0x00000001
0068 #define NEO_ICON64_ENABLE 0x00000008
0069 #define NEO_ICON128_ENABLE 0x0000000C
0070 #define NEO_ICON_BLANK 0x00000010
0071
0072 #define NEO_GR01_SUPPRESS_VSYNC 0x10
0073 #define NEO_GR01_SUPPRESS_HSYNC 0x20
0074
0075 #ifdef __KERNEL__
0076
0077 #ifdef NEOFB_DEBUG
0078 # define DBG(x) printk (KERN_DEBUG "neofb: %s\n", (x));
0079 #else
0080 # define DBG(x)
0081 #endif
0082
0083 #define PCI_CHIP_NM2070 0x0001
0084 #define PCI_CHIP_NM2090 0x0002
0085 #define PCI_CHIP_NM2093 0x0003
0086 #define PCI_CHIP_NM2097 0x0083
0087 #define PCI_CHIP_NM2160 0x0004
0088 #define PCI_CHIP_NM2200 0x0005
0089 #define PCI_CHIP_NM2230 0x0025
0090 #define PCI_CHIP_NM2360 0x0006
0091 #define PCI_CHIP_NM2380 0x0016
0092
0093
0094
0095 typedef volatile struct {
0096 __u32 bltStat;
0097 __u32 bltCntl;
0098 __u32 xpColor;
0099 __u32 fgColor;
0100 __u32 bgColor;
0101 __u32 pitch;
0102 __u32 clipLT;
0103 __u32 clipRB;
0104 __u32 srcBitOffset;
0105 __u32 srcStart;
0106 __u32 reserved0;
0107 __u32 dstStart;
0108 __u32 xyExt;
0109
0110 __u32 reserved1[19];
0111
0112 __u32 pageCntl;
0113 __u32 pageBase;
0114 __u32 postBase;
0115 __u32 postPtr;
0116 __u32 dataPtr;
0117 } Neo2200;
0118
0119 #define MMIO_SIZE 0x200000
0120
0121 #define NEO_EXT_CR_MAX 0x85
0122 #define NEO_EXT_GR_MAX 0xC7
0123
0124 struct neofb_par {
0125 struct vgastate state;
0126 unsigned int ref_count;
0127
0128 unsigned char MiscOutReg;
0129 unsigned char CRTC[25];
0130 unsigned char Sequencer[5];
0131 unsigned char Graphics[9];
0132 unsigned char Attribute[21];
0133
0134 unsigned char GeneralLockReg;
0135 unsigned char ExtCRTDispAddr;
0136 unsigned char ExtCRTOffset;
0137 unsigned char SysIfaceCntl1;
0138 unsigned char SysIfaceCntl2;
0139 unsigned char ExtColorModeSelect;
0140 unsigned char biosMode;
0141
0142 unsigned char PanelDispCntlReg1;
0143 unsigned char PanelDispCntlReg2;
0144 unsigned char PanelDispCntlReg3;
0145 unsigned char PanelDispCntlRegRead;
0146 unsigned char PanelVertCenterReg1;
0147 unsigned char PanelVertCenterReg2;
0148 unsigned char PanelVertCenterReg3;
0149 unsigned char PanelVertCenterReg4;
0150 unsigned char PanelVertCenterReg5;
0151 unsigned char PanelHorizCenterReg1;
0152 unsigned char PanelHorizCenterReg2;
0153 unsigned char PanelHorizCenterReg3;
0154 unsigned char PanelHorizCenterReg4;
0155 unsigned char PanelHorizCenterReg5;
0156
0157 int ProgramVCLK;
0158 unsigned char VCLK3NumeratorLow;
0159 unsigned char VCLK3NumeratorHigh;
0160 unsigned char VCLK3Denominator;
0161 unsigned char VerticalExt;
0162 int wc_cookie;
0163 u8 __iomem *mmio_vbase;
0164 u8 cursorOff;
0165 u8 *cursorPad;
0166
0167 Neo2200 __iomem *neo2200;
0168
0169
0170 int NeoPanelWidth;
0171 int NeoPanelHeight;
0172
0173 int maxClock;
0174
0175 int pci_burst;
0176 int lcd_stretch;
0177 int internal_display;
0178 int external_display;
0179 int libretto;
0180 u32 palette[16];
0181 };
0182
0183 typedef struct {
0184 int x_res;
0185 int y_res;
0186 int mode;
0187 } biosMode;
0188
0189 #endif