276 lines · c
1/* SPDX-License-Identifier: MIT */2#ifndef __NVKM_GR_REGS_H__3#define __NVKM_GR_REGS_H__4 5#define NV04_PGRAPH_DEBUG_0 0x004000806#define NV04_PGRAPH_DEBUG_1 0x004000847#define NV04_PGRAPH_DEBUG_2 0x004000888#define NV04_PGRAPH_DEBUG_3 0x0040008c9#define NV10_PGRAPH_DEBUG_4 0x0040009010#define NV03_PGRAPH_INTR 0x0040010011#define NV03_PGRAPH_NSTATUS 0x0040010412# define NV04_PGRAPH_NSTATUS_STATE_IN_USE (1<<11)13# define NV04_PGRAPH_NSTATUS_INVALID_STATE (1<<12)14# define NV04_PGRAPH_NSTATUS_BAD_ARGUMENT (1<<13)15# define NV04_PGRAPH_NSTATUS_PROTECTION_FAULT (1<<14)16# define NV10_PGRAPH_NSTATUS_STATE_IN_USE (1<<23)17# define NV10_PGRAPH_NSTATUS_INVALID_STATE (1<<24)18# define NV10_PGRAPH_NSTATUS_BAD_ARGUMENT (1<<25)19# define NV10_PGRAPH_NSTATUS_PROTECTION_FAULT (1<<26)20#define NV03_PGRAPH_NSOURCE 0x0040010821# define NV03_PGRAPH_NSOURCE_NOTIFICATION (1<<0)22# define NV03_PGRAPH_NSOURCE_DATA_ERROR (1<<1)23# define NV03_PGRAPH_NSOURCE_PROTECTION_ERROR (1<<2)24# define NV03_PGRAPH_NSOURCE_RANGE_EXCEPTION (1<<3)25# define NV03_PGRAPH_NSOURCE_LIMIT_COLOR (1<<4)26# define NV03_PGRAPH_NSOURCE_LIMIT_ZETA (1<<5)27# define NV03_PGRAPH_NSOURCE_ILLEGAL_MTHD (1<<6)28# define NV03_PGRAPH_NSOURCE_DMA_R_PROTECTION (1<<7)29# define NV03_PGRAPH_NSOURCE_DMA_W_PROTECTION (1<<8)30# define NV03_PGRAPH_NSOURCE_FORMAT_EXCEPTION (1<<9)31# define NV03_PGRAPH_NSOURCE_PATCH_EXCEPTION (1<<10)32# define NV03_PGRAPH_NSOURCE_STATE_INVALID (1<<11)33# define NV03_PGRAPH_NSOURCE_DOUBLE_NOTIFY (1<<12)34# define NV03_PGRAPH_NSOURCE_NOTIFY_IN_USE (1<<13)35# define NV03_PGRAPH_NSOURCE_METHOD_CNT (1<<14)36# define NV03_PGRAPH_NSOURCE_BFR_NOTIFICATION (1<<15)37# define NV03_PGRAPH_NSOURCE_DMA_VTX_PROTECTION (1<<16)38# define NV03_PGRAPH_NSOURCE_DMA_WIDTH_A (1<<17)39# define NV03_PGRAPH_NSOURCE_DMA_WIDTH_B (1<<18)40#define NV03_PGRAPH_INTR_EN 0x0040014041#define NV40_PGRAPH_INTR_EN 0x0040013C42# define NV_PGRAPH_INTR_NOTIFY (1<<0)43# define NV_PGRAPH_INTR_MISSING_HW (1<<4)44# define NV_PGRAPH_INTR_CONTEXT_SWITCH (1<<12)45# define NV_PGRAPH_INTR_BUFFER_NOTIFY (1<<16)46# define NV_PGRAPH_INTR_ERROR (1<<20)47#define NV10_PGRAPH_CTX_CONTROL 0x0040014448#define NV10_PGRAPH_CTX_USER 0x0040014849#define NV10_PGRAPH_CTX_SWITCH(i) (0x0040014C + 0x4*(i))50#define NV04_PGRAPH_CTX_SWITCH1 0x0040016051#define NV10_PGRAPH_CTX_CACHE(i, j) (0x00400160 \52 + 0x4*(i) + 0x20*(j))53#define NV04_PGRAPH_CTX_SWITCH2 0x0040016454#define NV04_PGRAPH_CTX_SWITCH3 0x0040016855#define NV04_PGRAPH_CTX_SWITCH4 0x0040016C56#define NV04_PGRAPH_CTX_CONTROL 0x0040017057#define NV04_PGRAPH_CTX_USER 0x0040017458#define NV04_PGRAPH_CTX_CACHE1 0x0040018059#define NV03_PGRAPH_CTX_CONTROL 0x0040019060#define NV03_PGRAPH_CTX_USER 0x0040019461#define NV04_PGRAPH_CTX_CACHE2 0x004001A062#define NV04_PGRAPH_CTX_CACHE3 0x004001C063#define NV04_PGRAPH_CTX_CACHE4 0x004001E064#define NV40_PGRAPH_CTXCTL_0304 0x0040030465#define NV40_PGRAPH_CTXCTL_0304_XFER_CTX 0x0000000166#define NV40_PGRAPH_CTXCTL_UCODE_STAT 0x0040030867#define NV40_PGRAPH_CTXCTL_UCODE_STAT_IP_MASK 0xff00000068#define NV40_PGRAPH_CTXCTL_UCODE_STAT_IP_SHIFT 2469#define NV40_PGRAPH_CTXCTL_UCODE_STAT_OP_MASK 0x00ffffff70#define NV40_PGRAPH_CTXCTL_0310 0x0040031071#define NV40_PGRAPH_CTXCTL_0310_XFER_SAVE 0x0000002072#define NV40_PGRAPH_CTXCTL_0310_XFER_LOAD 0x0000004073#define NV40_PGRAPH_CTXCTL_030C 0x0040030c74#define NV40_PGRAPH_CTXCTL_UCODE_INDEX 0x0040032475#define NV40_PGRAPH_CTXCTL_UCODE_DATA 0x0040032876#define NV40_PGRAPH_CTXCTL_CUR 0x0040032c77#define NV40_PGRAPH_CTXCTL_CUR_LOADED 0x0100000078#define NV40_PGRAPH_CTXCTL_CUR_INSTANCE 0x000FFFFF79#define NV40_PGRAPH_CTXCTL_NEXT 0x0040033080#define NV40_PGRAPH_CTXCTL_NEXT_INSTANCE 0x000fffff81#define NV50_PGRAPH_CTXCTL_CUR 0x0040032c82#define NV50_PGRAPH_CTXCTL_CUR_LOADED 0x8000000083#define NV50_PGRAPH_CTXCTL_CUR_INSTANCE 0x00ffffff84#define NV50_PGRAPH_CTXCTL_NEXT 0x0040033085#define NV50_PGRAPH_CTXCTL_NEXT_INSTANCE 0x00ffffff86#define NV03_PGRAPH_ABS_X_RAM 0x0040040087#define NV03_PGRAPH_ABS_Y_RAM 0x0040048088#define NV03_PGRAPH_X_MISC 0x0040050089#define NV03_PGRAPH_Y_MISC 0x0040050490#define NV04_PGRAPH_VALID1 0x0040050891#define NV04_PGRAPH_SOURCE_COLOR 0x0040050C92#define NV04_PGRAPH_MISC24_0 0x0040051093#define NV03_PGRAPH_XY_LOGIC_MISC0 0x0040051494#define NV03_PGRAPH_XY_LOGIC_MISC1 0x0040051895#define NV03_PGRAPH_XY_LOGIC_MISC2 0x0040051C96#define NV03_PGRAPH_XY_LOGIC_MISC3 0x0040052097#define NV03_PGRAPH_CLIPX_0 0x0040052498#define NV03_PGRAPH_CLIPX_1 0x0040052899#define NV03_PGRAPH_CLIPY_0 0x0040052C100#define NV03_PGRAPH_CLIPY_1 0x00400530101#define NV03_PGRAPH_ABS_ICLIP_XMAX 0x00400534102#define NV03_PGRAPH_ABS_ICLIP_YMAX 0x00400538103#define NV03_PGRAPH_ABS_UCLIP_XMIN 0x0040053C104#define NV03_PGRAPH_ABS_UCLIP_YMIN 0x00400540105#define NV03_PGRAPH_ABS_UCLIP_XMAX 0x00400544106#define NV03_PGRAPH_ABS_UCLIP_YMAX 0x00400548107#define NV03_PGRAPH_ABS_UCLIPA_XMIN 0x00400560108#define NV03_PGRAPH_ABS_UCLIPA_YMIN 0x00400564109#define NV03_PGRAPH_ABS_UCLIPA_XMAX 0x00400568110#define NV03_PGRAPH_ABS_UCLIPA_YMAX 0x0040056C111#define NV04_PGRAPH_MISC24_1 0x00400570112#define NV04_PGRAPH_MISC24_2 0x00400574113#define NV04_PGRAPH_VALID2 0x00400578114#define NV04_PGRAPH_PASSTHRU_0 0x0040057C115#define NV04_PGRAPH_PASSTHRU_1 0x00400580116#define NV04_PGRAPH_PASSTHRU_2 0x00400584117#define NV10_PGRAPH_DIMX_TEXTURE 0x00400588118#define NV10_PGRAPH_WDIMX_TEXTURE 0x0040058C119#define NV04_PGRAPH_COMBINE_0_ALPHA 0x00400590120#define NV04_PGRAPH_COMBINE_0_COLOR 0x00400594121#define NV04_PGRAPH_COMBINE_1_ALPHA 0x00400598122#define NV04_PGRAPH_COMBINE_1_COLOR 0x0040059C123#define NV04_PGRAPH_FORMAT_0 0x004005A8124#define NV04_PGRAPH_FORMAT_1 0x004005AC125#define NV04_PGRAPH_FILTER_0 0x004005B0126#define NV04_PGRAPH_FILTER_1 0x004005B4127#define NV03_PGRAPH_MONO_COLOR0 0x00400600128#define NV04_PGRAPH_ROP3 0x00400604129#define NV04_PGRAPH_BETA_AND 0x00400608130#define NV04_PGRAPH_BETA_PREMULT 0x0040060C131#define NV04_PGRAPH_LIMIT_VIOL_PIX 0x00400610132#define NV04_PGRAPH_FORMATS 0x00400618133#define NV10_PGRAPH_DEBUG_2 0x00400620134#define NV04_PGRAPH_BOFFSET0 0x00400640135#define NV04_PGRAPH_BOFFSET1 0x00400644136#define NV04_PGRAPH_BOFFSET2 0x00400648137#define NV04_PGRAPH_BOFFSET3 0x0040064C138#define NV04_PGRAPH_BOFFSET4 0x00400650139#define NV04_PGRAPH_BOFFSET5 0x00400654140#define NV04_PGRAPH_BBASE0 0x00400658141#define NV04_PGRAPH_BBASE1 0x0040065C142#define NV04_PGRAPH_BBASE2 0x00400660143#define NV04_PGRAPH_BBASE3 0x00400664144#define NV04_PGRAPH_BBASE4 0x00400668145#define NV04_PGRAPH_BBASE5 0x0040066C146#define NV04_PGRAPH_BPITCH0 0x00400670147#define NV04_PGRAPH_BPITCH1 0x00400674148#define NV04_PGRAPH_BPITCH2 0x00400678149#define NV04_PGRAPH_BPITCH3 0x0040067C150#define NV04_PGRAPH_BPITCH4 0x00400680151#define NV04_PGRAPH_BLIMIT0 0x00400684152#define NV04_PGRAPH_BLIMIT1 0x00400688153#define NV04_PGRAPH_BLIMIT2 0x0040068C154#define NV04_PGRAPH_BLIMIT3 0x00400690155#define NV04_PGRAPH_BLIMIT4 0x00400694156#define NV04_PGRAPH_BLIMIT5 0x00400698157#define NV04_PGRAPH_BSWIZZLE2 0x0040069C158#define NV04_PGRAPH_BSWIZZLE5 0x004006A0159#define NV03_PGRAPH_STATUS 0x004006B0160#define NV04_PGRAPH_STATUS 0x00400700161# define NV40_PGRAPH_STATUS_SYNC_STALL 0x00004000162#define NV04_PGRAPH_TRAPPED_ADDR 0x00400704163#define NV04_PGRAPH_TRAPPED_DATA 0x00400708164#define NV04_PGRAPH_SURFACE 0x0040070C165#define NV10_PGRAPH_TRAPPED_DATA_HIGH 0x0040070C166#define NV04_PGRAPH_STATE 0x00400710167#define NV10_PGRAPH_SURFACE 0x00400710168#define NV04_PGRAPH_NOTIFY 0x00400714169#define NV10_PGRAPH_STATE 0x00400714170#define NV10_PGRAPH_NOTIFY 0x00400718171 172#define NV04_PGRAPH_FIFO 0x00400720173 174#define NV04_PGRAPH_BPIXEL 0x00400724175#define NV10_PGRAPH_RDI_INDEX 0x00400750176#define NV04_PGRAPH_FFINTFC_ST2 0x00400754177#define NV10_PGRAPH_RDI_DATA 0x00400754178#define NV04_PGRAPH_DMA_PITCH 0x00400760179#define NV10_PGRAPH_FFINTFC_FIFO_PTR 0x00400760180#define NV04_PGRAPH_DVD_COLORFMT 0x00400764181#define NV10_PGRAPH_FFINTFC_ST2 0x00400764182#define NV04_PGRAPH_SCALED_FORMAT 0x00400768183#define NV10_PGRAPH_FFINTFC_ST2_DL 0x00400768184#define NV10_PGRAPH_FFINTFC_ST2_DH 0x0040076c185#define NV10_PGRAPH_DMA_PITCH 0x00400770186#define NV10_PGRAPH_DVD_COLORFMT 0x00400774187#define NV10_PGRAPH_SCALED_FORMAT 0x00400778188#define NV20_PGRAPH_CHANNEL_CTX_TABLE 0x00400780189#define NV20_PGRAPH_CHANNEL_CTX_POINTER 0x00400784190#define NV20_PGRAPH_CHANNEL_CTX_XFER 0x00400788191#define NV20_PGRAPH_CHANNEL_CTX_XFER_LOAD 0x00000001192#define NV20_PGRAPH_CHANNEL_CTX_XFER_SAVE 0x00000002193#define NV04_PGRAPH_PATT_COLOR0 0x00400800194#define NV04_PGRAPH_PATT_COLOR1 0x00400804195#define NV04_PGRAPH_PATTERN 0x00400808196#define NV04_PGRAPH_PATTERN_SHAPE 0x00400810197#define NV04_PGRAPH_CHROMA 0x00400814198#define NV04_PGRAPH_CONTROL0 0x00400818199#define NV04_PGRAPH_CONTROL1 0x0040081C200#define NV04_PGRAPH_CONTROL2 0x00400820201#define NV04_PGRAPH_BLEND 0x00400824202#define NV04_PGRAPH_STORED_FMT 0x00400830203#define NV04_PGRAPH_PATT_COLORRAM 0x00400900204#define NV20_PGRAPH_TILE(i) (0x00400900 + (i*16))205#define NV20_PGRAPH_TLIMIT(i) (0x00400904 + (i*16))206#define NV20_PGRAPH_TSIZE(i) (0x00400908 + (i*16))207#define NV20_PGRAPH_TSTATUS(i) (0x0040090C + (i*16))208#define NV20_PGRAPH_ZCOMP(i) (0x00400980 + 4*(i))209#define NV41_PGRAPH_ZCOMP0(i) (0x004009c0 + 4*(i))210#define NV10_PGRAPH_TILE(i) (0x00400B00 + (i*16))211#define NV10_PGRAPH_TLIMIT(i) (0x00400B04 + (i*16))212#define NV10_PGRAPH_TSIZE(i) (0x00400B08 + (i*16))213#define NV10_PGRAPH_TSTATUS(i) (0x00400B0C + (i*16))214#define NV04_PGRAPH_U_RAM 0x00400D00215#define NV47_PGRAPH_TILE(i) (0x00400D00 + (i*16))216#define NV47_PGRAPH_TLIMIT(i) (0x00400D04 + (i*16))217#define NV47_PGRAPH_TSIZE(i) (0x00400D08 + (i*16))218#define NV47_PGRAPH_TSTATUS(i) (0x00400D0C + (i*16))219#define NV04_PGRAPH_V_RAM 0x00400D40220#define NV04_PGRAPH_W_RAM 0x00400D80221#define NV47_PGRAPH_ZCOMP0(i) (0x00400e00 + 4*(i))222#define NV10_PGRAPH_COMBINER0_IN_ALPHA 0x00400E40223#define NV10_PGRAPH_COMBINER1_IN_ALPHA 0x00400E44224#define NV10_PGRAPH_COMBINER0_IN_RGB 0x00400E48225#define NV10_PGRAPH_COMBINER1_IN_RGB 0x00400E4C226#define NV10_PGRAPH_COMBINER_COLOR0 0x00400E50227#define NV10_PGRAPH_COMBINER_COLOR1 0x00400E54228#define NV10_PGRAPH_COMBINER0_OUT_ALPHA 0x00400E58229#define NV10_PGRAPH_COMBINER1_OUT_ALPHA 0x00400E5C230#define NV10_PGRAPH_COMBINER0_OUT_RGB 0x00400E60231#define NV10_PGRAPH_COMBINER1_OUT_RGB 0x00400E64232#define NV10_PGRAPH_COMBINER_FINAL0 0x00400E68233#define NV10_PGRAPH_COMBINER_FINAL1 0x00400E6C234#define NV10_PGRAPH_WINDOWCLIP_HORIZONTAL 0x00400F00235#define NV10_PGRAPH_WINDOWCLIP_VERTICAL 0x00400F20236#define NV10_PGRAPH_XFMODE0 0x00400F40237#define NV10_PGRAPH_XFMODE1 0x00400F44238#define NV10_PGRAPH_GLOBALSTATE0 0x00400F48239#define NV10_PGRAPH_GLOBALSTATE1 0x00400F4C240#define NV10_PGRAPH_PIPE_ADDRESS 0x00400F50241#define NV10_PGRAPH_PIPE_DATA 0x00400F54242#define NV04_PGRAPH_DMA_START_0 0x00401000243#define NV04_PGRAPH_DMA_START_1 0x00401004244#define NV04_PGRAPH_DMA_LENGTH 0x00401008245#define NV04_PGRAPH_DMA_MISC 0x0040100C246#define NV04_PGRAPH_DMA_DATA_0 0x00401020247#define NV04_PGRAPH_DMA_DATA_1 0x00401024248#define NV04_PGRAPH_DMA_RM 0x00401030249#define NV04_PGRAPH_DMA_A_XLATE_INST 0x00401040250#define NV04_PGRAPH_DMA_A_CONTROL 0x00401044251#define NV04_PGRAPH_DMA_A_LIMIT 0x00401048252#define NV04_PGRAPH_DMA_A_TLB_PTE 0x0040104C253#define NV04_PGRAPH_DMA_A_TLB_TAG 0x00401050254#define NV04_PGRAPH_DMA_A_ADJ_OFFSET 0x00401054255#define NV04_PGRAPH_DMA_A_OFFSET 0x00401058256#define NV04_PGRAPH_DMA_A_SIZE 0x0040105C257#define NV04_PGRAPH_DMA_A_Y_SIZE 0x00401060258#define NV04_PGRAPH_DMA_B_XLATE_INST 0x00401080259#define NV04_PGRAPH_DMA_B_CONTROL 0x00401084260#define NV04_PGRAPH_DMA_B_LIMIT 0x00401088261#define NV04_PGRAPH_DMA_B_TLB_PTE 0x0040108C262#define NV04_PGRAPH_DMA_B_TLB_TAG 0x00401090263#define NV04_PGRAPH_DMA_B_ADJ_OFFSET 0x00401094264#define NV04_PGRAPH_DMA_B_OFFSET 0x00401098265#define NV04_PGRAPH_DMA_B_SIZE 0x0040109C266#define NV04_PGRAPH_DMA_B_Y_SIZE 0x004010A0267#define NV47_PGRAPH_ZCOMP1(i) (0x004068c0 + 4*(i))268#define NV40_PGRAPH_TILE1(i) (0x00406900 + (i*16))269#define NV40_PGRAPH_TLIMIT1(i) (0x00406904 + (i*16))270#define NV40_PGRAPH_TSIZE1(i) (0x00406908 + (i*16))271#define NV40_PGRAPH_TSTATUS1(i) (0x0040690C + (i*16))272#define NV40_PGRAPH_ZCOMP1(i) (0x00406980 + 4*(i))273#define NV41_PGRAPH_ZCOMP1(i) (0x004069c0 + 4*(i))274 275#endif276