diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-12 11:40:25 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-12 11:40:25 -0500 |
commit | f878133bf022717b880d0e0995b8f91436fd605c (patch) | |
tree | b16528611d3af337f65f8ff0ae9b90b447e345ad /drivers/gpu/drm/i915/i915_reg.h | |
parent | 1b3862798cf4390b9110e54e405646e156f47c83 (diff) | |
parent | d15eda5c6edff4987af6f4423af0bab0c3251e74 (diff) |
Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (39 commits)
i915/gtt: fix ordering causing DMAR errors on object teardown.
i915/gtt: fix ordering issues with status setup and DMAR
drm/i915/execbuffer: Reorder binding of objects to favour restrictions
drm/i915: If we hit OOM when allocating GTT pages, clear the aperture
drm/i915/evict: Ensure we completely cleanup on failure
drm/i915/execbuffer: Correctly clear the current object list upon EFAULT
drm/i915/debugfs: Show all objects in the gtt
drm/i915: Record AGP memory type upon error
drm/i915: Periodically flush the active lists and requests
drm/i915/gtt: Unmap the PCI pages after unbinding them from the GTT
drm/i915: Record the error batchbuffer on each ring
drm/i915: Include TLB miss overhead for computing WM
drm/i915: Propagate error from flushing the ring
drm/i915: detect & report PCH display error interrupts
drm/i915: cleanup rc6 code
drm/i915: fix rc6 enabling around suspend/resume
drm/i915: re-enable rc6 support for Ironlake+
drm/i915: Make the ring IMR handling private
drm/i915/ringbuffer: Simplify the ring irq refcounting
drm/i915/debugfs: Show the per-ring IMR
...
Diffstat (limited to 'drivers/gpu/drm/i915/i915_reg.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_reg.h | 95 |
1 files changed, 88 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 8f948a6fbc1c..40a407f41f61 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h | |||
@@ -145,6 +145,8 @@ | |||
145 | #define MI_END_SCENE (1 << 4) /* flush binner and incr scene count */ | 145 | #define MI_END_SCENE (1 << 4) /* flush binner and incr scene count */ |
146 | #define MI_INVALIDATE_ISP (1 << 5) /* invalidate indirect state pointers */ | 146 | #define MI_INVALIDATE_ISP (1 << 5) /* invalidate indirect state pointers */ |
147 | #define MI_BATCH_BUFFER_END MI_INSTR(0x0a, 0) | 147 | #define MI_BATCH_BUFFER_END MI_INSTR(0x0a, 0) |
148 | #define MI_SUSPEND_FLUSH MI_INSTR(0x0b, 0) | ||
149 | #define MI_SUSPEND_FLUSH_EN (1<<0) | ||
148 | #define MI_REPORT_HEAD MI_INSTR(0x07, 0) | 150 | #define MI_REPORT_HEAD MI_INSTR(0x07, 0) |
149 | #define MI_OVERLAY_FLIP MI_INSTR(0x11,0) | 151 | #define MI_OVERLAY_FLIP MI_INSTR(0x11,0) |
150 | #define MI_OVERLAY_CONTINUE (0x0<<21) | 152 | #define MI_OVERLAY_CONTINUE (0x0<<21) |
@@ -159,6 +161,7 @@ | |||
159 | #define MI_MM_SPACE_PHYSICAL (0<<8) | 161 | #define MI_MM_SPACE_PHYSICAL (0<<8) |
160 | #define MI_SAVE_EXT_STATE_EN (1<<3) | 162 | #define MI_SAVE_EXT_STATE_EN (1<<3) |
161 | #define MI_RESTORE_EXT_STATE_EN (1<<2) | 163 | #define MI_RESTORE_EXT_STATE_EN (1<<2) |
164 | #define MI_FORCE_RESTORE (1<<1) | ||
162 | #define MI_RESTORE_INHIBIT (1<<0) | 165 | #define MI_RESTORE_INHIBIT (1<<0) |
163 | #define MI_STORE_DWORD_IMM MI_INSTR(0x20, 1) | 166 | #define MI_STORE_DWORD_IMM MI_INSTR(0x20, 1) |
164 | #define MI_MEM_VIRTUAL (1 << 22) /* 965+ only */ | 167 | #define MI_MEM_VIRTUAL (1 << 22) /* 965+ only */ |
@@ -288,6 +291,7 @@ | |||
288 | #define RING_HWS_PGA_GEN6(base) ((base)+0x2080) | 291 | #define RING_HWS_PGA_GEN6(base) ((base)+0x2080) |
289 | #define RING_ACTHD(base) ((base)+0x74) | 292 | #define RING_ACTHD(base) ((base)+0x74) |
290 | #define RING_NOPID(base) ((base)+0x94) | 293 | #define RING_NOPID(base) ((base)+0x94) |
294 | #define RING_IMR(base) ((base)+0xa8) | ||
291 | #define TAIL_ADDR 0x001FFFF8 | 295 | #define TAIL_ADDR 0x001FFFF8 |
292 | #define HEAD_WRAP_COUNT 0xFFE00000 | 296 | #define HEAD_WRAP_COUNT 0xFFE00000 |
293 | #define HEAD_WRAP_ONE 0x00200000 | 297 | #define HEAD_WRAP_ONE 0x00200000 |
@@ -1130,9 +1134,50 @@ | |||
1130 | #define RCBMINAVG 0x111a0 | 1134 | #define RCBMINAVG 0x111a0 |
1131 | #define RCUPEI 0x111b0 | 1135 | #define RCUPEI 0x111b0 |
1132 | #define RCDNEI 0x111b4 | 1136 | #define RCDNEI 0x111b4 |
1133 | #define MCHBAR_RENDER_STANDBY 0x111b8 | 1137 | #define RSTDBYCTL 0x111b8 |
1134 | #define RCX_SW_EXIT (1<<23) | 1138 | #define RS1EN (1<<31) |
1135 | #define RSX_STATUS_MASK 0x00700000 | 1139 | #define RS2EN (1<<30) |
1140 | #define RS3EN (1<<29) | ||
1141 | #define D3RS3EN (1<<28) /* Display D3 imlies RS3 */ | ||
1142 | #define SWPROMORSX (1<<27) /* RSx promotion timers ignored */ | ||
1143 | #define RCWAKERW (1<<26) /* Resetwarn from PCH causes wakeup */ | ||
1144 | #define DPRSLPVREN (1<<25) /* Fast voltage ramp enable */ | ||
1145 | #define GFXTGHYST (1<<24) /* Hysteresis to allow trunk gating */ | ||
1146 | #define RCX_SW_EXIT (1<<23) /* Leave RSx and prevent re-entry */ | ||
1147 | #define RSX_STATUS_MASK (7<<20) | ||
1148 | #define RSX_STATUS_ON (0<<20) | ||
1149 | #define RSX_STATUS_RC1 (1<<20) | ||
1150 | #define RSX_STATUS_RC1E (2<<20) | ||
1151 | #define RSX_STATUS_RS1 (3<<20) | ||
1152 | #define RSX_STATUS_RS2 (4<<20) /* aka rc6 */ | ||
1153 | #define RSX_STATUS_RSVD (5<<20) /* deep rc6 unsupported on ilk */ | ||
1154 | #define RSX_STATUS_RS3 (6<<20) /* rs3 unsupported on ilk */ | ||
1155 | #define RSX_STATUS_RSVD2 (7<<20) | ||
1156 | #define UWRCRSXE (1<<19) /* wake counter limit prevents rsx */ | ||
1157 | #define RSCRP (1<<18) /* rs requests control on rs1/2 reqs */ | ||
1158 | #define JRSC (1<<17) /* rsx coupled to cpu c-state */ | ||
1159 | #define RS2INC0 (1<<16) /* allow rs2 in cpu c0 */ | ||
1160 | #define RS1CONTSAV_MASK (3<<14) | ||
1161 | #define RS1CONTSAV_NO_RS1 (0<<14) /* rs1 doesn't save/restore context */ | ||
1162 | #define RS1CONTSAV_RSVD (1<<14) | ||
1163 | #define RS1CONTSAV_SAVE_RS1 (2<<14) /* rs1 saves context */ | ||
1164 | #define RS1CONTSAV_FULL_RS1 (3<<14) /* rs1 saves and restores context */ | ||
1165 | #define NORMSLEXLAT_MASK (3<<12) | ||
1166 | #define SLOW_RS123 (0<<12) | ||
1167 | #define SLOW_RS23 (1<<12) | ||
1168 | #define SLOW_RS3 (2<<12) | ||
1169 | #define NORMAL_RS123 (3<<12) | ||
1170 | #define RCMODE_TIMEOUT (1<<11) /* 0 is eval interval method */ | ||
1171 | #define IMPROMOEN (1<<10) /* promo is immediate or delayed until next idle interval (only for timeout method above) */ | ||
1172 | #define RCENTSYNC (1<<9) /* rs coupled to cpu c-state (3/6/7) */ | ||
1173 | #define STATELOCK (1<<7) /* locked to rs_cstate if 0 */ | ||
1174 | #define RS_CSTATE_MASK (3<<4) | ||
1175 | #define RS_CSTATE_C367_RS1 (0<<4) | ||
1176 | #define RS_CSTATE_C36_RS1_C7_RS2 (1<<4) | ||
1177 | #define RS_CSTATE_RSVD (2<<4) | ||
1178 | #define RS_CSTATE_C367_RS2 (3<<4) | ||
1179 | #define REDSAVES (1<<3) /* no context save if was idle during rs0 */ | ||
1180 | #define REDRESTORES (1<<2) /* no restore if was idle during rs0 */ | ||
1136 | #define VIDCTL 0x111c0 | 1181 | #define VIDCTL 0x111c0 |
1137 | #define VIDSTS 0x111c8 | 1182 | #define VIDSTS 0x111c8 |
1138 | #define VIDSTART 0x111cc /* 8 bits */ | 1183 | #define VIDSTART 0x111cc /* 8 bits */ |
@@ -2345,8 +2390,13 @@ | |||
2345 | 2390 | ||
2346 | /* Memory latency timer register */ | 2391 | /* Memory latency timer register */ |
2347 | #define MLTR_ILK 0x11222 | 2392 | #define MLTR_ILK 0x11222 |
2393 | #define MLTR_WM1_SHIFT 0 | ||
2394 | #define MLTR_WM2_SHIFT 8 | ||
2348 | /* the unit of memory self-refresh latency time is 0.5us */ | 2395 | /* the unit of memory self-refresh latency time is 0.5us */ |
2349 | #define ILK_SRLT_MASK 0x3f | 2396 | #define ILK_SRLT_MASK 0x3f |
2397 | #define ILK_LATENCY(shift) (I915_READ(MLTR_ILK) >> (shift) & ILK_SRLT_MASK) | ||
2398 | #define ILK_READ_WM1_LATENCY() ILK_LATENCY(MLTR_WM1_SHIFT) | ||
2399 | #define ILK_READ_WM2_LATENCY() ILK_LATENCY(MLTR_WM2_SHIFT) | ||
2350 | 2400 | ||
2351 | /* define the fifo size on Ironlake */ | 2401 | /* define the fifo size on Ironlake */ |
2352 | #define ILK_DISPLAY_FIFO 128 | 2402 | #define ILK_DISPLAY_FIFO 128 |
@@ -2728,12 +2778,41 @@ | |||
2728 | /* PCH */ | 2778 | /* PCH */ |
2729 | 2779 | ||
2730 | /* south display engine interrupt */ | 2780 | /* south display engine interrupt */ |
2781 | #define SDE_AUDIO_POWER_D (1 << 27) | ||
2782 | #define SDE_AUDIO_POWER_C (1 << 26) | ||
2783 | #define SDE_AUDIO_POWER_B (1 << 25) | ||
2784 | #define SDE_AUDIO_POWER_SHIFT (25) | ||
2785 | #define SDE_AUDIO_POWER_MASK (7 << SDE_AUDIO_POWER_SHIFT) | ||
2786 | #define SDE_GMBUS (1 << 24) | ||
2787 | #define SDE_AUDIO_HDCP_TRANSB (1 << 23) | ||
2788 | #define SDE_AUDIO_HDCP_TRANSA (1 << 22) | ||
2789 | #define SDE_AUDIO_HDCP_MASK (3 << 22) | ||
2790 | #define SDE_AUDIO_TRANSB (1 << 21) | ||
2791 | #define SDE_AUDIO_TRANSA (1 << 20) | ||
2792 | #define SDE_AUDIO_TRANS_MASK (3 << 20) | ||
2793 | #define SDE_POISON (1 << 19) | ||
2794 | /* 18 reserved */ | ||
2795 | #define SDE_FDI_RXB (1 << 17) | ||
2796 | #define SDE_FDI_RXA (1 << 16) | ||
2797 | #define SDE_FDI_MASK (3 << 16) | ||
2798 | #define SDE_AUXD (1 << 15) | ||
2799 | #define SDE_AUXC (1 << 14) | ||
2800 | #define SDE_AUXB (1 << 13) | ||
2801 | #define SDE_AUX_MASK (7 << 13) | ||
2802 | /* 12 reserved */ | ||
2731 | #define SDE_CRT_HOTPLUG (1 << 11) | 2803 | #define SDE_CRT_HOTPLUG (1 << 11) |
2732 | #define SDE_PORTD_HOTPLUG (1 << 10) | 2804 | #define SDE_PORTD_HOTPLUG (1 << 10) |
2733 | #define SDE_PORTC_HOTPLUG (1 << 9) | 2805 | #define SDE_PORTC_HOTPLUG (1 << 9) |
2734 | #define SDE_PORTB_HOTPLUG (1 << 8) | 2806 | #define SDE_PORTB_HOTPLUG (1 << 8) |
2735 | #define SDE_SDVOB_HOTPLUG (1 << 6) | 2807 | #define SDE_SDVOB_HOTPLUG (1 << 6) |
2736 | #define SDE_HOTPLUG_MASK (0xf << 8) | 2808 | #define SDE_HOTPLUG_MASK (0xf << 8) |
2809 | #define SDE_TRANSB_CRC_DONE (1 << 5) | ||
2810 | #define SDE_TRANSB_CRC_ERR (1 << 4) | ||
2811 | #define SDE_TRANSB_FIFO_UNDER (1 << 3) | ||
2812 | #define SDE_TRANSA_CRC_DONE (1 << 2) | ||
2813 | #define SDE_TRANSA_CRC_ERR (1 << 1) | ||
2814 | #define SDE_TRANSA_FIFO_UNDER (1 << 0) | ||
2815 | #define SDE_TRANS_MASK (0x3f) | ||
2737 | /* CPT */ | 2816 | /* CPT */ |
2738 | #define SDE_CRT_HOTPLUG_CPT (1 << 19) | 2817 | #define SDE_CRT_HOTPLUG_CPT (1 << 19) |
2739 | #define SDE_PORTD_HOTPLUG_CPT (1 << 23) | 2818 | #define SDE_PORTD_HOTPLUG_CPT (1 << 23) |
@@ -3174,10 +3253,11 @@ | |||
3174 | #define EDP_LINK_TRAIN_600MV_3_5DB_SNB_A (0x01<<22) | 3253 | #define EDP_LINK_TRAIN_600MV_3_5DB_SNB_A (0x01<<22) |
3175 | #define EDP_LINK_TRAIN_800MV_0DB_SNB_A (0x0<<22) | 3254 | #define EDP_LINK_TRAIN_800MV_0DB_SNB_A (0x0<<22) |
3176 | /* SNB B-stepping */ | 3255 | /* SNB B-stepping */ |
3177 | #define EDP_LINK_TRAIN_400MV_0DB_SNB_B (0x0<<22) | 3256 | #define EDP_LINK_TRAIN_400_600MV_0DB_SNB_B (0x0<<22) |
3178 | #define EDP_LINK_TRAIN_400MV_6DB_SNB_B (0x3a<<22) | 3257 | #define EDP_LINK_TRAIN_400MV_3_5DB_SNB_B (0x1<<22) |
3179 | #define EDP_LINK_TRAIN_600MV_3_5DB_SNB_B (0x39<<22) | 3258 | #define EDP_LINK_TRAIN_400_600MV_6DB_SNB_B (0x3a<<22) |
3180 | #define EDP_LINK_TRAIN_800MV_0DB_SNB_B (0x38<<22) | 3259 | #define EDP_LINK_TRAIN_600_800MV_3_5DB_SNB_B (0x39<<22) |
3260 | #define EDP_LINK_TRAIN_800_1200MV_0DB_SNB_B (0x38<<22) | ||
3181 | #define EDP_LINK_TRAIN_VOL_EMP_MASK_SNB (0x3f<<22) | 3261 | #define EDP_LINK_TRAIN_VOL_EMP_MASK_SNB (0x3f<<22) |
3182 | 3262 | ||
3183 | #define FORCEWAKE 0xA18C | 3263 | #define FORCEWAKE 0xA18C |
@@ -3239,6 +3319,7 @@ | |||
3239 | 3319 | ||
3240 | #define GEN6_PCODE_MAILBOX 0x138124 | 3320 | #define GEN6_PCODE_MAILBOX 0x138124 |
3241 | #define GEN6_PCODE_READY (1<<31) | 3321 | #define GEN6_PCODE_READY (1<<31) |
3322 | #define GEN6_READ_OC_PARAMS 0xc | ||
3242 | #define GEN6_PCODE_WRITE_MIN_FREQ_TABLE 0x9 | 3323 | #define GEN6_PCODE_WRITE_MIN_FREQ_TABLE 0x9 |
3243 | #define GEN6_PCODE_DATA 0x138128 | 3324 | #define GEN6_PCODE_DATA 0x138128 |
3244 | 3325 | ||