aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_reg.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/i915/i915_reg.h')
-rw-r--r--drivers/gpu/drm/i915/i915_reg.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 0cb0067af4bb..0f32fd1a9d10 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -34,8 +34,19 @@
34#define _PORT3(port, a, b, c) ((port) == PORT_A ? (a) : \ 34#define _PORT3(port, a, b, c) ((port) == PORT_A ? (a) : \
35 (port) == PORT_B ? (b) : (c)) 35 (port) == PORT_B ? (b) : (c))
36 36
37#define _MASKED_BIT_ENABLE(a) (((a) << 16) | (a)) 37#define _MASKED_FIELD(mask, value) ({ \
38#define _MASKED_BIT_DISABLE(a) ((a) << 16) 38 if (__builtin_constant_p(mask)) \
39 BUILD_BUG_ON_MSG(((mask) & 0xffff0000), "Incorrect mask"); \
40 if (__builtin_constant_p(value)) \
41 BUILD_BUG_ON_MSG((value) & 0xffff0000, "Incorrect value"); \
42 if (__builtin_constant_p(mask) && __builtin_constant_p(value)) \
43 BUILD_BUG_ON_MSG((value) & ~(mask), \
44 "Incorrect value for mask"); \
45 (mask) << 16 | (value); })
46#define _MASKED_BIT_ENABLE(a) ({ typeof(a) _a = (a); _MASKED_FIELD(_a, _a); })
47#define _MASKED_BIT_DISABLE(a) (_MASKED_FIELD((a), 0))
48
49
39 50
40/* PCI config space */ 51/* PCI config space */
41 52
@@ -76,6 +87,7 @@
76#define I915_GC_RENDER_CLOCK_166_MHZ (0 << 0) 87#define I915_GC_RENDER_CLOCK_166_MHZ (0 << 0)
77#define I915_GC_RENDER_CLOCK_200_MHZ (1 << 0) 88#define I915_GC_RENDER_CLOCK_200_MHZ (1 << 0)
78#define I915_GC_RENDER_CLOCK_333_MHZ (4 << 0) 89#define I915_GC_RENDER_CLOCK_333_MHZ (4 << 0)
90#define GCDGMBUS 0xcc
79#define PCI_LBPC 0xf4 /* legacy/combination backlight modes, also called LBB */ 91#define PCI_LBPC 0xf4 /* legacy/combination backlight modes, also called LBB */
80 92
81 93
@@ -389,6 +401,7 @@
389#define PIPE_CONTROL_STORE_DATA_INDEX (1<<21) 401#define PIPE_CONTROL_STORE_DATA_INDEX (1<<21)
390#define PIPE_CONTROL_CS_STALL (1<<20) 402#define PIPE_CONTROL_CS_STALL (1<<20)
391#define PIPE_CONTROL_TLB_INVALIDATE (1<<18) 403#define PIPE_CONTROL_TLB_INVALIDATE (1<<18)
404#define PIPE_CONTROL_MEDIA_STATE_CLEAR (1<<16)
392#define PIPE_CONTROL_QW_WRITE (1<<14) 405#define PIPE_CONTROL_QW_WRITE (1<<14)
393#define PIPE_CONTROL_POST_SYNC_OP_MASK (3<<14) 406#define PIPE_CONTROL_POST_SYNC_OP_MASK (3<<14)
394#define PIPE_CONTROL_DEPTH_STALL (1<<13) 407#define PIPE_CONTROL_DEPTH_STALL (1<<13)
@@ -1123,6 +1136,7 @@ enum punit_power_well {
1123#define GEN6_VERSYNC (RING_SYNC_1(VEBOX_RING_BASE)) 1136#define GEN6_VERSYNC (RING_SYNC_1(VEBOX_RING_BASE))
1124#define GEN6_VEVSYNC (RING_SYNC_2(VEBOX_RING_BASE)) 1137#define GEN6_VEVSYNC (RING_SYNC_2(VEBOX_RING_BASE))
1125#define GEN6_NOSYNC 0 1138#define GEN6_NOSYNC 0
1139#define RING_PSMI_CTL(base) ((base)+0x50)
1126#define RING_MAX_IDLE(base) ((base)+0x54) 1140#define RING_MAX_IDLE(base) ((base)+0x54)
1127#define RING_HWS_PGA(base) ((base)+0x80) 1141#define RING_HWS_PGA(base) ((base)+0x80)
1128#define RING_HWS_PGA_GEN6(base) ((base)+0x2080) 1142#define RING_HWS_PGA_GEN6(base) ((base)+0x2080)
@@ -1289,7 +1303,7 @@ enum punit_power_well {
1289#define GEN6_WIZ_HASHING_8x8 GEN6_WIZ_HASHING(0, 0) 1303#define GEN6_WIZ_HASHING_8x8 GEN6_WIZ_HASHING(0, 0)
1290#define GEN6_WIZ_HASHING_8x4 GEN6_WIZ_HASHING(0, 1) 1304#define GEN6_WIZ_HASHING_8x4 GEN6_WIZ_HASHING(0, 1)
1291#define GEN6_WIZ_HASHING_16x4 GEN6_WIZ_HASHING(1, 0) 1305#define GEN6_WIZ_HASHING_16x4 GEN6_WIZ_HASHING(1, 0)
1292#define GEN6_WIZ_HASHING_MASK (GEN6_WIZ_HASHING(1, 1) << 16) 1306#define GEN6_WIZ_HASHING_MASK GEN6_WIZ_HASHING(1, 1)
1293#define GEN6_TD_FOUR_ROW_DISPATCH_DISABLE (1 << 5) 1307#define GEN6_TD_FOUR_ROW_DISPATCH_DISABLE (1 << 5)
1294 1308
1295#define GFX_MODE 0x02520 1309#define GFX_MODE 0x02520
@@ -1453,6 +1467,7 @@ enum punit_power_well {
1453#define GEN6_BLITTER_FBC_NOTIFY (1<<3) 1467#define GEN6_BLITTER_FBC_NOTIFY (1<<3)
1454 1468
1455#define GEN6_RC_SLEEP_PSMI_CONTROL 0x2050 1469#define GEN6_RC_SLEEP_PSMI_CONTROL 0x2050
1470#define GEN6_PSMI_SLEEP_MSG_DISABLE (1 << 0)
1456#define GEN8_RC_SEMA_IDLE_MSG_DISABLE (1 << 12) 1471#define GEN8_RC_SEMA_IDLE_MSG_DISABLE (1 << 12)
1457#define GEN8_FF_DOP_CLOCK_GATE_DISABLE (1<<10) 1472#define GEN8_FF_DOP_CLOCK_GATE_DISABLE (1<<10)
1458 1473