aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/r600d.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/radeon/r600d.h')
-rw-r--r--drivers/gpu/drm/radeon/r600d.h94
1 files changed, 89 insertions, 5 deletions
diff --git a/drivers/gpu/drm/radeon/r600d.h b/drivers/gpu/drm/radeon/r600d.h
index 858a1920c0d7..0245ae6c204e 100644
--- a/drivers/gpu/drm/radeon/r600d.h
+++ b/drivers/gpu/drm/radeon/r600d.h
@@ -51,6 +51,12 @@
51#define PTE_READABLE (1 << 5) 51#define PTE_READABLE (1 << 5)
52#define PTE_WRITEABLE (1 << 6) 52#define PTE_WRITEABLE (1 << 6)
53 53
54/* tiling bits */
55#define ARRAY_LINEAR_GENERAL 0x00000000
56#define ARRAY_LINEAR_ALIGNED 0x00000001
57#define ARRAY_1D_TILED_THIN1 0x00000002
58#define ARRAY_2D_TILED_THIN1 0x00000004
59
54/* Registers */ 60/* Registers */
55#define ARB_POP 0x2418 61#define ARB_POP 0x2418
56#define ENABLE_TC128 (1 << 30) 62#define ENABLE_TC128 (1 << 30)
@@ -148,13 +154,14 @@
148#define ROQ_IB2_START(x) ((x) << 8) 154#define ROQ_IB2_START(x) ((x) << 8)
149#define CP_RB_BASE 0xC100 155#define CP_RB_BASE 0xC100
150#define CP_RB_CNTL 0xC104 156#define CP_RB_CNTL 0xC104
151#define RB_BUFSZ(x) ((x)<<0) 157#define RB_BUFSZ(x) ((x) << 0)
152#define RB_BLKSZ(x) ((x)<<8) 158#define RB_BLKSZ(x) ((x) << 8)
153#define RB_NO_UPDATE (1<<27) 159#define RB_NO_UPDATE (1 << 27)
154#define RB_RPTR_WR_ENA (1<<31) 160#define RB_RPTR_WR_ENA (1 << 31)
155#define BUF_SWAP_32BIT (2 << 16) 161#define BUF_SWAP_32BIT (2 << 16)
156#define CP_RB_RPTR 0x8700 162#define CP_RB_RPTR 0x8700
157#define CP_RB_RPTR_ADDR 0xC10C 163#define CP_RB_RPTR_ADDR 0xC10C
164#define RB_RPTR_SWAP(x) ((x) << 0)
158#define CP_RB_RPTR_ADDR_HI 0xC110 165#define CP_RB_RPTR_ADDR_HI 0xC110
159#define CP_RB_RPTR_WR 0xC108 166#define CP_RB_RPTR_WR 0xC108
160#define CP_RB_WPTR 0xC114 167#define CP_RB_WPTR 0xC114
@@ -474,6 +481,7 @@
474#define VGT_VERTEX_REUSE_BLOCK_CNTL 0x28C58 481#define VGT_VERTEX_REUSE_BLOCK_CNTL 0x28C58
475#define VTX_REUSE_DEPTH_MASK 0x000000FF 482#define VTX_REUSE_DEPTH_MASK 0x000000FF
476#define VGT_EVENT_INITIATOR 0x28a90 483#define VGT_EVENT_INITIATOR 0x28a90
484# define CACHE_FLUSH_AND_INV_EVENT_TS (0x14 << 0)
477# define CACHE_FLUSH_AND_INV_EVENT (0x16 << 0) 485# define CACHE_FLUSH_AND_INV_EVENT (0x16 << 0)
478 486
479#define VM_CONTEXT0_CNTL 0x1410 487#define VM_CONTEXT0_CNTL 0x1410
@@ -528,7 +536,7 @@
528#define IH_RB_WPTR_ADDR_LO 0x3e14 536#define IH_RB_WPTR_ADDR_LO 0x3e14
529#define IH_CNTL 0x3e18 537#define IH_CNTL 0x3e18
530# define ENABLE_INTR (1 << 0) 538# define ENABLE_INTR (1 << 0)
531# define IH_MC_SWAP(x) ((x) << 2) 539# define IH_MC_SWAP(x) ((x) << 1)
532# define IH_MC_SWAP_NONE 0 540# define IH_MC_SWAP_NONE 0
533# define IH_MC_SWAP_16BIT 1 541# define IH_MC_SWAP_16BIT 1
534# define IH_MC_SWAP_32BIT 2 542# define IH_MC_SWAP_32BIT 2
@@ -721,6 +729,54 @@
721/* DCE 3.2 */ 729/* DCE 3.2 */
722# define DC_HPDx_EN (1 << 28) 730# define DC_HPDx_EN (1 << 28)
723 731
732#define D1GRPH_INTERRUPT_STATUS 0x6158
733#define D2GRPH_INTERRUPT_STATUS 0x6958
734# define DxGRPH_PFLIP_INT_OCCURRED (1 << 0)
735# define DxGRPH_PFLIP_INT_CLEAR (1 << 8)
736#define D1GRPH_INTERRUPT_CONTROL 0x615c
737#define D2GRPH_INTERRUPT_CONTROL 0x695c
738# define DxGRPH_PFLIP_INT_MASK (1 << 0)
739# define DxGRPH_PFLIP_INT_TYPE (1 << 8)
740
741/* PCIE link stuff */
742#define PCIE_LC_TRAINING_CNTL 0xa1 /* PCIE_P */
743# define LC_POINT_7_PLUS_EN (1 << 6)
744#define PCIE_LC_LINK_WIDTH_CNTL 0xa2 /* PCIE_P */
745# define LC_LINK_WIDTH_SHIFT 0
746# define LC_LINK_WIDTH_MASK 0x7
747# define LC_LINK_WIDTH_X0 0
748# define LC_LINK_WIDTH_X1 1
749# define LC_LINK_WIDTH_X2 2
750# define LC_LINK_WIDTH_X4 3
751# define LC_LINK_WIDTH_X8 4
752# define LC_LINK_WIDTH_X16 6
753# define LC_LINK_WIDTH_RD_SHIFT 4
754# define LC_LINK_WIDTH_RD_MASK 0x70
755# define LC_RECONFIG_ARC_MISSING_ESCAPE (1 << 7)
756# define LC_RECONFIG_NOW (1 << 8)
757# define LC_RENEGOTIATION_SUPPORT (1 << 9)
758# define LC_RENEGOTIATE_EN (1 << 10)
759# define LC_SHORT_RECONFIG_EN (1 << 11)
760# define LC_UPCONFIGURE_SUPPORT (1 << 12)
761# define LC_UPCONFIGURE_DIS (1 << 13)
762#define PCIE_LC_SPEED_CNTL 0xa4 /* PCIE_P */
763# define LC_GEN2_EN_STRAP (1 << 0)
764# define LC_TARGET_LINK_SPEED_OVERRIDE_EN (1 << 1)
765# define LC_FORCE_EN_HW_SPEED_CHANGE (1 << 5)
766# define LC_FORCE_DIS_HW_SPEED_CHANGE (1 << 6)
767# define LC_SPEED_CHANGE_ATTEMPTS_ALLOWED_MASK (0x3 << 8)
768# define LC_SPEED_CHANGE_ATTEMPTS_ALLOWED_SHIFT 3
769# define LC_CURRENT_DATA_RATE (1 << 11)
770# define LC_VOLTAGE_TIMER_SEL_MASK (0xf << 14)
771# define LC_CLR_FAILED_SPD_CHANGE_CNT (1 << 21)
772# define LC_OTHER_SIDE_EVER_SENT_GEN2 (1 << 23)
773# define LC_OTHER_SIDE_SUPPORTS_GEN2 (1 << 24)
774#define MM_CFGREGS_CNTL 0x544c
775# define MM_WR_TO_CFG_EN (1 << 3)
776#define LINK_CNTL2 0x88 /* F0 */
777# define TARGET_LINK_SPEED_MASK (0xf << 0)
778# define SELECTABLE_DEEMPHASIS (1 << 6)
779
724/* 780/*
725 * PM4 781 * PM4
726 */ 782 */
@@ -775,7 +831,27 @@
775#define PACKET3_ME_INITIALIZE_DEVICE_ID(x) ((x) << 16) 831#define PACKET3_ME_INITIALIZE_DEVICE_ID(x) ((x) << 16)
776#define PACKET3_COND_WRITE 0x45 832#define PACKET3_COND_WRITE 0x45
777#define PACKET3_EVENT_WRITE 0x46 833#define PACKET3_EVENT_WRITE 0x46
834#define EVENT_TYPE(x) ((x) << 0)
835#define EVENT_INDEX(x) ((x) << 8)
836 /* 0 - any non-TS event
837 * 1 - ZPASS_DONE
838 * 2 - SAMPLE_PIPELINESTAT
839 * 3 - SAMPLE_STREAMOUTSTAT*
840 * 4 - *S_PARTIAL_FLUSH
841 * 5 - TS events
842 */
778#define PACKET3_EVENT_WRITE_EOP 0x47 843#define PACKET3_EVENT_WRITE_EOP 0x47
844#define DATA_SEL(x) ((x) << 29)
845 /* 0 - discard
846 * 1 - send low 32bit data
847 * 2 - send 64bit data
848 * 3 - send 64bit counter value
849 */
850#define INT_SEL(x) ((x) << 24)
851 /* 0 - none
852 * 1 - interrupt only (DATA_SEL = 0)
853 * 2 - interrupt when data write is confirmed
854 */
779#define PACKET3_ONE_REG_WRITE 0x57 855#define PACKET3_ONE_REG_WRITE 0x57
780#define PACKET3_SET_CONFIG_REG 0x68 856#define PACKET3_SET_CONFIG_REG 0x68
781#define PACKET3_SET_CONFIG_REG_OFFSET 0x00008000 857#define PACKET3_SET_CONFIG_REG_OFFSET 0x00008000
@@ -1228,6 +1304,14 @@
1228#define V_038004_FMT_16_16_16_FLOAT 0x0000002E 1304#define V_038004_FMT_16_16_16_FLOAT 0x0000002E
1229#define V_038004_FMT_32_32_32 0x0000002F 1305#define V_038004_FMT_32_32_32 0x0000002F
1230#define V_038004_FMT_32_32_32_FLOAT 0x00000030 1306#define V_038004_FMT_32_32_32_FLOAT 0x00000030
1307#define V_038004_FMT_BC1 0x00000031
1308#define V_038004_FMT_BC2 0x00000032
1309#define V_038004_FMT_BC3 0x00000033
1310#define V_038004_FMT_BC4 0x00000034
1311#define V_038004_FMT_BC5 0x00000035
1312#define V_038004_FMT_BC6 0x00000036
1313#define V_038004_FMT_BC7 0x00000037
1314#define V_038004_FMT_32_AS_32_32_32_32 0x00000038
1231#define R_038010_SQ_TEX_RESOURCE_WORD4_0 0x038010 1315#define R_038010_SQ_TEX_RESOURCE_WORD4_0 0x038010
1232#define S_038010_FORMAT_COMP_X(x) (((x) & 0x3) << 0) 1316#define S_038010_FORMAT_COMP_X(x) (((x) & 0x3) << 0)
1233#define G_038010_FORMAT_COMP_X(x) (((x) >> 0) & 0x3) 1317#define G_038010_FORMAT_COMP_X(x) (((x) >> 0) & 0x3)