diff options
Diffstat (limited to 'drivers/gpu/drm/i915/i915_reg.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_reg.h | 170 |
1 files changed, 166 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index ab1bd2d3d3b6..3d59862c7ccd 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h | |||
@@ -53,6 +53,25 @@ | |||
53 | #define INTEL_GMCH_GMS_STOLEN_224M (0xc << 4) | 53 | #define INTEL_GMCH_GMS_STOLEN_224M (0xc << 4) |
54 | #define INTEL_GMCH_GMS_STOLEN_352M (0xd << 4) | 54 | #define INTEL_GMCH_GMS_STOLEN_352M (0xd << 4) |
55 | 55 | ||
56 | #define SNB_GMCH_CTRL 0x50 | ||
57 | #define SNB_GMCH_GMS_STOLEN_MASK 0xF8 | ||
58 | #define SNB_GMCH_GMS_STOLEN_32M (1 << 3) | ||
59 | #define SNB_GMCH_GMS_STOLEN_64M (2 << 3) | ||
60 | #define SNB_GMCH_GMS_STOLEN_96M (3 << 3) | ||
61 | #define SNB_GMCH_GMS_STOLEN_128M (4 << 3) | ||
62 | #define SNB_GMCH_GMS_STOLEN_160M (5 << 3) | ||
63 | #define SNB_GMCH_GMS_STOLEN_192M (6 << 3) | ||
64 | #define SNB_GMCH_GMS_STOLEN_224M (7 << 3) | ||
65 | #define SNB_GMCH_GMS_STOLEN_256M (8 << 3) | ||
66 | #define SNB_GMCH_GMS_STOLEN_288M (9 << 3) | ||
67 | #define SNB_GMCH_GMS_STOLEN_320M (0xa << 3) | ||
68 | #define SNB_GMCH_GMS_STOLEN_352M (0xb << 3) | ||
69 | #define SNB_GMCH_GMS_STOLEN_384M (0xc << 3) | ||
70 | #define SNB_GMCH_GMS_STOLEN_416M (0xd << 3) | ||
71 | #define SNB_GMCH_GMS_STOLEN_448M (0xe << 3) | ||
72 | #define SNB_GMCH_GMS_STOLEN_480M (0xf << 3) | ||
73 | #define SNB_GMCH_GMS_STOLEN_512M (0x10 << 3) | ||
74 | |||
56 | /* PCI config space */ | 75 | /* PCI config space */ |
57 | 76 | ||
58 | #define HPLLCC 0xc0 /* 855 only */ | 77 | #define HPLLCC 0xc0 /* 855 only */ |
@@ -61,6 +80,7 @@ | |||
61 | #define GC_CLOCK_100_200 (1 << 0) | 80 | #define GC_CLOCK_100_200 (1 << 0) |
62 | #define GC_CLOCK_100_133 (2 << 0) | 81 | #define GC_CLOCK_100_133 (2 << 0) |
63 | #define GC_CLOCK_166_250 (3 << 0) | 82 | #define GC_CLOCK_166_250 (3 << 0) |
83 | #define GCFGC2 0xda | ||
64 | #define GCFGC 0xf0 /* 915+ only */ | 84 | #define GCFGC 0xf0 /* 915+ only */ |
65 | #define GC_LOW_FREQUENCY_ENABLE (1 << 7) | 85 | #define GC_LOW_FREQUENCY_ENABLE (1 << 7) |
66 | #define GC_DISPLAY_CLOCK_190_200_MHZ (0 << 4) | 86 | #define GC_DISPLAY_CLOCK_190_200_MHZ (0 << 4) |
@@ -234,6 +254,9 @@ | |||
234 | #define I965_FENCE_REG_VALID (1<<0) | 254 | #define I965_FENCE_REG_VALID (1<<0) |
235 | #define I965_FENCE_MAX_PITCH_VAL 0x0400 | 255 | #define I965_FENCE_MAX_PITCH_VAL 0x0400 |
236 | 256 | ||
257 | #define FENCE_REG_SANDYBRIDGE_0 0x100000 | ||
258 | #define SANDYBRIDGE_FENCE_PITCH_SHIFT 32 | ||
259 | |||
237 | /* | 260 | /* |
238 | * Instruction and interrupt control regs | 261 | * Instruction and interrupt control regs |
239 | */ | 262 | */ |
@@ -265,6 +288,7 @@ | |||
265 | #define INSTDONE1 0x0207c /* 965+ only */ | 288 | #define INSTDONE1 0x0207c /* 965+ only */ |
266 | #define ACTHD_I965 0x02074 | 289 | #define ACTHD_I965 0x02074 |
267 | #define HWS_PGA 0x02080 | 290 | #define HWS_PGA 0x02080 |
291 | #define HWS_PGA_GEN6 0x04080 | ||
268 | #define HWS_ADDRESS_MASK 0xfffff000 | 292 | #define HWS_ADDRESS_MASK 0xfffff000 |
269 | #define HWS_START_ADDRESS_SHIFT 4 | 293 | #define HWS_START_ADDRESS_SHIFT 4 |
270 | #define PWRCTXA 0x2088 /* 965GM+ only */ | 294 | #define PWRCTXA 0x2088 /* 965GM+ only */ |
@@ -282,7 +306,7 @@ | |||
282 | #define I915_PIPE_CONTROL_NOTIFY_INTERRUPT (1<<18) | 306 | #define I915_PIPE_CONTROL_NOTIFY_INTERRUPT (1<<18) |
283 | #define I915_DISPLAY_PORT_INTERRUPT (1<<17) | 307 | #define I915_DISPLAY_PORT_INTERRUPT (1<<17) |
284 | #define I915_RENDER_COMMAND_PARSER_ERROR_INTERRUPT (1<<15) | 308 | #define I915_RENDER_COMMAND_PARSER_ERROR_INTERRUPT (1<<15) |
285 | #define I915_GMCH_THERMAL_SENSOR_EVENT_INTERRUPT (1<<14) | 309 | #define I915_GMCH_THERMAL_SENSOR_EVENT_INTERRUPT (1<<14) /* p-state */ |
286 | #define I915_HWB_OOM_INTERRUPT (1<<13) | 310 | #define I915_HWB_OOM_INTERRUPT (1<<13) |
287 | #define I915_SYNC_STATUS_INTERRUPT (1<<12) | 311 | #define I915_SYNC_STATUS_INTERRUPT (1<<12) |
288 | #define I915_DISPLAY_PLANE_A_FLIP_PENDING_INTERRUPT (1<<11) | 312 | #define I915_DISPLAY_PLANE_A_FLIP_PENDING_INTERRUPT (1<<11) |
@@ -306,11 +330,14 @@ | |||
306 | #define I915_ERROR_MEMORY_REFRESH (1<<1) | 330 | #define I915_ERROR_MEMORY_REFRESH (1<<1) |
307 | #define I915_ERROR_INSTRUCTION (1<<0) | 331 | #define I915_ERROR_INSTRUCTION (1<<0) |
308 | #define INSTPM 0x020c0 | 332 | #define INSTPM 0x020c0 |
333 | #define INSTPM_SELF_EN (1<<12) /* 915GM only */ | ||
309 | #define ACTHD 0x020c8 | 334 | #define ACTHD 0x020c8 |
310 | #define FW_BLC 0x020d8 | 335 | #define FW_BLC 0x020d8 |
311 | #define FW_BLC2 0x020dc | 336 | #define FW_BLC2 0x020dc |
312 | #define FW_BLC_SELF 0x020e0 /* 915+ only */ | 337 | #define FW_BLC_SELF 0x020e0 /* 915+ only */ |
313 | #define FW_BLC_SELF_EN (1<<15) | 338 | #define FW_BLC_SELF_EN_MASK (1<<31) |
339 | #define FW_BLC_SELF_FIFO_MASK (1<<16) /* 945 only */ | ||
340 | #define FW_BLC_SELF_EN (1<<15) /* 945 only */ | ||
314 | #define MM_BURST_LENGTH 0x00700000 | 341 | #define MM_BURST_LENGTH 0x00700000 |
315 | #define MM_FIFO_WATERMARK 0x0001F000 | 342 | #define MM_FIFO_WATERMARK 0x0001F000 |
316 | #define LM_BURST_LENGTH 0x00000700 | 343 | #define LM_BURST_LENGTH 0x00000700 |
@@ -324,6 +351,7 @@ | |||
324 | #define CM0_COLOR_EVICT_DISABLE (1<<3) | 351 | #define CM0_COLOR_EVICT_DISABLE (1<<3) |
325 | #define CM0_DEPTH_WRITE_DISABLE (1<<1) | 352 | #define CM0_DEPTH_WRITE_DISABLE (1<<1) |
326 | #define CM0_RC_OP_FLUSH_DISABLE (1<<0) | 353 | #define CM0_RC_OP_FLUSH_DISABLE (1<<0) |
354 | #define BB_ADDR 0x02140 /* 8 bytes */ | ||
327 | #define GFX_FLSH_CNTL 0x02170 /* 915+ only */ | 355 | #define GFX_FLSH_CNTL 0x02170 /* 915+ only */ |
328 | 356 | ||
329 | 357 | ||
@@ -784,10 +812,144 @@ | |||
784 | #define CLKCFG_MEM_800 (3 << 4) | 812 | #define CLKCFG_MEM_800 (3 << 4) |
785 | #define CLKCFG_MEM_MASK (7 << 4) | 813 | #define CLKCFG_MEM_MASK (7 << 4) |
786 | 814 | ||
787 | /** GM965 GM45 render standby register */ | 815 | #define CRSTANDVID 0x11100 |
788 | #define MCHBAR_RENDER_STANDBY 0x111B8 | 816 | #define PXVFREQ_BASE 0x11110 /* P[0-15]VIDFREQ (0x1114c) (Ironlake) */ |
817 | #define PXVFREQ_PX_MASK 0x7f000000 | ||
818 | #define PXVFREQ_PX_SHIFT 24 | ||
819 | #define VIDFREQ_BASE 0x11110 | ||
820 | #define VIDFREQ1 0x11110 /* VIDFREQ1-4 (0x1111c) (Cantiga) */ | ||
821 | #define VIDFREQ2 0x11114 | ||
822 | #define VIDFREQ3 0x11118 | ||
823 | #define VIDFREQ4 0x1111c | ||
824 | #define VIDFREQ_P0_MASK 0x1f000000 | ||
825 | #define VIDFREQ_P0_SHIFT 24 | ||
826 | #define VIDFREQ_P0_CSCLK_MASK 0x00f00000 | ||
827 | #define VIDFREQ_P0_CSCLK_SHIFT 20 | ||
828 | #define VIDFREQ_P0_CRCLK_MASK 0x000f0000 | ||
829 | #define VIDFREQ_P0_CRCLK_SHIFT 16 | ||
830 | #define VIDFREQ_P1_MASK 0x00001f00 | ||
831 | #define VIDFREQ_P1_SHIFT 8 | ||
832 | #define VIDFREQ_P1_CSCLK_MASK 0x000000f0 | ||
833 | #define VIDFREQ_P1_CSCLK_SHIFT 4 | ||
834 | #define VIDFREQ_P1_CRCLK_MASK 0x0000000f | ||
835 | #define INTTOEXT_BASE_ILK 0x11300 | ||
836 | #define INTTOEXT_BASE 0x11120 /* INTTOEXT1-8 (0x1113c) */ | ||
837 | #define INTTOEXT_MAP3_SHIFT 24 | ||
838 | #define INTTOEXT_MAP3_MASK (0x1f << INTTOEXT_MAP3_SHIFT) | ||
839 | #define INTTOEXT_MAP2_SHIFT 16 | ||
840 | #define INTTOEXT_MAP2_MASK (0x1f << INTTOEXT_MAP2_SHIFT) | ||
841 | #define INTTOEXT_MAP1_SHIFT 8 | ||
842 | #define INTTOEXT_MAP1_MASK (0x1f << INTTOEXT_MAP1_SHIFT) | ||
843 | #define INTTOEXT_MAP0_SHIFT 0 | ||
844 | #define INTTOEXT_MAP0_MASK (0x1f << INTTOEXT_MAP0_SHIFT) | ||
845 | #define MEMSWCTL 0x11170 /* Ironlake only */ | ||
846 | #define MEMCTL_CMD_MASK 0xe000 | ||
847 | #define MEMCTL_CMD_SHIFT 13 | ||
848 | #define MEMCTL_CMD_RCLK_OFF 0 | ||
849 | #define MEMCTL_CMD_RCLK_ON 1 | ||
850 | #define MEMCTL_CMD_CHFREQ 2 | ||
851 | #define MEMCTL_CMD_CHVID 3 | ||
852 | #define MEMCTL_CMD_VMMOFF 4 | ||
853 | #define MEMCTL_CMD_VMMON 5 | ||
854 | #define MEMCTL_CMD_STS (1<<12) /* write 1 triggers command, clears | ||
855 | when command complete */ | ||
856 | #define MEMCTL_FREQ_MASK 0x0f00 /* jitter, from 0-15 */ | ||
857 | #define MEMCTL_FREQ_SHIFT 8 | ||
858 | #define MEMCTL_SFCAVM (1<<7) | ||
859 | #define MEMCTL_TGT_VID_MASK 0x007f | ||
860 | #define MEMIHYST 0x1117c | ||
861 | #define MEMINTREN 0x11180 /* 16 bits */ | ||
862 | #define MEMINT_RSEXIT_EN (1<<8) | ||
863 | #define MEMINT_CX_SUPR_EN (1<<7) | ||
864 | #define MEMINT_CONT_BUSY_EN (1<<6) | ||
865 | #define MEMINT_AVG_BUSY_EN (1<<5) | ||
866 | #define MEMINT_EVAL_CHG_EN (1<<4) | ||
867 | #define MEMINT_MON_IDLE_EN (1<<3) | ||
868 | #define MEMINT_UP_EVAL_EN (1<<2) | ||
869 | #define MEMINT_DOWN_EVAL_EN (1<<1) | ||
870 | #define MEMINT_SW_CMD_EN (1<<0) | ||
871 | #define MEMINTRSTR 0x11182 /* 16 bits */ | ||
872 | #define MEM_RSEXIT_MASK 0xc000 | ||
873 | #define MEM_RSEXIT_SHIFT 14 | ||
874 | #define MEM_CONT_BUSY_MASK 0x3000 | ||
875 | #define MEM_CONT_BUSY_SHIFT 12 | ||
876 | #define MEM_AVG_BUSY_MASK 0x0c00 | ||
877 | #define MEM_AVG_BUSY_SHIFT 10 | ||
878 | #define MEM_EVAL_CHG_MASK 0x0300 | ||
879 | #define MEM_EVAL_BUSY_SHIFT 8 | ||
880 | #define MEM_MON_IDLE_MASK 0x00c0 | ||
881 | #define MEM_MON_IDLE_SHIFT 6 | ||
882 | #define MEM_UP_EVAL_MASK 0x0030 | ||
883 | #define MEM_UP_EVAL_SHIFT 4 | ||
884 | #define MEM_DOWN_EVAL_MASK 0x000c | ||
885 | #define MEM_DOWN_EVAL_SHIFT 2 | ||
886 | #define MEM_SW_CMD_MASK 0x0003 | ||
887 | #define MEM_INT_STEER_GFX 0 | ||
888 | #define MEM_INT_STEER_CMR 1 | ||
889 | #define MEM_INT_STEER_SMI 2 | ||
890 | #define MEM_INT_STEER_SCI 3 | ||
891 | #define MEMINTRSTS 0x11184 | ||
892 | #define MEMINT_RSEXIT (1<<7) | ||
893 | #define MEMINT_CONT_BUSY (1<<6) | ||
894 | #define MEMINT_AVG_BUSY (1<<5) | ||
895 | #define MEMINT_EVAL_CHG (1<<4) | ||
896 | #define MEMINT_MON_IDLE (1<<3) | ||
897 | #define MEMINT_UP_EVAL (1<<2) | ||
898 | #define MEMINT_DOWN_EVAL (1<<1) | ||
899 | #define MEMINT_SW_CMD (1<<0) | ||
900 | #define MEMMODECTL 0x11190 | ||
901 | #define MEMMODE_BOOST_EN (1<<31) | ||
902 | #define MEMMODE_BOOST_FREQ_MASK 0x0f000000 /* jitter for boost, 0-15 */ | ||
903 | #define MEMMODE_BOOST_FREQ_SHIFT 24 | ||
904 | #define MEMMODE_IDLE_MODE_MASK 0x00030000 | ||
905 | #define MEMMODE_IDLE_MODE_SHIFT 16 | ||
906 | #define MEMMODE_IDLE_MODE_EVAL 0 | ||
907 | #define MEMMODE_IDLE_MODE_CONT 1 | ||
908 | #define MEMMODE_HWIDLE_EN (1<<15) | ||
909 | #define MEMMODE_SWMODE_EN (1<<14) | ||
910 | #define MEMMODE_RCLK_GATE (1<<13) | ||
911 | #define MEMMODE_HW_UPDATE (1<<12) | ||
912 | #define MEMMODE_FSTART_MASK 0x00000f00 /* starting jitter, 0-15 */ | ||
913 | #define MEMMODE_FSTART_SHIFT 8 | ||
914 | #define MEMMODE_FMAX_MASK 0x000000f0 /* max jitter, 0-15 */ | ||
915 | #define MEMMODE_FMAX_SHIFT 4 | ||
916 | #define MEMMODE_FMIN_MASK 0x0000000f /* min jitter, 0-15 */ | ||
917 | #define RCBMAXAVG 0x1119c | ||
918 | #define MEMSWCTL2 0x1119e /* Cantiga only */ | ||
919 | #define SWMEMCMD_RENDER_OFF (0 << 13) | ||
920 | #define SWMEMCMD_RENDER_ON (1 << 13) | ||
921 | #define SWMEMCMD_SWFREQ (2 << 13) | ||
922 | #define SWMEMCMD_TARVID (3 << 13) | ||
923 | #define SWMEMCMD_VRM_OFF (4 << 13) | ||
924 | #define SWMEMCMD_VRM_ON (5 << 13) | ||
925 | #define CMDSTS (1<<12) | ||
926 | #define SFCAVM (1<<11) | ||
927 | #define SWFREQ_MASK 0x0380 /* P0-7 */ | ||
928 | #define SWFREQ_SHIFT 7 | ||
929 | #define TARVID_MASK 0x001f | ||
930 | #define MEMSTAT_CTG 0x111a0 | ||
931 | #define RCBMINAVG 0x111a0 | ||
932 | #define RCUPEI 0x111b0 | ||
933 | #define RCDNEI 0x111b4 | ||
934 | #define MCHBAR_RENDER_STANDBY 0x111b8 | ||
789 | #define RCX_SW_EXIT (1<<23) | 935 | #define RCX_SW_EXIT (1<<23) |
790 | #define RSX_STATUS_MASK 0x00700000 | 936 | #define RSX_STATUS_MASK 0x00700000 |
937 | #define VIDCTL 0x111c0 | ||
938 | #define VIDSTS 0x111c8 | ||
939 | #define VIDSTART 0x111cc /* 8 bits */ | ||
940 | #define MEMSTAT_ILK 0x111f8 | ||
941 | #define MEMSTAT_VID_MASK 0x7f00 | ||
942 | #define MEMSTAT_VID_SHIFT 8 | ||
943 | #define MEMSTAT_PSTATE_MASK 0x00f8 | ||
944 | #define MEMSTAT_PSTATE_SHIFT 3 | ||
945 | #define MEMSTAT_MON_ACTV (1<<2) | ||
946 | #define MEMSTAT_SRC_CTL_MASK 0x0003 | ||
947 | #define MEMSTAT_SRC_CTL_CORE 0 | ||
948 | #define MEMSTAT_SRC_CTL_TRB 1 | ||
949 | #define MEMSTAT_SRC_CTL_THM 2 | ||
950 | #define MEMSTAT_SRC_CTL_STDBY 3 | ||
951 | #define RCPREVBSYTUPAVG 0x113b8 | ||
952 | #define RCPREVBSYTDNAVG 0x113bc | ||
791 | #define PEG_BAND_GAP_DATA 0x14d68 | 953 | #define PEG_BAND_GAP_DATA 0x14d68 |
792 | 954 | ||
793 | /* | 955 | /* |