0001
0002
0003 #define NV04_PFB_BOOT_0 0x00100000
0004 # define NV04_PFB_BOOT_0_RAM_AMOUNT 0x00000003
0005 # define NV04_PFB_BOOT_0_RAM_AMOUNT_32MB 0x00000000
0006 # define NV04_PFB_BOOT_0_RAM_AMOUNT_4MB 0x00000001
0007 # define NV04_PFB_BOOT_0_RAM_AMOUNT_8MB 0x00000002
0008 # define NV04_PFB_BOOT_0_RAM_AMOUNT_16MB 0x00000003
0009 # define NV04_PFB_BOOT_0_RAM_WIDTH_128 0x00000004
0010 # define NV04_PFB_BOOT_0_RAM_TYPE 0x00000028
0011 # define NV04_PFB_BOOT_0_RAM_TYPE_SGRAM_8MBIT 0x00000000
0012 # define NV04_PFB_BOOT_0_RAM_TYPE_SGRAM_16MBIT 0x00000008
0013 # define NV04_PFB_BOOT_0_RAM_TYPE_SGRAM_16MBIT_4BANK 0x00000010
0014 # define NV04_PFB_BOOT_0_RAM_TYPE_SDRAM_16MBIT 0x00000018
0015 # define NV04_PFB_BOOT_0_RAM_TYPE_SDRAM_64MBIT 0x00000020
0016 # define NV04_PFB_BOOT_0_RAM_TYPE_SDRAM_64MBITX16 0x00000028
0017 # define NV04_PFB_BOOT_0_UMA_ENABLE 0x00000100
0018 # define NV04_PFB_BOOT_0_UMA_SIZE 0x0000f000
0019 #define NV04_PFB_DEBUG_0 0x00100080
0020 # define NV04_PFB_DEBUG_0_PAGE_MODE 0x00000001
0021 # define NV04_PFB_DEBUG_0_REFRESH_OFF 0x00000010
0022 # define NV04_PFB_DEBUG_0_REFRESH_COUNTX64 0x00003f00
0023 # define NV04_PFB_DEBUG_0_REFRESH_SLOW_CLK 0x00004000
0024 # define NV04_PFB_DEBUG_0_SAFE_MODE 0x00008000
0025 # define NV04_PFB_DEBUG_0_ALOM_ENABLE 0x00010000
0026 # define NV04_PFB_DEBUG_0_CASOE 0x00100000
0027 # define NV04_PFB_DEBUG_0_CKE_INVERT 0x10000000
0028 # define NV04_PFB_DEBUG_0_REFINC 0x20000000
0029 # define NV04_PFB_DEBUG_0_SAVE_POWER_OFF 0x40000000
0030 #define NV04_PFB_CFG0 0x00100200
0031 # define NV04_PFB_CFG0_SCRAMBLE 0x20000000
0032 #define NV04_PFB_CFG1 0x00100204
0033 #define NV04_PFB_FIFO_DATA 0x0010020c
0034 # define NV10_PFB_FIFO_DATA_RAM_AMOUNT_MB_MASK 0xfff00000
0035 # define NV10_PFB_FIFO_DATA_RAM_AMOUNT_MB_SHIFT 20
0036 #define NV10_PFB_REFCTRL 0x00100210
0037 # define NV10_PFB_REFCTRL_VALID_1 (1 << 31)
0038 #define NV04_PFB_PAD 0x0010021c
0039 # define NV04_PFB_PAD_CKE_NORMAL (1 << 0)
0040 #define NV10_PFB_TILE(i) (0x00100240 + (i*16))
0041 #define NV10_PFB_TILE__SIZE 8
0042 #define NV10_PFB_TLIMIT(i) (0x00100244 + (i*16))
0043 #define NV10_PFB_TSIZE(i) (0x00100248 + (i*16))
0044 #define NV10_PFB_TSTATUS(i) (0x0010024c + (i*16))
0045 #define NV04_PFB_REF 0x001002d0
0046 # define NV04_PFB_REF_CMD_REFRESH (1 << 0)
0047 #define NV04_PFB_PRE 0x001002d4
0048 # define NV04_PFB_PRE_CMD_PRECHARGE (1 << 0)
0049 #define NV20_PFB_ZCOMP(i) (0x00100300 + 4*(i))
0050 # define NV20_PFB_ZCOMP_MODE_32 (4 << 24)
0051 # define NV20_PFB_ZCOMP_EN (1 << 31)
0052 # define NV25_PFB_ZCOMP_MODE_16 (1 << 20)
0053 # define NV25_PFB_ZCOMP_MODE_32 (2 << 20)
0054 #define NV10_PFB_CLOSE_PAGE2 0x0010033c
0055 #define NV04_PFB_SCRAMBLE(i) (0x00100400 + 4 * (i))
0056 #define NV40_PFB_TILE(i) (0x00100600 + (i*16))
0057 #define NV40_PFB_TILE__SIZE_0 12
0058 #define NV40_PFB_TILE__SIZE_1 15
0059 #define NV40_PFB_TLIMIT(i) (0x00100604 + (i*16))
0060 #define NV40_PFB_TSIZE(i) (0x00100608 + (i*16))
0061 #define NV40_PFB_TSTATUS(i) (0x0010060c + (i*16))
0062 #define NV40_PFB_UNK_800 0x00100800
0063
0064 #define NV_PEXTDEV_BOOT_0 0x00101000
0065 #define NV_PEXTDEV_BOOT_0_RAMCFG 0x0000003c
0066 # define NV_PEXTDEV_BOOT_0_STRAP_FP_IFACE_12BIT (8 << 12)
0067 #define NV_PEXTDEV_BOOT_3 0x0010100c
0068
0069 #define NV_RAMIN 0x00700000
0070
0071 #define NV_RAMHT_HANDLE_OFFSET 0
0072 #define NV_RAMHT_CONTEXT_OFFSET 4
0073 # define NV_RAMHT_CONTEXT_VALID (1<<31)
0074 # define NV_RAMHT_CONTEXT_CHANNEL_SHIFT 24
0075 # define NV_RAMHT_CONTEXT_ENGINE_SHIFT 16
0076 # define NV_RAMHT_CONTEXT_ENGINE_SW 0
0077 # define NV_RAMHT_CONTEXT_ENGINE_GRAPHICS 1
0078 # define NV_RAMHT_CONTEXT_INSTANCE_SHIFT 0
0079 # define NV40_RAMHT_CONTEXT_CHANNEL_SHIFT 23
0080 # define NV40_RAMHT_CONTEXT_ENGINE_SHIFT 20
0081 # define NV40_RAMHT_CONTEXT_INSTANCE_SHIFT 0
0082
0083
0084 #define NV_CLASS_DMA_FROM_MEMORY 0x00000002
0085 #define NV_CLASS_DMA_TO_MEMORY 0x00000003
0086 #define NV_CLASS_NULL 0x00000030
0087 #define NV_CLASS_DMA_IN_MEMORY 0x0000003D
0088
0089 #define NV03_USER(i) (0x00800000+(i*NV03_USER_SIZE))
0090 #define NV03_USER__SIZE 16
0091 #define NV10_USER__SIZE 32
0092 #define NV03_USER_SIZE 0x00010000
0093 #define NV03_USER_DMA_PUT(i) (0x00800040+(i*NV03_USER_SIZE))
0094 #define NV03_USER_DMA_PUT__SIZE 16
0095 #define NV10_USER_DMA_PUT__SIZE 32
0096 #define NV03_USER_DMA_GET(i) (0x00800044+(i*NV03_USER_SIZE))
0097 #define NV03_USER_DMA_GET__SIZE 16
0098 #define NV10_USER_DMA_GET__SIZE 32
0099 #define NV03_USER_REF_CNT(i) (0x00800048+(i*NV03_USER_SIZE))
0100 #define NV03_USER_REF_CNT__SIZE 16
0101 #define NV10_USER_REF_CNT__SIZE 32
0102
0103 #define NV40_USER(i) (0x00c00000+(i*NV40_USER_SIZE))
0104 #define NV40_USER_SIZE 0x00001000
0105 #define NV40_USER_DMA_PUT(i) (0x00c00040+(i*NV40_USER_SIZE))
0106 #define NV40_USER_DMA_PUT__SIZE 32
0107 #define NV40_USER_DMA_GET(i) (0x00c00044+(i*NV40_USER_SIZE))
0108 #define NV40_USER_DMA_GET__SIZE 32
0109 #define NV40_USER_REF_CNT(i) (0x00c00048+(i*NV40_USER_SIZE))
0110 #define NV40_USER_REF_CNT__SIZE 32
0111
0112 #define NV50_USER(i) (0x00c00000+(i*NV50_USER_SIZE))
0113 #define NV50_USER_SIZE 0x00002000
0114 #define NV50_USER_DMA_PUT(i) (0x00c00040+(i*NV50_USER_SIZE))
0115 #define NV50_USER_DMA_PUT__SIZE 128
0116 #define NV50_USER_DMA_GET(i) (0x00c00044+(i*NV50_USER_SIZE))
0117 #define NV50_USER_DMA_GET__SIZE 128
0118 #define NV50_USER_REF_CNT(i) (0x00c00048+(i*NV50_USER_SIZE))
0119 #define NV50_USER_REF_CNT__SIZE 128
0120
0121 #define NV03_FIFO_SIZE 0x8000UL
0122
0123 #define NV03_PMC_BOOT_0 0x00000000
0124 #define NV03_PMC_BOOT_1 0x00000004
0125 #define NV03_PMC_INTR_0 0x00000100
0126 # define NV_PMC_INTR_0_PFIFO_PENDING (1<<8)
0127 # define NV_PMC_INTR_0_PGRAPH_PENDING (1<<12)
0128 # define NV_PMC_INTR_0_NV50_I2C_PENDING (1<<21)
0129 # define NV_PMC_INTR_0_CRTC0_PENDING (1<<24)
0130 # define NV_PMC_INTR_0_CRTC1_PENDING (1<<25)
0131 # define NV_PMC_INTR_0_NV50_DISPLAY_PENDING (1<<26)
0132 # define NV_PMC_INTR_0_CRTCn_PENDING (3<<24)
0133 #define NV03_PMC_INTR_EN_0 0x00000140
0134 # define NV_PMC_INTR_EN_0_MASTER_ENABLE (1<<0)
0135 #define NV03_PMC_ENABLE 0x00000200
0136 # define NV_PMC_ENABLE_PFIFO (1<<8)
0137 # define NV_PMC_ENABLE_PGRAPH (1<<12)
0138
0139
0140
0141 # define NV_PMC_ENABLE_UNK13 (1<<13)
0142 #define NV40_PMC_GRAPH_UNITS 0x00001540
0143 #define NV40_PMC_BACKLIGHT 0x000015f0
0144 # define NV40_PMC_BACKLIGHT_MASK 0x001f0000
0145 #define NV40_PMC_1700 0x00001700
0146 #define NV40_PMC_1704 0x00001704
0147 #define NV40_PMC_1708 0x00001708
0148 #define NV40_PMC_170C 0x0000170C
0149
0150
0151 #define NV50_PUNK_BAR0_PRAMIN 0x00001700
0152 #define NV50_PUNK_BAR_CFG_BASE 0x00001704
0153 #define NV50_PUNK_BAR_CFG_BASE_VALID (1<<30)
0154 #define NV50_PUNK_BAR1_CTXDMA 0x00001708
0155 #define NV50_PUNK_BAR1_CTXDMA_VALID (1<<31)
0156 #define NV50_PUNK_BAR3_CTXDMA 0x0000170C
0157 #define NV50_PUNK_BAR3_CTXDMA_VALID (1<<31)
0158 #define NV50_PUNK_UNK1710 0x00001710
0159
0160 #define NV04_PBUS_PCI_NV_1 0x00001804
0161 #define NV04_PBUS_PCI_NV_19 0x0000184C
0162 #define NV04_PBUS_PCI_NV_20 0x00001850
0163 # define NV04_PBUS_PCI_NV_20_ROM_SHADOW_DISABLED (0 << 0)
0164 # define NV04_PBUS_PCI_NV_20_ROM_SHADOW_ENABLED (1 << 0)
0165
0166 #define NV04_PTIMER_INTR_0 0x00009100
0167 #define NV04_PTIMER_INTR_EN_0 0x00009140
0168 #define NV04_PTIMER_NUMERATOR 0x00009200
0169 #define NV04_PTIMER_DENOMINATOR 0x00009210
0170 #define NV04_PTIMER_TIME_0 0x00009400
0171 #define NV04_PTIMER_TIME_1 0x00009410
0172 #define NV04_PTIMER_ALARM_0 0x00009420
0173
0174 #define NV04_PGRAPH_DEBUG_0 0x00400080
0175 #define NV04_PGRAPH_DEBUG_1 0x00400084
0176 #define NV04_PGRAPH_DEBUG_2 0x00400088
0177 #define NV04_PGRAPH_DEBUG_3 0x0040008c
0178 #define NV10_PGRAPH_DEBUG_4 0x00400090
0179 #define NV03_PGRAPH_INTR 0x00400100
0180 #define NV03_PGRAPH_NSTATUS 0x00400104
0181 # define NV04_PGRAPH_NSTATUS_STATE_IN_USE (1<<11)
0182 # define NV04_PGRAPH_NSTATUS_INVALID_STATE (1<<12)
0183 # define NV04_PGRAPH_NSTATUS_BAD_ARGUMENT (1<<13)
0184 # define NV04_PGRAPH_NSTATUS_PROTECTION_FAULT (1<<14)
0185 # define NV10_PGRAPH_NSTATUS_STATE_IN_USE (1<<23)
0186 # define NV10_PGRAPH_NSTATUS_INVALID_STATE (1<<24)
0187 # define NV10_PGRAPH_NSTATUS_BAD_ARGUMENT (1<<25)
0188 # define NV10_PGRAPH_NSTATUS_PROTECTION_FAULT (1<<26)
0189 #define NV03_PGRAPH_NSOURCE 0x00400108
0190 # define NV03_PGRAPH_NSOURCE_NOTIFICATION (1<<0)
0191 # define NV03_PGRAPH_NSOURCE_DATA_ERROR (1<<1)
0192 # define NV03_PGRAPH_NSOURCE_PROTECTION_ERROR (1<<2)
0193 # define NV03_PGRAPH_NSOURCE_RANGE_EXCEPTION (1<<3)
0194 # define NV03_PGRAPH_NSOURCE_LIMIT_COLOR (1<<4)
0195 # define NV03_PGRAPH_NSOURCE_LIMIT_ZETA (1<<5)
0196 # define NV03_PGRAPH_NSOURCE_ILLEGAL_MTHD (1<<6)
0197 # define NV03_PGRAPH_NSOURCE_DMA_R_PROTECTION (1<<7)
0198 # define NV03_PGRAPH_NSOURCE_DMA_W_PROTECTION (1<<8)
0199 # define NV03_PGRAPH_NSOURCE_FORMAT_EXCEPTION (1<<9)
0200 # define NV03_PGRAPH_NSOURCE_PATCH_EXCEPTION (1<<10)
0201 # define NV03_PGRAPH_NSOURCE_STATE_INVALID (1<<11)
0202 # define NV03_PGRAPH_NSOURCE_DOUBLE_NOTIFY (1<<12)
0203 # define NV03_PGRAPH_NSOURCE_NOTIFY_IN_USE (1<<13)
0204 # define NV03_PGRAPH_NSOURCE_METHOD_CNT (1<<14)
0205 # define NV03_PGRAPH_NSOURCE_BFR_NOTIFICATION (1<<15)
0206 # define NV03_PGRAPH_NSOURCE_DMA_VTX_PROTECTION (1<<16)
0207 # define NV03_PGRAPH_NSOURCE_DMA_WIDTH_A (1<<17)
0208 # define NV03_PGRAPH_NSOURCE_DMA_WIDTH_B (1<<18)
0209 #define NV03_PGRAPH_INTR_EN 0x00400140
0210 #define NV40_PGRAPH_INTR_EN 0x0040013C
0211 # define NV_PGRAPH_INTR_NOTIFY (1<<0)
0212 # define NV_PGRAPH_INTR_MISSING_HW (1<<4)
0213 # define NV_PGRAPH_INTR_CONTEXT_SWITCH (1<<12)
0214 # define NV_PGRAPH_INTR_BUFFER_NOTIFY (1<<16)
0215 # define NV_PGRAPH_INTR_ERROR (1<<20)
0216 #define NV10_PGRAPH_CTX_CONTROL 0x00400144
0217 #define NV10_PGRAPH_CTX_USER 0x00400148
0218 #define NV10_PGRAPH_CTX_SWITCH(i) (0x0040014C + 0x4*(i))
0219 #define NV04_PGRAPH_CTX_SWITCH1 0x00400160
0220 #define NV10_PGRAPH_CTX_CACHE(i, j) (0x00400160 \
0221 + 0x4*(i) + 0x20*(j))
0222 #define NV04_PGRAPH_CTX_SWITCH2 0x00400164
0223 #define NV04_PGRAPH_CTX_SWITCH3 0x00400168
0224 #define NV04_PGRAPH_CTX_SWITCH4 0x0040016C
0225 #define NV04_PGRAPH_CTX_CONTROL 0x00400170
0226 #define NV04_PGRAPH_CTX_USER 0x00400174
0227 #define NV04_PGRAPH_CTX_CACHE1 0x00400180
0228 #define NV03_PGRAPH_CTX_CONTROL 0x00400190
0229 #define NV03_PGRAPH_CTX_USER 0x00400194
0230 #define NV04_PGRAPH_CTX_CACHE2 0x004001A0
0231 #define NV04_PGRAPH_CTX_CACHE3 0x004001C0
0232 #define NV04_PGRAPH_CTX_CACHE4 0x004001E0
0233 #define NV40_PGRAPH_CTXCTL_0304 0x00400304
0234 #define NV40_PGRAPH_CTXCTL_0304_XFER_CTX 0x00000001
0235 #define NV40_PGRAPH_CTXCTL_UCODE_STAT 0x00400308
0236 #define NV40_PGRAPH_CTXCTL_UCODE_STAT_IP_MASK 0xff000000
0237 #define NV40_PGRAPH_CTXCTL_UCODE_STAT_IP_SHIFT 24
0238 #define NV40_PGRAPH_CTXCTL_UCODE_STAT_OP_MASK 0x00ffffff
0239 #define NV40_PGRAPH_CTXCTL_0310 0x00400310
0240 #define NV40_PGRAPH_CTXCTL_0310_XFER_SAVE 0x00000020
0241 #define NV40_PGRAPH_CTXCTL_0310_XFER_LOAD 0x00000040
0242 #define NV40_PGRAPH_CTXCTL_030C 0x0040030c
0243 #define NV40_PGRAPH_CTXCTL_UCODE_INDEX 0x00400324
0244 #define NV40_PGRAPH_CTXCTL_UCODE_DATA 0x00400328
0245 #define NV40_PGRAPH_CTXCTL_CUR 0x0040032c
0246 #define NV40_PGRAPH_CTXCTL_CUR_LOADED 0x01000000
0247 #define NV40_PGRAPH_CTXCTL_CUR_INSTANCE 0x000FFFFF
0248 #define NV40_PGRAPH_CTXCTL_NEXT 0x00400330
0249 #define NV40_PGRAPH_CTXCTL_NEXT_INSTANCE 0x000fffff
0250 #define NV50_PGRAPH_CTXCTL_CUR 0x0040032c
0251 #define NV50_PGRAPH_CTXCTL_CUR_LOADED 0x80000000
0252 #define NV50_PGRAPH_CTXCTL_CUR_INSTANCE 0x00ffffff
0253 #define NV50_PGRAPH_CTXCTL_NEXT 0x00400330
0254 #define NV50_PGRAPH_CTXCTL_NEXT_INSTANCE 0x00ffffff
0255 #define NV03_PGRAPH_ABS_X_RAM 0x00400400
0256 #define NV03_PGRAPH_ABS_Y_RAM 0x00400480
0257 #define NV03_PGRAPH_X_MISC 0x00400500
0258 #define NV03_PGRAPH_Y_MISC 0x00400504
0259 #define NV04_PGRAPH_VALID1 0x00400508
0260 #define NV04_PGRAPH_SOURCE_COLOR 0x0040050C
0261 #define NV04_PGRAPH_MISC24_0 0x00400510
0262 #define NV03_PGRAPH_XY_LOGIC_MISC0 0x00400514
0263 #define NV03_PGRAPH_XY_LOGIC_MISC1 0x00400518
0264 #define NV03_PGRAPH_XY_LOGIC_MISC2 0x0040051C
0265 #define NV03_PGRAPH_XY_LOGIC_MISC3 0x00400520
0266 #define NV03_PGRAPH_CLIPX_0 0x00400524
0267 #define NV03_PGRAPH_CLIPX_1 0x00400528
0268 #define NV03_PGRAPH_CLIPY_0 0x0040052C
0269 #define NV03_PGRAPH_CLIPY_1 0x00400530
0270 #define NV03_PGRAPH_ABS_ICLIP_XMAX 0x00400534
0271 #define NV03_PGRAPH_ABS_ICLIP_YMAX 0x00400538
0272 #define NV03_PGRAPH_ABS_UCLIP_XMIN 0x0040053C
0273 #define NV03_PGRAPH_ABS_UCLIP_YMIN 0x00400540
0274 #define NV03_PGRAPH_ABS_UCLIP_XMAX 0x00400544
0275 #define NV03_PGRAPH_ABS_UCLIP_YMAX 0x00400548
0276 #define NV03_PGRAPH_ABS_UCLIPA_XMIN 0x00400560
0277 #define NV03_PGRAPH_ABS_UCLIPA_YMIN 0x00400564
0278 #define NV03_PGRAPH_ABS_UCLIPA_XMAX 0x00400568
0279 #define NV03_PGRAPH_ABS_UCLIPA_YMAX 0x0040056C
0280 #define NV04_PGRAPH_MISC24_1 0x00400570
0281 #define NV04_PGRAPH_MISC24_2 0x00400574
0282 #define NV04_PGRAPH_VALID2 0x00400578
0283 #define NV04_PGRAPH_PASSTHRU_0 0x0040057C
0284 #define NV04_PGRAPH_PASSTHRU_1 0x00400580
0285 #define NV04_PGRAPH_PASSTHRU_2 0x00400584
0286 #define NV10_PGRAPH_DIMX_TEXTURE 0x00400588
0287 #define NV10_PGRAPH_WDIMX_TEXTURE 0x0040058C
0288 #define NV04_PGRAPH_COMBINE_0_ALPHA 0x00400590
0289 #define NV04_PGRAPH_COMBINE_0_COLOR 0x00400594
0290 #define NV04_PGRAPH_COMBINE_1_ALPHA 0x00400598
0291 #define NV04_PGRAPH_COMBINE_1_COLOR 0x0040059C
0292 #define NV04_PGRAPH_FORMAT_0 0x004005A8
0293 #define NV04_PGRAPH_FORMAT_1 0x004005AC
0294 #define NV04_PGRAPH_FILTER_0 0x004005B0
0295 #define NV04_PGRAPH_FILTER_1 0x004005B4
0296 #define NV03_PGRAPH_MONO_COLOR0 0x00400600
0297 #define NV04_PGRAPH_ROP3 0x00400604
0298 #define NV04_PGRAPH_BETA_AND 0x00400608
0299 #define NV04_PGRAPH_BETA_PREMULT 0x0040060C
0300 #define NV04_PGRAPH_LIMIT_VIOL_PIX 0x00400610
0301 #define NV04_PGRAPH_FORMATS 0x00400618
0302 #define NV10_PGRAPH_DEBUG_2 0x00400620
0303 #define NV04_PGRAPH_BOFFSET0 0x00400640
0304 #define NV04_PGRAPH_BOFFSET1 0x00400644
0305 #define NV04_PGRAPH_BOFFSET2 0x00400648
0306 #define NV04_PGRAPH_BOFFSET3 0x0040064C
0307 #define NV04_PGRAPH_BOFFSET4 0x00400650
0308 #define NV04_PGRAPH_BOFFSET5 0x00400654
0309 #define NV04_PGRAPH_BBASE0 0x00400658
0310 #define NV04_PGRAPH_BBASE1 0x0040065C
0311 #define NV04_PGRAPH_BBASE2 0x00400660
0312 #define NV04_PGRAPH_BBASE3 0x00400664
0313 #define NV04_PGRAPH_BBASE4 0x00400668
0314 #define NV04_PGRAPH_BBASE5 0x0040066C
0315 #define NV04_PGRAPH_BPITCH0 0x00400670
0316 #define NV04_PGRAPH_BPITCH1 0x00400674
0317 #define NV04_PGRAPH_BPITCH2 0x00400678
0318 #define NV04_PGRAPH_BPITCH3 0x0040067C
0319 #define NV04_PGRAPH_BPITCH4 0x00400680
0320 #define NV04_PGRAPH_BLIMIT0 0x00400684
0321 #define NV04_PGRAPH_BLIMIT1 0x00400688
0322 #define NV04_PGRAPH_BLIMIT2 0x0040068C
0323 #define NV04_PGRAPH_BLIMIT3 0x00400690
0324 #define NV04_PGRAPH_BLIMIT4 0x00400694
0325 #define NV04_PGRAPH_BLIMIT5 0x00400698
0326 #define NV04_PGRAPH_BSWIZZLE2 0x0040069C
0327 #define NV04_PGRAPH_BSWIZZLE5 0x004006A0
0328 #define NV03_PGRAPH_STATUS 0x004006B0
0329 #define NV04_PGRAPH_STATUS 0x00400700
0330 # define NV40_PGRAPH_STATUS_SYNC_STALL 0x00004000
0331 #define NV04_PGRAPH_TRAPPED_ADDR 0x00400704
0332 #define NV04_PGRAPH_TRAPPED_DATA 0x00400708
0333 #define NV04_PGRAPH_SURFACE 0x0040070C
0334 #define NV10_PGRAPH_TRAPPED_DATA_HIGH 0x0040070C
0335 #define NV04_PGRAPH_STATE 0x00400710
0336 #define NV10_PGRAPH_SURFACE 0x00400710
0337 #define NV04_PGRAPH_NOTIFY 0x00400714
0338 #define NV10_PGRAPH_STATE 0x00400714
0339 #define NV10_PGRAPH_NOTIFY 0x00400718
0340
0341 #define NV04_PGRAPH_FIFO 0x00400720
0342
0343 #define NV04_PGRAPH_BPIXEL 0x00400724
0344 #define NV10_PGRAPH_RDI_INDEX 0x00400750
0345 #define NV04_PGRAPH_FFINTFC_ST2 0x00400754
0346 #define NV10_PGRAPH_RDI_DATA 0x00400754
0347 #define NV04_PGRAPH_DMA_PITCH 0x00400760
0348 #define NV10_PGRAPH_FFINTFC_FIFO_PTR 0x00400760
0349 #define NV04_PGRAPH_DVD_COLORFMT 0x00400764
0350 #define NV10_PGRAPH_FFINTFC_ST2 0x00400764
0351 #define NV04_PGRAPH_SCALED_FORMAT 0x00400768
0352 #define NV10_PGRAPH_FFINTFC_ST2_DL 0x00400768
0353 #define NV10_PGRAPH_FFINTFC_ST2_DH 0x0040076c
0354 #define NV10_PGRAPH_DMA_PITCH 0x00400770
0355 #define NV10_PGRAPH_DVD_COLORFMT 0x00400774
0356 #define NV10_PGRAPH_SCALED_FORMAT 0x00400778
0357 #define NV20_PGRAPH_CHANNEL_CTX_TABLE 0x00400780
0358 #define NV20_PGRAPH_CHANNEL_CTX_POINTER 0x00400784
0359 #define NV20_PGRAPH_CHANNEL_CTX_XFER 0x00400788
0360 #define NV20_PGRAPH_CHANNEL_CTX_XFER_LOAD 0x00000001
0361 #define NV20_PGRAPH_CHANNEL_CTX_XFER_SAVE 0x00000002
0362 #define NV04_PGRAPH_PATT_COLOR0 0x00400800
0363 #define NV04_PGRAPH_PATT_COLOR1 0x00400804
0364 #define NV04_PGRAPH_PATTERN 0x00400808
0365 #define NV04_PGRAPH_PATTERN_SHAPE 0x00400810
0366 #define NV04_PGRAPH_CHROMA 0x00400814
0367 #define NV04_PGRAPH_CONTROL0 0x00400818
0368 #define NV04_PGRAPH_CONTROL1 0x0040081C
0369 #define NV04_PGRAPH_CONTROL2 0x00400820
0370 #define NV04_PGRAPH_BLEND 0x00400824
0371 #define NV04_PGRAPH_STORED_FMT 0x00400830
0372 #define NV04_PGRAPH_PATT_COLORRAM 0x00400900
0373 #define NV20_PGRAPH_TILE(i) (0x00400900 + (i*16))
0374 #define NV20_PGRAPH_TLIMIT(i) (0x00400904 + (i*16))
0375 #define NV20_PGRAPH_TSIZE(i) (0x00400908 + (i*16))
0376 #define NV20_PGRAPH_TSTATUS(i) (0x0040090C + (i*16))
0377 #define NV20_PGRAPH_ZCOMP(i) (0x00400980 + 4*(i))
0378 #define NV10_PGRAPH_TILE(i) (0x00400B00 + (i*16))
0379 #define NV10_PGRAPH_TLIMIT(i) (0x00400B04 + (i*16))
0380 #define NV10_PGRAPH_TSIZE(i) (0x00400B08 + (i*16))
0381 #define NV10_PGRAPH_TSTATUS(i) (0x00400B0C + (i*16))
0382 #define NV04_PGRAPH_U_RAM 0x00400D00
0383 #define NV47_PGRAPH_TILE(i) (0x00400D00 + (i*16))
0384 #define NV47_PGRAPH_TLIMIT(i) (0x00400D04 + (i*16))
0385 #define NV47_PGRAPH_TSIZE(i) (0x00400D08 + (i*16))
0386 #define NV47_PGRAPH_TSTATUS(i) (0x00400D0C + (i*16))
0387 #define NV04_PGRAPH_V_RAM 0x00400D40
0388 #define NV04_PGRAPH_W_RAM 0x00400D80
0389 #define NV10_PGRAPH_COMBINER0_IN_ALPHA 0x00400E40
0390 #define NV10_PGRAPH_COMBINER1_IN_ALPHA 0x00400E44
0391 #define NV10_PGRAPH_COMBINER0_IN_RGB 0x00400E48
0392 #define NV10_PGRAPH_COMBINER1_IN_RGB 0x00400E4C
0393 #define NV10_PGRAPH_COMBINER_COLOR0 0x00400E50
0394 #define NV10_PGRAPH_COMBINER_COLOR1 0x00400E54
0395 #define NV10_PGRAPH_COMBINER0_OUT_ALPHA 0x00400E58
0396 #define NV10_PGRAPH_COMBINER1_OUT_ALPHA 0x00400E5C
0397 #define NV10_PGRAPH_COMBINER0_OUT_RGB 0x00400E60
0398 #define NV10_PGRAPH_COMBINER1_OUT_RGB 0x00400E64
0399 #define NV10_PGRAPH_COMBINER_FINAL0 0x00400E68
0400 #define NV10_PGRAPH_COMBINER_FINAL1 0x00400E6C
0401 #define NV10_PGRAPH_WINDOWCLIP_HORIZONTAL 0x00400F00
0402 #define NV10_PGRAPH_WINDOWCLIP_VERTICAL 0x00400F20
0403 #define NV10_PGRAPH_XFMODE0 0x00400F40
0404 #define NV10_PGRAPH_XFMODE1 0x00400F44
0405 #define NV10_PGRAPH_GLOBALSTATE0 0x00400F48
0406 #define NV10_PGRAPH_GLOBALSTATE1 0x00400F4C
0407 #define NV10_PGRAPH_PIPE_ADDRESS 0x00400F50
0408 #define NV10_PGRAPH_PIPE_DATA 0x00400F54
0409 #define NV04_PGRAPH_DMA_START_0 0x00401000
0410 #define NV04_PGRAPH_DMA_START_1 0x00401004
0411 #define NV04_PGRAPH_DMA_LENGTH 0x00401008
0412 #define NV04_PGRAPH_DMA_MISC 0x0040100C
0413 #define NV04_PGRAPH_DMA_DATA_0 0x00401020
0414 #define NV04_PGRAPH_DMA_DATA_1 0x00401024
0415 #define NV04_PGRAPH_DMA_RM 0x00401030
0416 #define NV04_PGRAPH_DMA_A_XLATE_INST 0x00401040
0417 #define NV04_PGRAPH_DMA_A_CONTROL 0x00401044
0418 #define NV04_PGRAPH_DMA_A_LIMIT 0x00401048
0419 #define NV04_PGRAPH_DMA_A_TLB_PTE 0x0040104C
0420 #define NV04_PGRAPH_DMA_A_TLB_TAG 0x00401050
0421 #define NV04_PGRAPH_DMA_A_ADJ_OFFSET 0x00401054
0422 #define NV04_PGRAPH_DMA_A_OFFSET 0x00401058
0423 #define NV04_PGRAPH_DMA_A_SIZE 0x0040105C
0424 #define NV04_PGRAPH_DMA_A_Y_SIZE 0x00401060
0425 #define NV04_PGRAPH_DMA_B_XLATE_INST 0x00401080
0426 #define NV04_PGRAPH_DMA_B_CONTROL 0x00401084
0427 #define NV04_PGRAPH_DMA_B_LIMIT 0x00401088
0428 #define NV04_PGRAPH_DMA_B_TLB_PTE 0x0040108C
0429 #define NV04_PGRAPH_DMA_B_TLB_TAG 0x00401090
0430 #define NV04_PGRAPH_DMA_B_ADJ_OFFSET 0x00401094
0431 #define NV04_PGRAPH_DMA_B_OFFSET 0x00401098
0432 #define NV04_PGRAPH_DMA_B_SIZE 0x0040109C
0433 #define NV04_PGRAPH_DMA_B_Y_SIZE 0x004010A0
0434 #define NV40_PGRAPH_TILE1(i) (0x00406900 + (i*16))
0435 #define NV40_PGRAPH_TLIMIT1(i) (0x00406904 + (i*16))
0436 #define NV40_PGRAPH_TSIZE1(i) (0x00406908 + (i*16))
0437 #define NV40_PGRAPH_TSTATUS1(i) (0x0040690C + (i*16))
0438
0439
0440
0441 #define NV04_PFIFO_DELAY_0 0x00002040
0442 #define NV04_PFIFO_DMA_TIMESLICE 0x00002044
0443 #define NV04_PFIFO_NEXT_CHANNEL 0x00002050
0444 #define NV03_PFIFO_INTR_0 0x00002100
0445 #define NV03_PFIFO_INTR_EN_0 0x00002140
0446 # define NV_PFIFO_INTR_CACHE_ERROR (1<<0)
0447 # define NV_PFIFO_INTR_RUNOUT (1<<4)
0448 # define NV_PFIFO_INTR_RUNOUT_OVERFLOW (1<<8)
0449 # define NV_PFIFO_INTR_DMA_PUSHER (1<<12)
0450 # define NV_PFIFO_INTR_DMA_PT (1<<16)
0451 # define NV_PFIFO_INTR_SEMAPHORE (1<<20)
0452 # define NV_PFIFO_INTR_ACQUIRE_TIMEOUT (1<<24)
0453 #define NV03_PFIFO_RAMHT 0x00002210
0454 #define NV03_PFIFO_RAMFC 0x00002214
0455 #define NV03_PFIFO_RAMRO 0x00002218
0456 #define NV40_PFIFO_RAMFC 0x00002220
0457 #define NV03_PFIFO_CACHES 0x00002500
0458 #define NV04_PFIFO_MODE 0x00002504
0459 #define NV04_PFIFO_DMA 0x00002508
0460 #define NV04_PFIFO_SIZE 0x0000250c
0461 #define NV50_PFIFO_CTX_TABLE(c) (0x2600+(c)*4)
0462 #define NV50_PFIFO_CTX_TABLE__SIZE 128
0463 #define NV50_PFIFO_CTX_TABLE_CHANNEL_ENABLED (1<<31)
0464 #define NV50_PFIFO_CTX_TABLE_UNK30_BAD (1<<30)
0465 #define NV50_PFIFO_CTX_TABLE_INSTANCE_MASK_G80 0x0FFFFFFF
0466 #define NV50_PFIFO_CTX_TABLE_INSTANCE_MASK_G84 0x00FFFFFF
0467 #define NV03_PFIFO_CACHE0_PUSH0 0x00003000
0468 #define NV03_PFIFO_CACHE0_PULL0 0x00003040
0469 #define NV04_PFIFO_CACHE0_PULL0 0x00003050
0470 #define NV04_PFIFO_CACHE0_PULL1 0x00003054
0471 #define NV03_PFIFO_CACHE1_PUSH0 0x00003200
0472 #define NV03_PFIFO_CACHE1_PUSH1 0x00003204
0473 #define NV03_PFIFO_CACHE1_PUSH1_DMA (1<<8)
0474 #define NV40_PFIFO_CACHE1_PUSH1_DMA (1<<16)
0475 #define NV03_PFIFO_CACHE1_PUSH1_CHID_MASK 0x0000000f
0476 #define NV10_PFIFO_CACHE1_PUSH1_CHID_MASK 0x0000001f
0477 #define NV50_PFIFO_CACHE1_PUSH1_CHID_MASK 0x0000007f
0478 #define NV03_PFIFO_CACHE1_PUT 0x00003210
0479 #define NV04_PFIFO_CACHE1_DMA_PUSH 0x00003220
0480 #define NV04_PFIFO_CACHE1_DMA_FETCH 0x00003224
0481 # define NV_PFIFO_CACHE1_DMA_FETCH_TRIG_8_BYTES 0x00000000
0482 # define NV_PFIFO_CACHE1_DMA_FETCH_TRIG_16_BYTES 0x00000008
0483 # define NV_PFIFO_CACHE1_DMA_FETCH_TRIG_24_BYTES 0x00000010
0484 # define NV_PFIFO_CACHE1_DMA_FETCH_TRIG_32_BYTES 0x00000018
0485 # define NV_PFIFO_CACHE1_DMA_FETCH_TRIG_40_BYTES 0x00000020
0486 # define NV_PFIFO_CACHE1_DMA_FETCH_TRIG_48_BYTES 0x00000028
0487 # define NV_PFIFO_CACHE1_DMA_FETCH_TRIG_56_BYTES 0x00000030
0488 # define NV_PFIFO_CACHE1_DMA_FETCH_TRIG_64_BYTES 0x00000038
0489 # define NV_PFIFO_CACHE1_DMA_FETCH_TRIG_72_BYTES 0x00000040
0490 # define NV_PFIFO_CACHE1_DMA_FETCH_TRIG_80_BYTES 0x00000048
0491 # define NV_PFIFO_CACHE1_DMA_FETCH_TRIG_88_BYTES 0x00000050
0492 # define NV_PFIFO_CACHE1_DMA_FETCH_TRIG_96_BYTES 0x00000058
0493 # define NV_PFIFO_CACHE1_DMA_FETCH_TRIG_104_BYTES 0x00000060
0494 # define NV_PFIFO_CACHE1_DMA_FETCH_TRIG_112_BYTES 0x00000068
0495 # define NV_PFIFO_CACHE1_DMA_FETCH_TRIG_120_BYTES 0x00000070
0496 # define NV_PFIFO_CACHE1_DMA_FETCH_TRIG_128_BYTES 0x00000078
0497 # define NV_PFIFO_CACHE1_DMA_FETCH_TRIG_136_BYTES 0x00000080
0498 # define NV_PFIFO_CACHE1_DMA_FETCH_TRIG_144_BYTES 0x00000088
0499 # define NV_PFIFO_CACHE1_DMA_FETCH_TRIG_152_BYTES 0x00000090
0500 # define NV_PFIFO_CACHE1_DMA_FETCH_TRIG_160_BYTES 0x00000098
0501 # define NV_PFIFO_CACHE1_DMA_FETCH_TRIG_168_BYTES 0x000000A0
0502 # define NV_PFIFO_CACHE1_DMA_FETCH_TRIG_176_BYTES 0x000000A8
0503 # define NV_PFIFO_CACHE1_DMA_FETCH_TRIG_184_BYTES 0x000000B0
0504 # define NV_PFIFO_CACHE1_DMA_FETCH_TRIG_192_BYTES 0x000000B8
0505 # define NV_PFIFO_CACHE1_DMA_FETCH_TRIG_200_BYTES 0x000000C0
0506 # define NV_PFIFO_CACHE1_DMA_FETCH_TRIG_208_BYTES 0x000000C8
0507 # define NV_PFIFO_CACHE1_DMA_FETCH_TRIG_216_BYTES 0x000000D0
0508 # define NV_PFIFO_CACHE1_DMA_FETCH_TRIG_224_BYTES 0x000000D8
0509 # define NV_PFIFO_CACHE1_DMA_FETCH_TRIG_232_BYTES 0x000000E0
0510 # define NV_PFIFO_CACHE1_DMA_FETCH_TRIG_240_BYTES 0x000000E8
0511 # define NV_PFIFO_CACHE1_DMA_FETCH_TRIG_248_BYTES 0x000000F0
0512 # define NV_PFIFO_CACHE1_DMA_FETCH_TRIG_256_BYTES 0x000000F8
0513 # define NV_PFIFO_CACHE1_DMA_FETCH_SIZE 0x0000E000
0514 # define NV_PFIFO_CACHE1_DMA_FETCH_SIZE_32_BYTES 0x00000000
0515 # define NV_PFIFO_CACHE1_DMA_FETCH_SIZE_64_BYTES 0x00002000
0516 # define NV_PFIFO_CACHE1_DMA_FETCH_SIZE_96_BYTES 0x00004000
0517 # define NV_PFIFO_CACHE1_DMA_FETCH_SIZE_128_BYTES 0x00006000
0518 # define NV_PFIFO_CACHE1_DMA_FETCH_SIZE_160_BYTES 0x00008000
0519 # define NV_PFIFO_CACHE1_DMA_FETCH_SIZE_192_BYTES 0x0000A000
0520 # define NV_PFIFO_CACHE1_DMA_FETCH_SIZE_224_BYTES 0x0000C000
0521 # define NV_PFIFO_CACHE1_DMA_FETCH_SIZE_256_BYTES 0x0000E000
0522 # define NV_PFIFO_CACHE1_DMA_FETCH_MAX_REQS 0x001F0000
0523 # define NV_PFIFO_CACHE1_DMA_FETCH_MAX_REQS_0 0x00000000
0524 # define NV_PFIFO_CACHE1_DMA_FETCH_MAX_REQS_1 0x00010000
0525 # define NV_PFIFO_CACHE1_DMA_FETCH_MAX_REQS_2 0x00020000
0526 # define NV_PFIFO_CACHE1_DMA_FETCH_MAX_REQS_3 0x00030000
0527 # define NV_PFIFO_CACHE1_DMA_FETCH_MAX_REQS_4 0x00040000
0528 # define NV_PFIFO_CACHE1_DMA_FETCH_MAX_REQS_5 0x00050000
0529 # define NV_PFIFO_CACHE1_DMA_FETCH_MAX_REQS_6 0x00060000
0530 # define NV_PFIFO_CACHE1_DMA_FETCH_MAX_REQS_7 0x00070000
0531 # define NV_PFIFO_CACHE1_DMA_FETCH_MAX_REQS_8 0x00080000
0532 # define NV_PFIFO_CACHE1_DMA_FETCH_MAX_REQS_9 0x00090000
0533 # define NV_PFIFO_CACHE1_DMA_FETCH_MAX_REQS_10 0x000A0000
0534 # define NV_PFIFO_CACHE1_DMA_FETCH_MAX_REQS_11 0x000B0000
0535 # define NV_PFIFO_CACHE1_DMA_FETCH_MAX_REQS_12 0x000C0000
0536 # define NV_PFIFO_CACHE1_DMA_FETCH_MAX_REQS_13 0x000D0000
0537 # define NV_PFIFO_CACHE1_DMA_FETCH_MAX_REQS_14 0x000E0000
0538 # define NV_PFIFO_CACHE1_DMA_FETCH_MAX_REQS_15 0x000F0000
0539 # define NV_PFIFO_CACHE1_ENDIAN 0x80000000
0540 # define NV_PFIFO_CACHE1_LITTLE_ENDIAN 0x7FFFFFFF
0541 # define NV_PFIFO_CACHE1_BIG_ENDIAN 0x80000000
0542 #define NV04_PFIFO_CACHE1_DMA_STATE 0x00003228
0543 #define NV04_PFIFO_CACHE1_DMA_INSTANCE 0x0000322c
0544 #define NV04_PFIFO_CACHE1_DMA_CTL 0x00003230
0545 #define NV04_PFIFO_CACHE1_DMA_PUT 0x00003240
0546 #define NV04_PFIFO_CACHE1_DMA_GET 0x00003244
0547 #define NV10_PFIFO_CACHE1_REF_CNT 0x00003248
0548 #define NV10_PFIFO_CACHE1_DMA_SUBROUTINE 0x0000324C
0549 #define NV03_PFIFO_CACHE1_PULL0 0x00003240
0550 #define NV04_PFIFO_CACHE1_PULL0 0x00003250
0551 # define NV04_PFIFO_CACHE1_PULL0_HASH_FAILED 0x00000010
0552 # define NV04_PFIFO_CACHE1_PULL0_HASH_BUSY 0x00001000
0553 #define NV03_PFIFO_CACHE1_PULL1 0x00003250
0554 #define NV04_PFIFO_CACHE1_PULL1 0x00003254
0555 #define NV04_PFIFO_CACHE1_HASH 0x00003258
0556 #define NV10_PFIFO_CACHE1_ACQUIRE_TIMEOUT 0x00003260
0557 #define NV10_PFIFO_CACHE1_ACQUIRE_TIMESTAMP 0x00003264
0558 #define NV10_PFIFO_CACHE1_ACQUIRE_VALUE 0x00003268
0559 #define NV10_PFIFO_CACHE1_SEMAPHORE 0x0000326C
0560 #define NV03_PFIFO_CACHE1_GET 0x00003270
0561 #define NV04_PFIFO_CACHE1_ENGINE 0x00003280
0562 #define NV04_PFIFO_CACHE1_DMA_DCOUNT 0x000032A0
0563 #define NV40_PFIFO_GRCTX_INSTANCE 0x000032E0
0564 #define NV40_PFIFO_UNK32E4 0x000032E4
0565 #define NV04_PFIFO_CACHE1_METHOD(i) (0x00003800+(i*8))
0566 #define NV04_PFIFO_CACHE1_DATA(i) (0x00003804+(i*8))
0567 #define NV40_PFIFO_CACHE1_METHOD(i) (0x00090000+(i*8))
0568 #define NV40_PFIFO_CACHE1_DATA(i) (0x00090004+(i*8))
0569
0570 #define NV_CRTC0_INTSTAT 0x00600100
0571 #define NV_CRTC0_INTEN 0x00600140
0572 #define NV_CRTC1_INTSTAT 0x00602100
0573 #define NV_CRTC1_INTEN 0x00602140
0574 # define NV_CRTC_INTR_VBLANK (1<<0)
0575
0576 #define NV04_PRAMIN 0x00700000
0577
0578
0579 #define NV03_FIFO_CMD_JUMP 0x20000000
0580 #define NV03_FIFO_CMD_JUMP_OFFSET_MASK 0x1ffffffc
0581 #define NV03_FIFO_CMD_REWIND (NV03_FIFO_CMD_JUMP | (0 & NV03_FIFO_CMD_JUMP_OFFSET_MASK))
0582
0583
0584
0585
0586
0587
0588 #define NV50_PMC 0x00000000
0589 #define NV50_PMC__LEN 0x1
0590 #define NV50_PMC__ESIZE 0x2000
0591 # define NV50_PMC_BOOT_0 0x00000000
0592 # define NV50_PMC_BOOT_0_REVISION 0x000000ff
0593 # define NV50_PMC_BOOT_0_REVISION__SHIFT 0
0594 # define NV50_PMC_BOOT_0_ARCH 0x0ff00000
0595 # define NV50_PMC_BOOT_0_ARCH__SHIFT 20
0596 # define NV50_PMC_INTR_0 0x00000100
0597 # define NV50_PMC_INTR_0_PFIFO (1<<8)
0598 # define NV50_PMC_INTR_0_PGRAPH (1<<12)
0599 # define NV50_PMC_INTR_0_PTIMER (1<<20)
0600 # define NV50_PMC_INTR_0_HOTPLUG (1<<21)
0601 # define NV50_PMC_INTR_0_DISPLAY (1<<26)
0602 # define NV50_PMC_INTR_EN_0 0x00000140
0603 # define NV50_PMC_INTR_EN_0_MASTER (1<<0)
0604 # define NV50_PMC_INTR_EN_0_MASTER_DISABLED (0<<0)
0605 # define NV50_PMC_INTR_EN_0_MASTER_ENABLED (1<<0)
0606 # define NV50_PMC_ENABLE 0x00000200
0607 # define NV50_PMC_ENABLE_PFIFO (1<<8)
0608 # define NV50_PMC_ENABLE_PGRAPH (1<<12)
0609
0610 #define NV50_PCONNECTOR 0x0000e000
0611 #define NV50_PCONNECTOR__LEN 0x1
0612 #define NV50_PCONNECTOR__ESIZE 0x1000
0613 # define NV50_PCONNECTOR_HOTPLUG_INTR 0x0000e050
0614 # define NV50_PCONNECTOR_HOTPLUG_INTR_PLUG_I2C0 (1<<0)
0615 # define NV50_PCONNECTOR_HOTPLUG_INTR_PLUG_I2C1 (1<<1)
0616 # define NV50_PCONNECTOR_HOTPLUG_INTR_PLUG_I2C2 (1<<2)
0617 # define NV50_PCONNECTOR_HOTPLUG_INTR_PLUG_I2C3 (1<<3)
0618 # define NV50_PCONNECTOR_HOTPLUG_INTR_UNPLUG_I2C0 (1<<16)
0619 # define NV50_PCONNECTOR_HOTPLUG_INTR_UNPLUG_I2C1 (1<<17)
0620 # define NV50_PCONNECTOR_HOTPLUG_INTR_UNPLUG_I2C2 (1<<18)
0621 # define NV50_PCONNECTOR_HOTPLUG_INTR_UNPLUG_I2C3 (1<<19)
0622 # define NV50_PCONNECTOR_HOTPLUG_CTRL 0x0000e054
0623 # define NV50_PCONNECTOR_HOTPLUG_CTRL_PLUG_I2C0 (1<<0)
0624 # define NV50_PCONNECTOR_HOTPLUG_CTRL_PLUG_I2C1 (1<<1)
0625 # define NV50_PCONNECTOR_HOTPLUG_CTRL_PLUG_I2C2 (1<<2)
0626 # define NV50_PCONNECTOR_HOTPLUG_CTRL_PLUG_I2C3 (1<<3)
0627 # define NV50_PCONNECTOR_HOTPLUG_CTRL_UNPLUG_I2C0 (1<<16)
0628 # define NV50_PCONNECTOR_HOTPLUG_CTRL_UNPLUG_I2C1 (1<<17)
0629 # define NV50_PCONNECTOR_HOTPLUG_CTRL_UNPLUG_I2C2 (1<<18)
0630 # define NV50_PCONNECTOR_HOTPLUG_CTRL_UNPLUG_I2C3 (1<<19)
0631 # define NV50_PCONNECTOR_HOTPLUG_STATE 0x0000e104
0632 # define NV50_PCONNECTOR_HOTPLUG_STATE_PIN_CONNECTED_I2C0 (1<<2)
0633 # define NV50_PCONNECTOR_HOTPLUG_STATE_PIN_CONNECTED_I2C1 (1<<6)
0634 # define NV50_PCONNECTOR_HOTPLUG_STATE_PIN_CONNECTED_I2C2 (1<<10)
0635 # define NV50_PCONNECTOR_HOTPLUG_STATE_PIN_CONNECTED_I2C3 (1<<14)
0636 # define NV50_PCONNECTOR_I2C_PORT_0 0x0000e138
0637 # define NV50_PCONNECTOR_I2C_PORT_1 0x0000e150
0638 # define NV50_PCONNECTOR_I2C_PORT_2 0x0000e168
0639 # define NV50_PCONNECTOR_I2C_PORT_3 0x0000e180
0640 # define NV50_PCONNECTOR_I2C_PORT_4 0x0000e240
0641 # define NV50_PCONNECTOR_I2C_PORT_5 0x0000e258
0642
0643 #define NV50_AUXCH_DATA_OUT(i, n) ((n) * 4 + (i) * 0x50 + 0x0000e4c0)
0644 #define NV50_AUXCH_DATA_OUT__SIZE 4
0645 #define NV50_AUXCH_DATA_IN(i, n) ((n) * 4 + (i) * 0x50 + 0x0000e4d0)
0646 #define NV50_AUXCH_DATA_IN__SIZE 4
0647 #define NV50_AUXCH_ADDR(i) ((i) * 0x50 + 0x0000e4e0)
0648 #define NV50_AUXCH_CTRL(i) ((i) * 0x50 + 0x0000e4e4)
0649 #define NV50_AUXCH_CTRL_LINKSTAT 0x01000000
0650 #define NV50_AUXCH_CTRL_LINKSTAT_NOT_READY 0x00000000
0651 #define NV50_AUXCH_CTRL_LINKSTAT_READY 0x01000000
0652 #define NV50_AUXCH_CTRL_LINKEN 0x00100000
0653 #define NV50_AUXCH_CTRL_LINKEN_DISABLED 0x00000000
0654 #define NV50_AUXCH_CTRL_LINKEN_ENABLED 0x00100000
0655 #define NV50_AUXCH_CTRL_EXEC 0x00010000
0656 #define NV50_AUXCH_CTRL_EXEC_COMPLETE 0x00000000
0657 #define NV50_AUXCH_CTRL_EXEC_IN_PROCESS 0x00010000
0658 #define NV50_AUXCH_CTRL_CMD 0x0000f000
0659 #define NV50_AUXCH_CTRL_CMD_SHIFT 12
0660 #define NV50_AUXCH_CTRL_LEN 0x0000000f
0661 #define NV50_AUXCH_CTRL_LEN_SHIFT 0
0662 #define NV50_AUXCH_STAT(i) ((i) * 0x50 + 0x0000e4e8)
0663 #define NV50_AUXCH_STAT_STATE 0x10000000
0664 #define NV50_AUXCH_STAT_STATE_NOT_READY 0x00000000
0665 #define NV50_AUXCH_STAT_STATE_READY 0x10000000
0666 #define NV50_AUXCH_STAT_REPLY 0x000f0000
0667 #define NV50_AUXCH_STAT_REPLY_AUX 0x00030000
0668 #define NV50_AUXCH_STAT_REPLY_AUX_ACK 0x00000000
0669 #define NV50_AUXCH_STAT_REPLY_AUX_NACK 0x00010000
0670 #define NV50_AUXCH_STAT_REPLY_AUX_DEFER 0x00020000
0671 #define NV50_AUXCH_STAT_REPLY_I2C 0x000c0000
0672 #define NV50_AUXCH_STAT_REPLY_I2C_ACK 0x00000000
0673 #define NV50_AUXCH_STAT_REPLY_I2C_NACK 0x00040000
0674 #define NV50_AUXCH_STAT_REPLY_I2C_DEFER 0x00080000
0675 #define NV50_AUXCH_STAT_COUNT 0x0000001f
0676
0677 #define NV50_PBUS 0x00088000
0678 #define NV50_PBUS__LEN 0x1
0679 #define NV50_PBUS__ESIZE 0x1000
0680 # define NV50_PBUS_PCI_ID 0x00088000
0681 # define NV50_PBUS_PCI_ID_VENDOR_ID 0x0000ffff
0682 # define NV50_PBUS_PCI_ID_VENDOR_ID__SHIFT 0
0683 # define NV50_PBUS_PCI_ID_DEVICE_ID 0xffff0000
0684 # define NV50_PBUS_PCI_ID_DEVICE_ID__SHIFT 16
0685
0686 #define NV50_PFB 0x00100000
0687 #define NV50_PFB__LEN 0x1
0688 #define NV50_PFB__ESIZE 0x1000
0689
0690 #define NV50_PEXTDEV 0x00101000
0691 #define NV50_PEXTDEV__LEN 0x1
0692 #define NV50_PEXTDEV__ESIZE 0x1000
0693
0694 #define NV50_PROM 0x00300000
0695 #define NV50_PROM__LEN 0x1
0696 #define NV50_PROM__ESIZE 0x10000
0697
0698 #define NV50_PGRAPH 0x00400000
0699 #define NV50_PGRAPH__LEN 0x1
0700 #define NV50_PGRAPH__ESIZE 0x10000
0701
0702 #define NV50_PDISPLAY 0x00610000
0703 #define NV50_PDISPLAY_OBJECTS 0x00610010
0704 #define NV50_PDISPLAY_INTR_0 0x00610020
0705 #define NV50_PDISPLAY_INTR_1 0x00610024
0706 #define NV50_PDISPLAY_INTR_1_VBLANK_CRTC 0x0000000c
0707 #define NV50_PDISPLAY_INTR_1_VBLANK_CRTC_SHIFT 2
0708 #define NV50_PDISPLAY_INTR_1_VBLANK_CRTC_(n) (1 << ((n) + 2))
0709 #define NV50_PDISPLAY_INTR_1_VBLANK_CRTC_0 0x00000004
0710 #define NV50_PDISPLAY_INTR_1_VBLANK_CRTC_1 0x00000008
0711 #define NV50_PDISPLAY_INTR_1_CLK_UNK10 0x00000010
0712 #define NV50_PDISPLAY_INTR_1_CLK_UNK20 0x00000020
0713 #define NV50_PDISPLAY_INTR_1_CLK_UNK40 0x00000040
0714 #define NV50_PDISPLAY_INTR_EN_0 0x00610028
0715 #define NV50_PDISPLAY_INTR_EN_1 0x0061002c
0716 #define NV50_PDISPLAY_INTR_EN_1_VBLANK_CRTC 0x0000000c
0717 #define NV50_PDISPLAY_INTR_EN_1_VBLANK_CRTC_(n) (1 << ((n) + 2))
0718 #define NV50_PDISPLAY_INTR_EN_1_VBLANK_CRTC_0 0x00000004
0719 #define NV50_PDISPLAY_INTR_EN_1_VBLANK_CRTC_1 0x00000008
0720 #define NV50_PDISPLAY_INTR_EN_1_CLK_UNK10 0x00000010
0721 #define NV50_PDISPLAY_INTR_EN_1_CLK_UNK20 0x00000020
0722 #define NV50_PDISPLAY_INTR_EN_1_CLK_UNK40 0x00000040
0723 #define NV50_PDISPLAY_UNK30_CTRL 0x00610030
0724 #define NV50_PDISPLAY_UNK30_CTRL_UPDATE_VCLK0 0x00000200
0725 #define NV50_PDISPLAY_UNK30_CTRL_UPDATE_VCLK1 0x00000400
0726 #define NV50_PDISPLAY_UNK30_CTRL_PENDING 0x80000000
0727 #define NV50_PDISPLAY_TRAPPED_ADDR(i) ((i) * 0x08 + 0x00610080)
0728 #define NV50_PDISPLAY_TRAPPED_DATA(i) ((i) * 0x08 + 0x00610084)
0729 #define NV50_PDISPLAY_EVO_CTRL(i) ((i) * 0x10 + 0x00610200)
0730 #define NV50_PDISPLAY_EVO_CTRL_DMA 0x00000010
0731 #define NV50_PDISPLAY_EVO_CTRL_DMA_DISABLED 0x00000000
0732 #define NV50_PDISPLAY_EVO_CTRL_DMA_ENABLED 0x00000010
0733 #define NV50_PDISPLAY_EVO_DMA_CB(i) ((i) * 0x10 + 0x00610204)
0734 #define NV50_PDISPLAY_EVO_DMA_CB_LOCATION 0x00000002
0735 #define NV50_PDISPLAY_EVO_DMA_CB_LOCATION_VRAM 0x00000000
0736 #define NV50_PDISPLAY_EVO_DMA_CB_LOCATION_SYSTEM 0x00000002
0737 #define NV50_PDISPLAY_EVO_DMA_CB_VALID 0x00000001
0738 #define NV50_PDISPLAY_EVO_UNK2(i) ((i) * 0x10 + 0x00610208)
0739 #define NV50_PDISPLAY_EVO_HASH_TAG(i) ((i) * 0x10 + 0x0061020c)
0740
0741 #define NV50_PDISPLAY_CURSOR 0x00610270
0742 #define NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(i) ((i) * 0x10 + 0x00610270)
0743 #define NV50_PDISPLAY_CURSOR_CURSOR_CTRL2_ON 0x00000001
0744 #define NV50_PDISPLAY_CURSOR_CURSOR_CTRL2_STATUS 0x00030000
0745 #define NV50_PDISPLAY_CURSOR_CURSOR_CTRL2_STATUS_ACTIVE 0x00010000
0746
0747 #define NV50_PDISPLAY_PIO_CTRL 0x00610300
0748 #define NV50_PDISPLAY_PIO_CTRL_PENDING 0x80000000
0749 #define NV50_PDISPLAY_PIO_CTRL_MTHD 0x00001ffc
0750 #define NV50_PDISPLAY_PIO_CTRL_ENABLED 0x00000001
0751 #define NV50_PDISPLAY_PIO_DATA 0x00610304
0752
0753 #define NV50_PDISPLAY_CRTC_P(i, r) ((i) * 0x540 + NV50_PDISPLAY_CRTC_##r)
0754 #define NV50_PDISPLAY_CRTC_C(i, r) (4 + (i) * 0x540 + NV50_PDISPLAY_CRTC_##r)
0755 #define NV50_PDISPLAY_CRTC_UNK_0A18 0x00610a18
0756 #define NV50_PDISPLAY_CRTC_CLUT_MODE 0x00610a24
0757 #define NV50_PDISPLAY_CRTC_INTERLACE 0x00610a48
0758 #define NV50_PDISPLAY_CRTC_SCALE_CTRL 0x00610a50
0759 #define NV50_PDISPLAY_CRTC_CURSOR_CTRL 0x00610a58
0760 #define NV50_PDISPLAY_CRTC_UNK0A78 0x00610a78
0761 #define NV50_PDISPLAY_CRTC_UNK0AB8 0x00610ab8
0762 #define NV50_PDISPLAY_CRTC_DEPTH 0x00610ac8
0763 #define NV50_PDISPLAY_CRTC_CLOCK 0x00610ad0
0764 #define NV50_PDISPLAY_CRTC_COLOR_CTRL 0x00610ae0
0765 #define NV50_PDISPLAY_CRTC_SYNC_START_TO_BLANK_END 0x00610ae8
0766 #define NV50_PDISPLAY_CRTC_MODE_UNK1 0x00610af0
0767 #define NV50_PDISPLAY_CRTC_DISPLAY_TOTAL 0x00610af8
0768 #define NV50_PDISPLAY_CRTC_SYNC_DURATION 0x00610b00
0769 #define NV50_PDISPLAY_CRTC_MODE_UNK2 0x00610b08
0770 #define NV50_PDISPLAY_CRTC_UNK_0B10 0x00610b10
0771 #define NV50_PDISPLAY_CRTC_FB_SIZE 0x00610b18
0772 #define NV50_PDISPLAY_CRTC_FB_PITCH 0x00610b20
0773 #define NV50_PDISPLAY_CRTC_FB_PITCH_LINEAR 0x00100000
0774 #define NV50_PDISPLAY_CRTC_FB_POS 0x00610b28
0775 #define NV50_PDISPLAY_CRTC_SCALE_CENTER_OFFSET 0x00610b38
0776 #define NV50_PDISPLAY_CRTC_REAL_RES 0x00610b40
0777 #define NV50_PDISPLAY_CRTC_SCALE_RES1 0x00610b48
0778 #define NV50_PDISPLAY_CRTC_SCALE_RES2 0x00610b50
0779
0780 #define NV50_PDISPLAY_DAC_MODE_CTRL_P(i) (0x00610b58 + (i) * 0x8)
0781 #define NV50_PDISPLAY_DAC_MODE_CTRL_C(i) (0x00610b5c + (i) * 0x8)
0782 #define NV50_PDISPLAY_SOR_MODE_CTRL_P(i) (0x00610b70 + (i) * 0x8)
0783 #define NV50_PDISPLAY_SOR_MODE_CTRL_C(i) (0x00610b74 + (i) * 0x8)
0784 #define NV50_PDISPLAY_EXT_MODE_CTRL_P(i) (0x00610b80 + (i) * 0x8)
0785 #define NV50_PDISPLAY_EXT_MODE_CTRL_C(i) (0x00610b84 + (i) * 0x8)
0786 #define NV50_PDISPLAY_DAC_MODE_CTRL2_P(i) (0x00610bdc + (i) * 0x8)
0787 #define NV50_PDISPLAY_DAC_MODE_CTRL2_C(i) (0x00610be0 + (i) * 0x8)
0788 #define NV90_PDISPLAY_SOR_MODE_CTRL_P(i) (0x00610794 + (i) * 0x8)
0789 #define NV90_PDISPLAY_SOR_MODE_CTRL_C(i) (0x00610798 + (i) * 0x8)
0790
0791 #define NV50_PDISPLAY_CRTC_CLK 0x00614000
0792 #define NV50_PDISPLAY_CRTC_CLK_CTRL1(i) ((i) * 0x800 + 0x614100)
0793 #define NV50_PDISPLAY_CRTC_CLK_CTRL1_CONNECTED 0x00000600
0794 #define NV50_PDISPLAY_CRTC_CLK_VPLL_A(i) ((i) * 0x800 + 0x614104)
0795 #define NV50_PDISPLAY_CRTC_CLK_VPLL_B(i) ((i) * 0x800 + 0x614108)
0796 #define NV50_PDISPLAY_CRTC_CLK_CTRL2(i) ((i) * 0x800 + 0x614200)
0797
0798 #define NV50_PDISPLAY_DAC_CLK 0x00614000
0799 #define NV50_PDISPLAY_DAC_CLK_CTRL2(i) ((i) * 0x800 + 0x614280)
0800
0801 #define NV50_PDISPLAY_SOR_CLK 0x00614000
0802 #define NV50_PDISPLAY_SOR_CLK_CTRL2(i) ((i) * 0x800 + 0x614300)
0803
0804 #define NV50_PDISPLAY_VGACRTC(r) ((r) + 0x619400)
0805
0806 #define NV50_PDISPLAY_DAC 0x0061a000
0807 #define NV50_PDISPLAY_DAC_DPMS_CTRL(i) (0x0061a004 + (i) * 0x800)
0808 #define NV50_PDISPLAY_DAC_DPMS_CTRL_HSYNC_OFF 0x00000001
0809 #define NV50_PDISPLAY_DAC_DPMS_CTRL_VSYNC_OFF 0x00000004
0810 #define NV50_PDISPLAY_DAC_DPMS_CTRL_BLANKED 0x00000010
0811 #define NV50_PDISPLAY_DAC_DPMS_CTRL_OFF 0x00000040
0812 #define NV50_PDISPLAY_DAC_DPMS_CTRL_PENDING 0x80000000
0813 #define NV50_PDISPLAY_DAC_LOAD_CTRL(i) (0x0061a00c + (i) * 0x800)
0814 #define NV50_PDISPLAY_DAC_LOAD_CTRL_ACTIVE 0x00100000
0815 #define NV50_PDISPLAY_DAC_LOAD_CTRL_PRESENT 0x38000000
0816 #define NV50_PDISPLAY_DAC_LOAD_CTRL_DONE 0x80000000
0817 #define NV50_PDISPLAY_DAC_CLK_CTRL1(i) (0x0061a010 + (i) * 0x800)
0818 #define NV50_PDISPLAY_DAC_CLK_CTRL1_CONNECTED 0x00000600
0819
0820 #define NV50_PDISPLAY_SOR 0x0061c000
0821 #define NV50_PDISPLAY_SOR_DPMS_CTRL(i) (0x0061c004 + (i) * 0x800)
0822 #define NV50_PDISPLAY_SOR_DPMS_CTRL_PENDING 0x80000000
0823 #define NV50_PDISPLAY_SOR_DPMS_CTRL_ON 0x00000001
0824 #define NV50_PDISPLAY_SOR_CLK_CTRL1(i) (0x0061c008 + (i) * 0x800)
0825 #define NV50_PDISPLAY_SOR_CLK_CTRL1_CONNECTED 0x00000600
0826 #define NV50_PDISPLAY_SOR_DPMS_STATE(i) (0x0061c030 + (i) * 0x800)
0827 #define NV50_PDISPLAY_SOR_DPMS_STATE_ACTIVE 0x00030000
0828 #define NV50_PDISPLAY_SOR_DPMS_STATE_BLANKED 0x00080000
0829 #define NV50_PDISPLAY_SOR_DPMS_STATE_WAIT 0x10000000
0830 #define NV50_PDISP_SOR_PWM_DIV(i) (0x0061c080 + (i) * 0x800)
0831 #define NV50_PDISP_SOR_PWM_CTL(i) (0x0061c084 + (i) * 0x800)
0832 #define NV50_PDISP_SOR_PWM_CTL_NEW 0x80000000
0833 #define NVA3_PDISP_SOR_PWM_CTL_UNK 0x40000000
0834 #define NV50_PDISP_SOR_PWM_CTL_VAL 0x000007ff
0835 #define NVA3_PDISP_SOR_PWM_CTL_VAL 0x00ffffff
0836 #define NV50_SOR_DP_CTRL(i, l) (0x0061c10c + (i) * 0x800 + (l) * 0x80)
0837 #define NV50_SOR_DP_CTRL_ENABLED 0x00000001
0838 #define NV50_SOR_DP_CTRL_ENHANCED_FRAME_ENABLED 0x00004000
0839 #define NV50_SOR_DP_CTRL_LANE_MASK 0x001f0000
0840 #define NV50_SOR_DP_CTRL_LANE_0_ENABLED 0x00010000
0841 #define NV50_SOR_DP_CTRL_LANE_1_ENABLED 0x00020000
0842 #define NV50_SOR_DP_CTRL_LANE_2_ENABLED 0x00040000
0843 #define NV50_SOR_DP_CTRL_LANE_3_ENABLED 0x00080000
0844 #define NV50_SOR_DP_CTRL_TRAINING_PATTERN 0x0f000000
0845 #define NV50_SOR_DP_CTRL_TRAINING_PATTERN_DISABLED 0x00000000
0846 #define NV50_SOR_DP_CTRL_TRAINING_PATTERN_1 0x01000000
0847 #define NV50_SOR_DP_CTRL_TRAINING_PATTERN_2 0x02000000
0848 #define NV50_SOR_DP_UNK118(i, l) (0x0061c118 + (i) * 0x800 + (l) * 0x80)
0849 #define NV50_SOR_DP_UNK120(i, l) (0x0061c120 + (i) * 0x800 + (l) * 0x80)
0850 #define NV50_SOR_DP_SCFG(i, l) (0x0061c128 + (i) * 0x800 + (l) * 0x80)
0851 #define NV50_SOR_DP_UNK130(i, l) (0x0061c130 + (i) * 0x800 + (l) * 0x80)
0852
0853 #define NV50_PDISPLAY_USER(i) ((i) * 0x1000 + 0x00640000)
0854 #define NV50_PDISPLAY_USER_PUT(i) ((i) * 0x1000 + 0x00640000)
0855 #define NV50_PDISPLAY_USER_GET(i) ((i) * 0x1000 + 0x00640004)
0856
0857 #define NV50_PDISPLAY_CURSOR_USER 0x00647000
0858 #define NV50_PDISPLAY_CURSOR_USER_POS_CTRL(i) ((i) * 0x1000 + 0x00647080)
0859 #define NV50_PDISPLAY_CURSOR_USER_POS(i) ((i) * 0x1000 + 0x00647084)