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.h112
1 files changed, 110 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index d43fa0e627f8..3102907a96a7 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -248,6 +248,16 @@
248#define MI_DISPLAY_FLIP_IVB_SPRITE_B (3 << 19) 248#define MI_DISPLAY_FLIP_IVB_SPRITE_B (3 << 19)
249#define MI_DISPLAY_FLIP_IVB_PLANE_C (4 << 19) 249#define MI_DISPLAY_FLIP_IVB_PLANE_C (4 << 19)
250#define MI_DISPLAY_FLIP_IVB_SPRITE_C (5 << 19) 250#define MI_DISPLAY_FLIP_IVB_SPRITE_C (5 << 19)
251/* SKL ones */
252#define MI_DISPLAY_FLIP_SKL_PLANE_1_A (0 << 8)
253#define MI_DISPLAY_FLIP_SKL_PLANE_1_B (1 << 8)
254#define MI_DISPLAY_FLIP_SKL_PLANE_1_C (2 << 8)
255#define MI_DISPLAY_FLIP_SKL_PLANE_2_A (4 << 8)
256#define MI_DISPLAY_FLIP_SKL_PLANE_2_B (5 << 8)
257#define MI_DISPLAY_FLIP_SKL_PLANE_2_C (6 << 8)
258#define MI_DISPLAY_FLIP_SKL_PLANE_3_A (7 << 8)
259#define MI_DISPLAY_FLIP_SKL_PLANE_3_B (8 << 8)
260#define MI_DISPLAY_FLIP_SKL_PLANE_3_C (9 << 8)
251#define MI_SEMAPHORE_MBOX MI_INSTR(0x16, 1) /* gen6, gen7 */ 261#define MI_SEMAPHORE_MBOX MI_INSTR(0x16, 1) /* gen6, gen7 */
252#define MI_SEMAPHORE_GLOBAL_GTT (1<<22) 262#define MI_SEMAPHORE_GLOBAL_GTT (1<<22)
253#define MI_SEMAPHORE_UPDATE (1<<21) 263#define MI_SEMAPHORE_UPDATE (1<<21)
@@ -314,6 +324,8 @@
314#define MI_BATCH_GTT (2<<6) /* aliased with (1<<7) on gen4 */ 324#define MI_BATCH_GTT (2<<6) /* aliased with (1<<7) on gen4 */
315#define MI_BATCH_BUFFER_START_GEN8 MI_INSTR(0x31, 1) 325#define MI_BATCH_BUFFER_START_GEN8 MI_INSTR(0x31, 1)
316 326
327#define MI_PREDICATE_SRC0 (0x2400)
328#define MI_PREDICATE_SRC1 (0x2408)
317 329
318#define MI_PREDICATE_RESULT_2 (0x2214) 330#define MI_PREDICATE_RESULT_2 (0x2214)
319#define LOWER_SLICE_ENABLED (1<<0) 331#define LOWER_SLICE_ENABLED (1<<0)
@@ -564,6 +576,7 @@ enum punit_power_well {
564#define PUNIT_REG_GPU_LFM 0xd3 576#define PUNIT_REG_GPU_LFM 0xd3
565#define PUNIT_REG_GPU_FREQ_REQ 0xd4 577#define PUNIT_REG_GPU_FREQ_REQ 0xd4
566#define PUNIT_REG_GPU_FREQ_STS 0xd8 578#define PUNIT_REG_GPU_FREQ_STS 0xd8
579#define GPLLENABLE (1<<4)
567#define GENFREQSTATUS (1<<0) 580#define GENFREQSTATUS (1<<0)
568#define PUNIT_REG_MEDIA_TURBO_FREQ_REQ 0xdc 581#define PUNIT_REG_MEDIA_TURBO_FREQ_REQ 0xdc
569#define PUNIT_REG_CZ_TIMESTAMP 0xce 582#define PUNIT_REG_CZ_TIMESTAMP 0xce
@@ -2030,6 +2043,8 @@ enum punit_power_well {
2030#define DCC_ADDRESSING_MODE_MASK (3 << 0) 2043#define DCC_ADDRESSING_MODE_MASK (3 << 0)
2031#define DCC_CHANNEL_XOR_DISABLE (1 << 10) 2044#define DCC_CHANNEL_XOR_DISABLE (1 << 10)
2032#define DCC_CHANNEL_XOR_BIT_17 (1 << 9) 2045#define DCC_CHANNEL_XOR_BIT_17 (1 << 9)
2046#define DCC2 0x10204
2047#define DCC2_MODIFIED_ENHANCED_DISABLE (1 << 20)
2033 2048
2034/* Pineview MCH register contains DDR3 setting */ 2049/* Pineview MCH register contains DDR3 setting */
2035#define CSHRDDR3CTL 0x101a8 2050#define CSHRDDR3CTL 0x101a8
@@ -2313,7 +2328,6 @@ enum punit_power_well {
2313 2328
2314#define GEN6_GT_THREAD_STATUS_REG 0x13805c 2329#define GEN6_GT_THREAD_STATUS_REG 0x13805c
2315#define GEN6_GT_THREAD_STATUS_CORE_MASK 0x7 2330#define GEN6_GT_THREAD_STATUS_CORE_MASK 0x7
2316#define GEN6_GT_THREAD_STATUS_CORE_MASK_HSW (0x7 | (0x07 << 16))
2317 2331
2318#define GEN6_GT_PERF_STATUS (MCHBAR_MIRROR_BASE_SNB + 0x5948) 2332#define GEN6_GT_PERF_STATUS (MCHBAR_MIRROR_BASE_SNB + 0x5948)
2319#define GEN6_RP_STATE_LIMITS (MCHBAR_MIRROR_BASE_SNB + 0x5994) 2333#define GEN6_RP_STATE_LIMITS (MCHBAR_MIRROR_BASE_SNB + 0x5994)
@@ -4904,6 +4918,18 @@ enum punit_power_well {
4904#define PF_VSCALE(pipe) _PIPE(pipe, _PFA_VSCALE, _PFB_VSCALE) 4918#define PF_VSCALE(pipe) _PIPE(pipe, _PFA_VSCALE, _PFB_VSCALE)
4905#define PF_HSCALE(pipe) _PIPE(pipe, _PFA_HSCALE, _PFB_HSCALE) 4919#define PF_HSCALE(pipe) _PIPE(pipe, _PFA_HSCALE, _PFB_HSCALE)
4906 4920
4921#define _PSA_CTL 0x68180
4922#define _PSB_CTL 0x68980
4923#define PS_ENABLE (1<<31)
4924#define _PSA_WIN_SZ 0x68174
4925#define _PSB_WIN_SZ 0x68974
4926#define _PSA_WIN_POS 0x68170
4927#define _PSB_WIN_POS 0x68970
4928
4929#define PS_CTL(pipe) _PIPE(pipe, _PSA_CTL, _PSB_CTL)
4930#define PS_WIN_SZ(pipe) _PIPE(pipe, _PSA_WIN_SZ, _PSB_WIN_SZ)
4931#define PS_WIN_POS(pipe) _PIPE(pipe, _PSA_WIN_POS, _PSB_WIN_POS)
4932
4907/* legacy palette */ 4933/* legacy palette */
4908#define _LGC_PALETTE_A 0x4a000 4934#define _LGC_PALETTE_A 0x4a000
4909#define _LGC_PALETTE_B 0x4a800 4935#define _LGC_PALETTE_B 0x4a800
@@ -5048,6 +5074,9 @@ enum punit_power_well {
5048#define GEN8_DE_PORT_IIR 0x44448 5074#define GEN8_DE_PORT_IIR 0x44448
5049#define GEN8_DE_PORT_IER 0x4444c 5075#define GEN8_DE_PORT_IER 0x4444c
5050#define GEN8_PORT_DP_A_HOTPLUG (1 << 3) 5076#define GEN8_PORT_DP_A_HOTPLUG (1 << 3)
5077#define GEN9_AUX_CHANNEL_D (1 << 27)
5078#define GEN9_AUX_CHANNEL_C (1 << 26)
5079#define GEN9_AUX_CHANNEL_B (1 << 25)
5051#define GEN8_AUX_CHANNEL_A (1 << 0) 5080#define GEN8_AUX_CHANNEL_A (1 << 0)
5052 5081
5053#define GEN8_DE_MISC_ISR 0x44460 5082#define GEN8_DE_MISC_ISR 0x44460
@@ -5131,6 +5160,7 @@ enum punit_power_well {
5131/* GEN8 chicken */ 5160/* GEN8 chicken */
5132#define HDC_CHICKEN0 0x7300 5161#define HDC_CHICKEN0 0x7300
5133#define HDC_FORCE_NON_COHERENT (1<<4) 5162#define HDC_FORCE_NON_COHERENT (1<<4)
5163#define HDC_DONOT_FETCH_MEM_WHEN_MASKED (1<<11)
5134#define HDC_FENCE_DEST_SLM_DISABLE (1<<14) 5164#define HDC_FENCE_DEST_SLM_DISABLE (1<<14)
5135 5165
5136/* WaCatErrorRejectionIssue */ 5166/* WaCatErrorRejectionIssue */
@@ -6010,11 +6040,12 @@ enum punit_power_well {
6010#define GEN6_ENCODE_RC6_VID(mv) (((mv) - 245) / 5) 6040#define GEN6_ENCODE_RC6_VID(mv) (((mv) - 245) / 5)
6011#define GEN6_DECODE_RC6_VID(vids) (((vids) * 5) + 245) 6041#define GEN6_DECODE_RC6_VID(vids) (((vids) * 5) + 245)
6012#define DISPLAY_IPS_CONTROL 0x19 6042#define DISPLAY_IPS_CONTROL 0x19
6043#define HSW_PCODE_DYNAMIC_DUTY_CYCLE_CONTROL 0x1A
6013#define GEN6_PCODE_DATA 0x138128 6044#define GEN6_PCODE_DATA 0x138128
6014#define GEN6_PCODE_FREQ_IA_RATIO_SHIFT 8 6045#define GEN6_PCODE_FREQ_IA_RATIO_SHIFT 8
6015#define GEN6_PCODE_FREQ_RING_RATIO_SHIFT 16 6046#define GEN6_PCODE_FREQ_RING_RATIO_SHIFT 16
6047#define GEN6_PCODE_DATA1 0x13812C
6016 6048
6017#define GEN9_PCODE_DATA1 0x13812C
6018#define GEN9_PCODE_READ_MEM_LATENCY 0x6 6049#define GEN9_PCODE_READ_MEM_LATENCY 0x6
6019#define GEN9_MEM_LATENCY_LEVEL_MASK 0xFF 6050#define GEN9_MEM_LATENCY_LEVEL_MASK 0xFF
6020#define GEN9_MEM_LATENCY_LEVEL_1_5_SHIFT 8 6051#define GEN9_MEM_LATENCY_LEVEL_1_5_SHIFT 8
@@ -6427,6 +6458,83 @@ enum punit_power_well {
6427#define LCPLL_CD_SOURCE_FCLK (1<<21) 6458#define LCPLL_CD_SOURCE_FCLK (1<<21)
6428#define LCPLL_CD_SOURCE_FCLK_DONE (1<<19) 6459#define LCPLL_CD_SOURCE_FCLK_DONE (1<<19)
6429 6460
6461/*
6462 * SKL Clocks
6463 */
6464
6465/* CDCLK_CTL */
6466#define CDCLK_CTL 0x46000
6467#define CDCLK_FREQ_SEL_MASK (3<<26)
6468#define CDCLK_FREQ_450_432 (0<<26)
6469#define CDCLK_FREQ_540 (1<<26)
6470#define CDCLK_FREQ_337_308 (2<<26)
6471#define CDCLK_FREQ_675_617 (3<<26)
6472#define CDCLK_FREQ_DECIMAL_MASK (0x7ff)
6473
6474/* LCPLL_CTL */
6475#define LCPLL1_CTL 0x46010
6476#define LCPLL2_CTL 0x46014
6477#define LCPLL_PLL_ENABLE (1<<31)
6478
6479/* DPLL control1 */
6480#define DPLL_CTRL1 0x6C058
6481#define DPLL_CTRL1_HDMI_MODE(id) (1<<((id)*6+5))
6482#define DPLL_CTRL1_SSC(id) (1<<((id)*6+4))
6483#define DPLL_CRTL1_LINK_RATE_MASK(id) (7<<((id)*6+1))
6484#define DPLL_CRTL1_LINK_RATE_SHIFT(id) ((id)*6+1)
6485#define DPLL_CRTL1_LINK_RATE(linkrate, id) ((linkrate)<<((id)*6+1))
6486#define DPLL_CTRL1_OVERRIDE(id) (1<<((id)*6))
6487#define DPLL_CRTL1_LINK_RATE_2700 0
6488#define DPLL_CRTL1_LINK_RATE_1350 1
6489#define DPLL_CRTL1_LINK_RATE_810 2
6490#define DPLL_CRTL1_LINK_RATE_1620 3
6491#define DPLL_CRTL1_LINK_RATE_1080 4
6492#define DPLL_CRTL1_LINK_RATE_2160 5
6493
6494/* DPLL control2 */
6495#define DPLL_CTRL2 0x6C05C
6496#define DPLL_CTRL2_DDI_CLK_OFF(port) (1<<(port+15))
6497#define DPLL_CTRL2_DDI_CLK_SEL_MASK(port) (3<<((port)*3+1))
6498#define DPLL_CTRL2_DDI_CLK_SEL_SHIFT(port) ((port)*3+1)
6499#define DPLL_CTRL2_DDI_CLK_SEL(clk, port) (clk<<((port)*3+1))
6500#define DPLL_CTRL2_DDI_SEL_OVERRIDE(port) (1<<((port)*3))
6501
6502/* DPLL Status */
6503#define DPLL_STATUS 0x6C060
6504#define DPLL_LOCK(id) (1<<((id)*8))
6505
6506/* DPLL cfg */
6507#define DPLL1_CFGCR1 0x6C040
6508#define DPLL2_CFGCR1 0x6C048
6509#define DPLL3_CFGCR1 0x6C050
6510#define DPLL_CFGCR1_FREQ_ENABLE (1<<31)
6511#define DPLL_CFGCR1_DCO_FRACTION_MASK (0x7fff<<9)
6512#define DPLL_CFGCR1_DCO_FRACTION(x) (x<<9)
6513#define DPLL_CFGCR1_DCO_INTEGER_MASK (0x1ff)
6514
6515#define DPLL1_CFGCR2 0x6C044
6516#define DPLL2_CFGCR2 0x6C04C
6517#define DPLL3_CFGCR2 0x6C054
6518#define DPLL_CFGCR2_QDIV_RATIO_MASK (0xff<<8)
6519#define DPLL_CFGCR2_QDIV_RATIO(x) (x<<8)
6520#define DPLL_CFGCR2_QDIV_MODE(x) (x<<7)
6521#define DPLL_CFGCR2_KDIV_MASK (3<<5)
6522#define DPLL_CFGCR2_KDIV(x) (x<<5)
6523#define DPLL_CFGCR2_KDIV_5 (0<<5)
6524#define DPLL_CFGCR2_KDIV_2 (1<<5)
6525#define DPLL_CFGCR2_KDIV_3 (2<<5)
6526#define DPLL_CFGCR2_KDIV_1 (3<<5)
6527#define DPLL_CFGCR2_PDIV_MASK (7<<2)
6528#define DPLL_CFGCR2_PDIV(x) (x<<2)
6529#define DPLL_CFGCR2_PDIV_1 (0<<2)
6530#define DPLL_CFGCR2_PDIV_2 (1<<2)
6531#define DPLL_CFGCR2_PDIV_3 (2<<2)
6532#define DPLL_CFGCR2_PDIV_7 (4<<2)
6533#define DPLL_CFGCR2_CENTRAL_FREQ_MASK (3)
6534
6535#define GET_CFG_CR1_REG(id) (DPLL1_CFGCR1 + (id - SKL_DPLL1) * 8)
6536#define GET_CFG_CR2_REG(id) (DPLL1_CFGCR2 + (id - SKL_DPLL1) * 8)
6537
6430/* Please see hsw_read_dcomp() and hsw_write_dcomp() before using this register, 6538/* Please see hsw_read_dcomp() and hsw_write_dcomp() before using this register,
6431 * since on HSW we can't write to it using I915_WRITE. */ 6539 * since on HSW we can't write to it using I915_WRITE. */
6432#define D_COMP_HSW (MCHBAR_MIRROR_BASE_SNB + 0x5F0C) 6540#define D_COMP_HSW (MCHBAR_MIRROR_BASE_SNB + 0x5F0C)