diff options
Diffstat (limited to 'drivers/gpu/drm/i915/i915_reg.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_reg.h | 298 |
1 files changed, 181 insertions, 117 deletions
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 4f5e15577e89..d02de212e6ad 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h | |||
@@ -25,52 +25,16 @@ | |||
25 | #ifndef _I915_REG_H_ | 25 | #ifndef _I915_REG_H_ |
26 | #define _I915_REG_H_ | 26 | #define _I915_REG_H_ |
27 | 27 | ||
28 | #define _PIPE(pipe, a, b) ((a) + (pipe)*((b)-(a))) | ||
29 | |||
28 | /* | 30 | /* |
29 | * The Bridge device's PCI config space has information about the | 31 | * The Bridge device's PCI config space has information about the |
30 | * fb aperture size and the amount of pre-reserved memory. | 32 | * fb aperture size and the amount of pre-reserved memory. |
33 | * This is all handled in the intel-gtt.ko module. i915.ko only | ||
34 | * cares about the vga bit for the vga rbiter. | ||
31 | */ | 35 | */ |
32 | #define INTEL_GMCH_CTRL 0x52 | 36 | #define INTEL_GMCH_CTRL 0x52 |
33 | #define INTEL_GMCH_VGA_DISABLE (1 << 1) | 37 | #define INTEL_GMCH_VGA_DISABLE (1 << 1) |
34 | #define INTEL_GMCH_ENABLED 0x4 | ||
35 | #define INTEL_GMCH_MEM_MASK 0x1 | ||
36 | #define INTEL_GMCH_MEM_64M 0x1 | ||
37 | #define INTEL_GMCH_MEM_128M 0 | ||
38 | |||
39 | #define INTEL_GMCH_GMS_MASK (0xf << 4) | ||
40 | #define INTEL_855_GMCH_GMS_DISABLED (0x0 << 4) | ||
41 | #define INTEL_855_GMCH_GMS_STOLEN_1M (0x1 << 4) | ||
42 | #define INTEL_855_GMCH_GMS_STOLEN_4M (0x2 << 4) | ||
43 | #define INTEL_855_GMCH_GMS_STOLEN_8M (0x3 << 4) | ||
44 | #define INTEL_855_GMCH_GMS_STOLEN_16M (0x4 << 4) | ||
45 | #define INTEL_855_GMCH_GMS_STOLEN_32M (0x5 << 4) | ||
46 | |||
47 | #define INTEL_915G_GMCH_GMS_STOLEN_48M (0x6 << 4) | ||
48 | #define INTEL_915G_GMCH_GMS_STOLEN_64M (0x7 << 4) | ||
49 | #define INTEL_GMCH_GMS_STOLEN_128M (0x8 << 4) | ||
50 | #define INTEL_GMCH_GMS_STOLEN_256M (0x9 << 4) | ||
51 | #define INTEL_GMCH_GMS_STOLEN_96M (0xa << 4) | ||
52 | #define INTEL_GMCH_GMS_STOLEN_160M (0xb << 4) | ||
53 | #define INTEL_GMCH_GMS_STOLEN_224M (0xc << 4) | ||
54 | #define INTEL_GMCH_GMS_STOLEN_352M (0xd << 4) | ||
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 | 38 | ||
75 | /* PCI config space */ | 39 | /* PCI config space */ |
76 | 40 | ||
@@ -106,10 +70,13 @@ | |||
106 | #define I915_GC_RENDER_CLOCK_200_MHZ (1 << 0) | 70 | #define I915_GC_RENDER_CLOCK_200_MHZ (1 << 0) |
107 | #define I915_GC_RENDER_CLOCK_333_MHZ (4 << 0) | 71 | #define I915_GC_RENDER_CLOCK_333_MHZ (4 << 0) |
108 | #define LBB 0xf4 | 72 | #define LBB 0xf4 |
109 | #define GDRST 0xc0 | 73 | |
110 | #define GDRST_FULL (0<<2) | 74 | /* Graphics reset regs */ |
111 | #define GDRST_RENDER (1<<2) | 75 | #define I965_GDRST 0xc0 /* PCI config register */ |
112 | #define GDRST_MEDIA (3<<2) | 76 | #define ILK_GDSR 0x2ca4 /* MCHBAR offset */ |
77 | #define GRDOM_FULL (0<<2) | ||
78 | #define GRDOM_RENDER (1<<2) | ||
79 | #define GRDOM_MEDIA (3<<2) | ||
113 | 80 | ||
114 | /* VGA stuff */ | 81 | /* VGA stuff */ |
115 | 82 | ||
@@ -192,11 +159,11 @@ | |||
192 | #define MI_STORE_DWORD_INDEX MI_INSTR(0x21, 1) | 159 | #define MI_STORE_DWORD_INDEX MI_INSTR(0x21, 1) |
193 | #define MI_STORE_DWORD_INDEX_SHIFT 2 | 160 | #define MI_STORE_DWORD_INDEX_SHIFT 2 |
194 | #define MI_LOAD_REGISTER_IMM MI_INSTR(0x22, 1) | 161 | #define MI_LOAD_REGISTER_IMM MI_INSTR(0x22, 1) |
162 | #define MI_FLUSH_DW MI_INSTR(0x26, 2) /* for GEN6 */ | ||
195 | #define MI_BATCH_BUFFER MI_INSTR(0x30, 1) | 163 | #define MI_BATCH_BUFFER MI_INSTR(0x30, 1) |
196 | #define MI_BATCH_NON_SECURE (1) | 164 | #define MI_BATCH_NON_SECURE (1) |
197 | #define MI_BATCH_NON_SECURE_I965 (1<<8) | 165 | #define MI_BATCH_NON_SECURE_I965 (1<<8) |
198 | #define MI_BATCH_BUFFER_START MI_INSTR(0x31, 0) | 166 | #define MI_BATCH_BUFFER_START MI_INSTR(0x31, 0) |
199 | |||
200 | /* | 167 | /* |
201 | * 3D instructions used by the kernel | 168 | * 3D instructions used by the kernel |
202 | */ | 169 | */ |
@@ -249,6 +216,16 @@ | |||
249 | #define PIPE_CONTROL_GLOBAL_GTT (1<<2) /* in addr dword */ | 216 | #define PIPE_CONTROL_GLOBAL_GTT (1<<2) /* in addr dword */ |
250 | #define PIPE_CONTROL_STALL_EN (1<<1) /* in addr word, Ironlake+ only */ | 217 | #define PIPE_CONTROL_STALL_EN (1<<1) /* in addr word, Ironlake+ only */ |
251 | 218 | ||
219 | |||
220 | /* | ||
221 | * Reset registers | ||
222 | */ | ||
223 | #define DEBUG_RESET_I830 0x6070 | ||
224 | #define DEBUG_RESET_FULL (1<<7) | ||
225 | #define DEBUG_RESET_RENDER (1<<8) | ||
226 | #define DEBUG_RESET_DISPLAY (1<<9) | ||
227 | |||
228 | |||
252 | /* | 229 | /* |
253 | * Fence registers | 230 | * Fence registers |
254 | */ | 231 | */ |
@@ -283,6 +260,16 @@ | |||
283 | #define PRB0_HEAD 0x02034 | 260 | #define PRB0_HEAD 0x02034 |
284 | #define PRB0_START 0x02038 | 261 | #define PRB0_START 0x02038 |
285 | #define PRB0_CTL 0x0203c | 262 | #define PRB0_CTL 0x0203c |
263 | #define RENDER_RING_BASE 0x02000 | ||
264 | #define BSD_RING_BASE 0x04000 | ||
265 | #define GEN6_BSD_RING_BASE 0x12000 | ||
266 | #define RING_TAIL(base) ((base)+0x30) | ||
267 | #define RING_HEAD(base) ((base)+0x34) | ||
268 | #define RING_START(base) ((base)+0x38) | ||
269 | #define RING_CTL(base) ((base)+0x3c) | ||
270 | #define RING_HWS_PGA(base) ((base)+0x80) | ||
271 | #define RING_HWS_PGA_GEN6(base) ((base)+0x2080) | ||
272 | #define RING_ACTHD(base) ((base)+0x74) | ||
286 | #define TAIL_ADDR 0x001FFFF8 | 273 | #define TAIL_ADDR 0x001FFFF8 |
287 | #define HEAD_WRAP_COUNT 0xFFE00000 | 274 | #define HEAD_WRAP_COUNT 0xFFE00000 |
288 | #define HEAD_WRAP_ONE 0x00200000 | 275 | #define HEAD_WRAP_ONE 0x00200000 |
@@ -295,6 +282,8 @@ | |||
295 | #define RING_VALID_MASK 0x00000001 | 282 | #define RING_VALID_MASK 0x00000001 |
296 | #define RING_VALID 0x00000001 | 283 | #define RING_VALID 0x00000001 |
297 | #define RING_INVALID 0x00000000 | 284 | #define RING_INVALID 0x00000000 |
285 | #define RING_WAIT_I8XX (1<<0) /* gen2, PRBx_HEAD */ | ||
286 | #define RING_WAIT (1<<11) /* gen3+, PRBx_CTL */ | ||
298 | #define PRB1_TAIL 0x02040 /* 915+ only */ | 287 | #define PRB1_TAIL 0x02040 /* 915+ only */ |
299 | #define PRB1_HEAD 0x02044 /* 915+ only */ | 288 | #define PRB1_HEAD 0x02044 /* 915+ only */ |
300 | #define PRB1_START 0x02048 /* 915+ only */ | 289 | #define PRB1_START 0x02048 /* 915+ only */ |
@@ -306,7 +295,6 @@ | |||
306 | #define INSTDONE1 0x0207c /* 965+ only */ | 295 | #define INSTDONE1 0x0207c /* 965+ only */ |
307 | #define ACTHD_I965 0x02074 | 296 | #define ACTHD_I965 0x02074 |
308 | #define HWS_PGA 0x02080 | 297 | #define HWS_PGA 0x02080 |
309 | #define HWS_PGA_GEN6 0x04080 | ||
310 | #define HWS_ADDRESS_MASK 0xfffff000 | 298 | #define HWS_ADDRESS_MASK 0xfffff000 |
311 | #define HWS_START_ADDRESS_SHIFT 4 | 299 | #define HWS_START_ADDRESS_SHIFT 4 |
312 | #define PWRCTXA 0x2088 /* 965GM+ only */ | 300 | #define PWRCTXA 0x2088 /* 965GM+ only */ |
@@ -464,17 +452,17 @@ | |||
464 | #define GEN6_BLITTER_COMMAND_PARSER_MASTER_ERROR (1 << 25) | 452 | #define GEN6_BLITTER_COMMAND_PARSER_MASTER_ERROR (1 << 25) |
465 | #define GEN6_BLITTER_SYNC_STATUS (1 << 24) | 453 | #define GEN6_BLITTER_SYNC_STATUS (1 << 24) |
466 | #define GEN6_BLITTER_USER_INTERRUPT (1 << 22) | 454 | #define GEN6_BLITTER_USER_INTERRUPT (1 << 22) |
467 | /* | ||
468 | * BSD (bit stream decoder instruction and interrupt control register defines | ||
469 | * (G4X and Ironlake only) | ||
470 | */ | ||
471 | 455 | ||
472 | #define BSD_RING_TAIL 0x04030 | 456 | #define GEN6_BSD_SLEEP_PSMI_CONTROL 0x12050 |
473 | #define BSD_RING_HEAD 0x04034 | 457 | #define GEN6_BSD_SLEEP_PSMI_CONTROL_RC_ILDL_MESSAGE_MODIFY_MASK (1 << 16) |
474 | #define BSD_RING_START 0x04038 | 458 | #define GEN6_BSD_SLEEP_PSMI_CONTROL_RC_ILDL_MESSAGE_DISABLE (1 << 0) |
475 | #define BSD_RING_CTL 0x0403c | 459 | #define GEN6_BSD_SLEEP_PSMI_CONTROL_RC_ILDL_MESSAGE_ENABLE 0 |
476 | #define BSD_RING_ACTHD 0x04074 | 460 | #define GEN6_BSD_SLEEP_PSMI_CONTROL_IDLE_INDICATOR (1 << 3) |
477 | #define BSD_HWS_PGA 0x04080 | 461 | |
462 | #define GEN6_BSD_IMR 0x120a8 | ||
463 | #define GEN6_BSD_IMR_USER_INTERRUPT (1 << 12) | ||
464 | |||
465 | #define GEN6_BSD_RNCID 0x12198 | ||
478 | 466 | ||
479 | /* | 467 | /* |
480 | * Framebuffer compression (915+ only) | 468 | * Framebuffer compression (915+ only) |
@@ -579,12 +567,51 @@ | |||
579 | # define GPIO_DATA_VAL_IN (1 << 12) | 567 | # define GPIO_DATA_VAL_IN (1 << 12) |
580 | # define GPIO_DATA_PULLUP_DISABLE (1 << 13) | 568 | # define GPIO_DATA_PULLUP_DISABLE (1 << 13) |
581 | 569 | ||
582 | #define GMBUS0 0x5100 | 570 | #define GMBUS0 0x5100 /* clock/port select */ |
583 | #define GMBUS1 0x5104 | 571 | #define GMBUS_RATE_100KHZ (0<<8) |
584 | #define GMBUS2 0x5108 | 572 | #define GMBUS_RATE_50KHZ (1<<8) |
585 | #define GMBUS3 0x510c | 573 | #define GMBUS_RATE_400KHZ (2<<8) /* reserved on Pineview */ |
586 | #define GMBUS4 0x5110 | 574 | #define GMBUS_RATE_1MHZ (3<<8) /* reserved on Pineview */ |
587 | #define GMBUS5 0x5120 | 575 | #define GMBUS_HOLD_EXT (1<<7) /* 300ns hold time, rsvd on Pineview */ |
576 | #define GMBUS_PORT_DISABLED 0 | ||
577 | #define GMBUS_PORT_SSC 1 | ||
578 | #define GMBUS_PORT_VGADDC 2 | ||
579 | #define GMBUS_PORT_PANEL 3 | ||
580 | #define GMBUS_PORT_DPC 4 /* HDMIC */ | ||
581 | #define GMBUS_PORT_DPB 5 /* SDVO, HDMIB */ | ||
582 | /* 6 reserved */ | ||
583 | #define GMBUS_PORT_DPD 7 /* HDMID */ | ||
584 | #define GMBUS_NUM_PORTS 8 | ||
585 | #define GMBUS1 0x5104 /* command/status */ | ||
586 | #define GMBUS_SW_CLR_INT (1<<31) | ||
587 | #define GMBUS_SW_RDY (1<<30) | ||
588 | #define GMBUS_ENT (1<<29) /* enable timeout */ | ||
589 | #define GMBUS_CYCLE_NONE (0<<25) | ||
590 | #define GMBUS_CYCLE_WAIT (1<<25) | ||
591 | #define GMBUS_CYCLE_INDEX (2<<25) | ||
592 | #define GMBUS_CYCLE_STOP (4<<25) | ||
593 | #define GMBUS_BYTE_COUNT_SHIFT 16 | ||
594 | #define GMBUS_SLAVE_INDEX_SHIFT 8 | ||
595 | #define GMBUS_SLAVE_ADDR_SHIFT 1 | ||
596 | #define GMBUS_SLAVE_READ (1<<0) | ||
597 | #define GMBUS_SLAVE_WRITE (0<<0) | ||
598 | #define GMBUS2 0x5108 /* status */ | ||
599 | #define GMBUS_INUSE (1<<15) | ||
600 | #define GMBUS_HW_WAIT_PHASE (1<<14) | ||
601 | #define GMBUS_STALL_TIMEOUT (1<<13) | ||
602 | #define GMBUS_INT (1<<12) | ||
603 | #define GMBUS_HW_RDY (1<<11) | ||
604 | #define GMBUS_SATOER (1<<10) | ||
605 | #define GMBUS_ACTIVE (1<<9) | ||
606 | #define GMBUS3 0x510c /* data buffer bytes 3-0 */ | ||
607 | #define GMBUS4 0x5110 /* interrupt mask (Pineview+) */ | ||
608 | #define GMBUS_SLAVE_TIMEOUT_EN (1<<4) | ||
609 | #define GMBUS_NAK_EN (1<<3) | ||
610 | #define GMBUS_IDLE_EN (1<<2) | ||
611 | #define GMBUS_HW_WAIT_EN (1<<1) | ||
612 | #define GMBUS_HW_RDY_EN (1<<0) | ||
613 | #define GMBUS5 0x5120 /* byte index */ | ||
614 | #define GMBUS_2BYTE_INDEX_EN (1<<31) | ||
588 | 615 | ||
589 | /* | 616 | /* |
590 | * Clock control & power management | 617 | * Clock control & power management |
@@ -603,6 +630,7 @@ | |||
603 | #define VGA1_PD_P1_MASK (0x1f << 8) | 630 | #define VGA1_PD_P1_MASK (0x1f << 8) |
604 | #define DPLL_A 0x06014 | 631 | #define DPLL_A 0x06014 |
605 | #define DPLL_B 0x06018 | 632 | #define DPLL_B 0x06018 |
633 | #define DPLL(pipe) _PIPE(pipe, DPLL_A, DPLL_B) | ||
606 | #define DPLL_VCO_ENABLE (1 << 31) | 634 | #define DPLL_VCO_ENABLE (1 << 31) |
607 | #define DPLL_DVO_HIGH_SPEED (1 << 30) | 635 | #define DPLL_DVO_HIGH_SPEED (1 << 30) |
608 | #define DPLL_SYNCLOCK_ENABLE (1 << 29) | 636 | #define DPLL_SYNCLOCK_ENABLE (1 << 29) |
@@ -640,24 +668,6 @@ | |||
640 | #define ADPA_DPMS_STANDBY (2<<10) | 668 | #define ADPA_DPMS_STANDBY (2<<10) |
641 | #define ADPA_DPMS_OFF (3<<10) | 669 | #define ADPA_DPMS_OFF (3<<10) |
642 | 670 | ||
643 | #define RING_TAIL 0x00 | ||
644 | #define TAIL_ADDR 0x001FFFF8 | ||
645 | #define RING_HEAD 0x04 | ||
646 | #define HEAD_WRAP_COUNT 0xFFE00000 | ||
647 | #define HEAD_WRAP_ONE 0x00200000 | ||
648 | #define HEAD_ADDR 0x001FFFFC | ||
649 | #define RING_START 0x08 | ||
650 | #define START_ADDR 0xFFFFF000 | ||
651 | #define RING_LEN 0x0C | ||
652 | #define RING_NR_PAGES 0x001FF000 | ||
653 | #define RING_REPORT_MASK 0x00000006 | ||
654 | #define RING_REPORT_64K 0x00000002 | ||
655 | #define RING_REPORT_128K 0x00000004 | ||
656 | #define RING_NO_REPORT 0x00000000 | ||
657 | #define RING_VALID_MASK 0x00000001 | ||
658 | #define RING_VALID 0x00000001 | ||
659 | #define RING_INVALID 0x00000000 | ||
660 | |||
661 | /* Scratch pad debug 0 reg: | 671 | /* Scratch pad debug 0 reg: |
662 | */ | 672 | */ |
663 | #define DPLL_FPA01_P1_POST_DIV_MASK_I830 0x001f0000 | 673 | #define DPLL_FPA01_P1_POST_DIV_MASK_I830 0x001f0000 |
@@ -736,10 +746,13 @@ | |||
736 | #define DPLL_MD_VGA_UDI_MULTIPLIER_MASK 0x0000003f | 746 | #define DPLL_MD_VGA_UDI_MULTIPLIER_MASK 0x0000003f |
737 | #define DPLL_MD_VGA_UDI_MULTIPLIER_SHIFT 0 | 747 | #define DPLL_MD_VGA_UDI_MULTIPLIER_SHIFT 0 |
738 | #define DPLL_B_MD 0x06020 /* 965+ only */ | 748 | #define DPLL_B_MD 0x06020 /* 965+ only */ |
749 | #define DPLL_MD(pipe) _PIPE(pipe, DPLL_A_MD, DPLL_B_MD) | ||
739 | #define FPA0 0x06040 | 750 | #define FPA0 0x06040 |
740 | #define FPA1 0x06044 | 751 | #define FPA1 0x06044 |
741 | #define FPB0 0x06048 | 752 | #define FPB0 0x06048 |
742 | #define FPB1 0x0604c | 753 | #define FPB1 0x0604c |
754 | #define FP0(pipe) _PIPE(pipe, FPA0, FPB0) | ||
755 | #define FP1(pipe) _PIPE(pipe, FPA1, FPB1) | ||
743 | #define FP_N_DIV_MASK 0x003f0000 | 756 | #define FP_N_DIV_MASK 0x003f0000 |
744 | #define FP_N_PINEVIEW_DIV_MASK 0x00ff0000 | 757 | #define FP_N_PINEVIEW_DIV_MASK 0x00ff0000 |
745 | #define FP_N_DIV_SHIFT 16 | 758 | #define FP_N_DIV_SHIFT 16 |
@@ -760,6 +773,7 @@ | |||
760 | #define DPLLA_TEST_M_BYPASS (1 << 2) | 773 | #define DPLLA_TEST_M_BYPASS (1 << 2) |
761 | #define DPLLA_INPUT_BUFFER_ENABLE (1 << 0) | 774 | #define DPLLA_INPUT_BUFFER_ENABLE (1 << 0) |
762 | #define D_STATE 0x6104 | 775 | #define D_STATE 0x6104 |
776 | #define DSTATE_GFX_RESET_I830 (1<<6) | ||
763 | #define DSTATE_PLL_D3_OFF (1<<3) | 777 | #define DSTATE_PLL_D3_OFF (1<<3) |
764 | #define DSTATE_GFX_CLOCK_GATING (1<<1) | 778 | #define DSTATE_GFX_CLOCK_GATING (1<<1) |
765 | #define DSTATE_DOT_CLOCK_GATING (1<<0) | 779 | #define DSTATE_DOT_CLOCK_GATING (1<<0) |
@@ -926,6 +940,8 @@ | |||
926 | #define CLKCFG_MEM_800 (3 << 4) | 940 | #define CLKCFG_MEM_800 (3 << 4) |
927 | #define CLKCFG_MEM_MASK (7 << 4) | 941 | #define CLKCFG_MEM_MASK (7 << 4) |
928 | 942 | ||
943 | #define TSC1 0x11001 | ||
944 | #define TSE (1<<0) | ||
929 | #define TR1 0x11006 | 945 | #define TR1 0x11006 |
930 | #define TSFS 0x11020 | 946 | #define TSFS 0x11020 |
931 | #define TSFS_SLOPE_MASK 0x0000ff00 | 947 | #define TSFS_SLOPE_MASK 0x0000ff00 |
@@ -1070,6 +1086,8 @@ | |||
1070 | #define MEMSTAT_SRC_CTL_STDBY 3 | 1086 | #define MEMSTAT_SRC_CTL_STDBY 3 |
1071 | #define RCPREVBSYTUPAVG 0x113b8 | 1087 | #define RCPREVBSYTUPAVG 0x113b8 |
1072 | #define RCPREVBSYTDNAVG 0x113bc | 1088 | #define RCPREVBSYTDNAVG 0x113bc |
1089 | #define PMMISC 0x11214 | ||
1090 | #define MCPPCE_EN (1<<0) /* enable PM_MSG from PCH->MPC */ | ||
1073 | #define SDEW 0x1124c | 1091 | #define SDEW 0x1124c |
1074 | #define CSIEW0 0x11250 | 1092 | #define CSIEW0 0x11250 |
1075 | #define CSIEW1 0x11254 | 1093 | #define CSIEW1 0x11254 |
@@ -1150,6 +1168,15 @@ | |||
1150 | #define PIPEBSRC 0x6101c | 1168 | #define PIPEBSRC 0x6101c |
1151 | #define BCLRPAT_B 0x61020 | 1169 | #define BCLRPAT_B 0x61020 |
1152 | 1170 | ||
1171 | #define HTOTAL(pipe) _PIPE(pipe, HTOTAL_A, HTOTAL_B) | ||
1172 | #define HBLANK(pipe) _PIPE(pipe, HBLANK_A, HBLANK_B) | ||
1173 | #define HSYNC(pipe) _PIPE(pipe, HSYNC_A, HSYNC_B) | ||
1174 | #define VTOTAL(pipe) _PIPE(pipe, VTOTAL_A, VTOTAL_B) | ||
1175 | #define VBLANK(pipe) _PIPE(pipe, VBLANK_A, VBLANK_B) | ||
1176 | #define VSYNC(pipe) _PIPE(pipe, VSYNC_A, VSYNC_B) | ||
1177 | #define PIPESRC(pipe) _PIPE(pipe, PIPEASRC, PIPEBSRC) | ||
1178 | #define BCLRPAT(pipe) _PIPE(pipe, BCLRPAT_A, BCLRPAT_B) | ||
1179 | |||
1153 | /* VGA port control */ | 1180 | /* VGA port control */ |
1154 | #define ADPA 0x61100 | 1181 | #define ADPA 0x61100 |
1155 | #define ADPA_DAC_ENABLE (1<<31) | 1182 | #define ADPA_DAC_ENABLE (1<<31) |
@@ -1481,6 +1508,7 @@ | |||
1481 | # define TV_TEST_MODE_MASK (7 << 0) | 1508 | # define TV_TEST_MODE_MASK (7 << 0) |
1482 | 1509 | ||
1483 | #define TV_DAC 0x68004 | 1510 | #define TV_DAC 0x68004 |
1511 | # define TV_DAC_SAVE 0x00ffff00 | ||
1484 | /** | 1512 | /** |
1485 | * Reports that DAC state change logic has reported change (RO). | 1513 | * Reports that DAC state change logic has reported change (RO). |
1486 | * | 1514 | * |
@@ -2075,29 +2103,35 @@ | |||
2075 | 2103 | ||
2076 | /* Display & cursor control */ | 2104 | /* Display & cursor control */ |
2077 | 2105 | ||
2078 | /* dithering flag on Ironlake */ | ||
2079 | #define PIPE_ENABLE_DITHER (1 << 4) | ||
2080 | #define PIPE_DITHER_TYPE_MASK (3 << 2) | ||
2081 | #define PIPE_DITHER_TYPE_SPATIAL (0 << 2) | ||
2082 | #define PIPE_DITHER_TYPE_ST01 (1 << 2) | ||
2083 | /* Pipe A */ | 2106 | /* Pipe A */ |
2084 | #define PIPEADSL 0x70000 | 2107 | #define PIPEADSL 0x70000 |
2085 | #define DSL_LINEMASK 0x00000fff | 2108 | #define DSL_LINEMASK 0x00000fff |
2086 | #define PIPEACONF 0x70008 | 2109 | #define PIPEACONF 0x70008 |
2087 | #define PIPEACONF_ENABLE (1<<31) | 2110 | #define PIPECONF_ENABLE (1<<31) |
2088 | #define PIPEACONF_DISABLE 0 | 2111 | #define PIPECONF_DISABLE 0 |
2089 | #define PIPEACONF_DOUBLE_WIDE (1<<30) | 2112 | #define PIPECONF_DOUBLE_WIDE (1<<30) |
2090 | #define I965_PIPECONF_ACTIVE (1<<30) | 2113 | #define I965_PIPECONF_ACTIVE (1<<30) |
2091 | #define PIPEACONF_SINGLE_WIDE 0 | 2114 | #define PIPECONF_SINGLE_WIDE 0 |
2092 | #define PIPEACONF_PIPE_UNLOCKED 0 | 2115 | #define PIPECONF_PIPE_UNLOCKED 0 |
2093 | #define PIPEACONF_PIPE_LOCKED (1<<25) | 2116 | #define PIPECONF_PIPE_LOCKED (1<<25) |
2094 | #define PIPEACONF_PALETTE 0 | 2117 | #define PIPECONF_PALETTE 0 |
2095 | #define PIPEACONF_GAMMA (1<<24) | 2118 | #define PIPECONF_GAMMA (1<<24) |
2096 | #define PIPECONF_FORCE_BORDER (1<<25) | 2119 | #define PIPECONF_FORCE_BORDER (1<<25) |
2097 | #define PIPECONF_PROGRESSIVE (0 << 21) | 2120 | #define PIPECONF_PROGRESSIVE (0 << 21) |
2098 | #define PIPECONF_INTERLACE_W_FIELD_INDICATION (6 << 21) | 2121 | #define PIPECONF_INTERLACE_W_FIELD_INDICATION (6 << 21) |
2099 | #define PIPECONF_INTERLACE_FIELD_0_ONLY (7 << 21) | 2122 | #define PIPECONF_INTERLACE_FIELD_0_ONLY (7 << 21) |
2100 | #define PIPECONF_CXSR_DOWNCLOCK (1<<16) | 2123 | #define PIPECONF_CXSR_DOWNCLOCK (1<<16) |
2124 | #define PIPECONF_BPP_MASK (0x000000e0) | ||
2125 | #define PIPECONF_BPP_8 (0<<5) | ||
2126 | #define PIPECONF_BPP_10 (1<<5) | ||
2127 | #define PIPECONF_BPP_6 (2<<5) | ||
2128 | #define PIPECONF_BPP_12 (3<<5) | ||
2129 | #define PIPECONF_DITHER_EN (1<<4) | ||
2130 | #define PIPECONF_DITHER_TYPE_MASK (0x0000000c) | ||
2131 | #define PIPECONF_DITHER_TYPE_SP (0<<2) | ||
2132 | #define PIPECONF_DITHER_TYPE_ST1 (1<<2) | ||
2133 | #define PIPECONF_DITHER_TYPE_ST2 (2<<2) | ||
2134 | #define PIPECONF_DITHER_TYPE_TEMP (3<<2) | ||
2101 | #define PIPEASTAT 0x70024 | 2135 | #define PIPEASTAT 0x70024 |
2102 | #define PIPE_FIFO_UNDERRUN_STATUS (1UL<<31) | 2136 | #define PIPE_FIFO_UNDERRUN_STATUS (1UL<<31) |
2103 | #define PIPE_CRC_ERROR_ENABLE (1UL<<29) | 2137 | #define PIPE_CRC_ERROR_ENABLE (1UL<<29) |
@@ -2128,12 +2162,15 @@ | |||
2128 | #define PIPE_START_VBLANK_INTERRUPT_STATUS (1UL<<2) /* 965 or later */ | 2162 | #define PIPE_START_VBLANK_INTERRUPT_STATUS (1UL<<2) /* 965 or later */ |
2129 | #define PIPE_VBLANK_INTERRUPT_STATUS (1UL<<1) | 2163 | #define PIPE_VBLANK_INTERRUPT_STATUS (1UL<<1) |
2130 | #define PIPE_OVERLAY_UPDATED_STATUS (1UL<<0) | 2164 | #define PIPE_OVERLAY_UPDATED_STATUS (1UL<<0) |
2131 | #define PIPE_BPC_MASK (7 << 5) /* Ironlake */ | 2165 | #define PIPE_BPC_MASK (7 << 5) /* Ironlake */ |
2132 | #define PIPE_8BPC (0 << 5) | 2166 | #define PIPE_8BPC (0 << 5) |
2133 | #define PIPE_10BPC (1 << 5) | 2167 | #define PIPE_10BPC (1 << 5) |
2134 | #define PIPE_6BPC (2 << 5) | 2168 | #define PIPE_6BPC (2 << 5) |
2135 | #define PIPE_12BPC (3 << 5) | 2169 | #define PIPE_12BPC (3 << 5) |
2136 | 2170 | ||
2171 | #define PIPECONF(pipe) _PIPE(pipe, PIPEACONF, PIPEBCONF) | ||
2172 | #define PIPEDSL(pipe) _PIPE(pipe, PIPEADSL, PIPEBDSL) | ||
2173 | |||
2137 | #define DSPARB 0x70030 | 2174 | #define DSPARB 0x70030 |
2138 | #define DSPARB_CSTART_MASK (0x7f << 7) | 2175 | #define DSPARB_CSTART_MASK (0x7f << 7) |
2139 | #define DSPARB_CSTART_SHIFT 7 | 2176 | #define DSPARB_CSTART_SHIFT 7 |
@@ -2206,8 +2243,8 @@ | |||
2206 | #define WM1_LP_SR_EN (1<<31) | 2243 | #define WM1_LP_SR_EN (1<<31) |
2207 | #define WM1_LP_LATENCY_SHIFT 24 | 2244 | #define WM1_LP_LATENCY_SHIFT 24 |
2208 | #define WM1_LP_LATENCY_MASK (0x7f<<24) | 2245 | #define WM1_LP_LATENCY_MASK (0x7f<<24) |
2209 | #define WM1_LP_FBC_LP1_MASK (0xf<<20) | 2246 | #define WM1_LP_FBC_MASK (0xf<<20) |
2210 | #define WM1_LP_FBC_LP1_SHIFT 20 | 2247 | #define WM1_LP_FBC_SHIFT 20 |
2211 | #define WM1_LP_SR_MASK (0x1ff<<8) | 2248 | #define WM1_LP_SR_MASK (0x1ff<<8) |
2212 | #define WM1_LP_SR_SHIFT 8 | 2249 | #define WM1_LP_SR_SHIFT 8 |
2213 | #define WM1_LP_CURSOR_MASK (0x3f) | 2250 | #define WM1_LP_CURSOR_MASK (0x3f) |
@@ -2333,6 +2370,14 @@ | |||
2333 | #define DSPASURF 0x7019C /* 965+ only */ | 2370 | #define DSPASURF 0x7019C /* 965+ only */ |
2334 | #define DSPATILEOFF 0x701A4 /* 965+ only */ | 2371 | #define DSPATILEOFF 0x701A4 /* 965+ only */ |
2335 | 2372 | ||
2373 | #define DSPCNTR(plane) _PIPE(plane, DSPACNTR, DSPBCNTR) | ||
2374 | #define DSPADDR(plane) _PIPE(plane, DSPAADDR, DSPBADDR) | ||
2375 | #define DSPSTRIDE(plane) _PIPE(plane, DSPASTRIDE, DSPBSTRIDE) | ||
2376 | #define DSPPOS(plane) _PIPE(plane, DSPAPOS, DSPBPOS) | ||
2377 | #define DSPSIZE(plane) _PIPE(plane, DSPASIZE, DSPBSIZE) | ||
2378 | #define DSPSURF(plane) _PIPE(plane, DSPASURF, DSPBSURF) | ||
2379 | #define DSPTILEOFF(plane) _PIPE(plane, DSPATILEOFF, DSPBTILEOFF) | ||
2380 | |||
2336 | /* VBIOS flags */ | 2381 | /* VBIOS flags */ |
2337 | #define SWF00 0x71410 | 2382 | #define SWF00 0x71410 |
2338 | #define SWF01 0x71414 | 2383 | #define SWF01 0x71414 |
@@ -2397,6 +2442,7 @@ | |||
2397 | #define RR_HW_HIGH_POWER_FRAMES_MASK 0xff00 | 2442 | #define RR_HW_HIGH_POWER_FRAMES_MASK 0xff00 |
2398 | 2443 | ||
2399 | #define FDI_PLL_BIOS_0 0x46000 | 2444 | #define FDI_PLL_BIOS_0 0x46000 |
2445 | #define FDI_PLL_FB_CLOCK_MASK 0xff | ||
2400 | #define FDI_PLL_BIOS_1 0x46004 | 2446 | #define FDI_PLL_BIOS_1 0x46004 |
2401 | #define FDI_PLL_BIOS_2 0x46008 | 2447 | #define FDI_PLL_BIOS_2 0x46008 |
2402 | #define DISPLAY_PORT_PLL_BIOS_0 0x4600c | 2448 | #define DISPLAY_PORT_PLL_BIOS_0 0x4600c |
@@ -2420,46 +2466,47 @@ | |||
2420 | #define PIPEA_DATA_M1 0x60030 | 2466 | #define PIPEA_DATA_M1 0x60030 |
2421 | #define TU_SIZE(x) (((x)-1) << 25) /* default size 64 */ | 2467 | #define TU_SIZE(x) (((x)-1) << 25) /* default size 64 */ |
2422 | #define TU_SIZE_MASK 0x7e000000 | 2468 | #define TU_SIZE_MASK 0x7e000000 |
2423 | #define PIPEA_DATA_M1_OFFSET 0 | 2469 | #define PIPE_DATA_M1_OFFSET 0 |
2424 | #define PIPEA_DATA_N1 0x60034 | 2470 | #define PIPEA_DATA_N1 0x60034 |
2425 | #define PIPEA_DATA_N1_OFFSET 0 | 2471 | #define PIPE_DATA_N1_OFFSET 0 |
2426 | 2472 | ||
2427 | #define PIPEA_DATA_M2 0x60038 | 2473 | #define PIPEA_DATA_M2 0x60038 |
2428 | #define PIPEA_DATA_M2_OFFSET 0 | 2474 | #define PIPE_DATA_M2_OFFSET 0 |
2429 | #define PIPEA_DATA_N2 0x6003c | 2475 | #define PIPEA_DATA_N2 0x6003c |
2430 | #define PIPEA_DATA_N2_OFFSET 0 | 2476 | #define PIPE_DATA_N2_OFFSET 0 |
2431 | 2477 | ||
2432 | #define PIPEA_LINK_M1 0x60040 | 2478 | #define PIPEA_LINK_M1 0x60040 |
2433 | #define PIPEA_LINK_M1_OFFSET 0 | 2479 | #define PIPE_LINK_M1_OFFSET 0 |
2434 | #define PIPEA_LINK_N1 0x60044 | 2480 | #define PIPEA_LINK_N1 0x60044 |
2435 | #define PIPEA_LINK_N1_OFFSET 0 | 2481 | #define PIPE_LINK_N1_OFFSET 0 |
2436 | 2482 | ||
2437 | #define PIPEA_LINK_M2 0x60048 | 2483 | #define PIPEA_LINK_M2 0x60048 |
2438 | #define PIPEA_LINK_M2_OFFSET 0 | 2484 | #define PIPE_LINK_M2_OFFSET 0 |
2439 | #define PIPEA_LINK_N2 0x6004c | 2485 | #define PIPEA_LINK_N2 0x6004c |
2440 | #define PIPEA_LINK_N2_OFFSET 0 | 2486 | #define PIPE_LINK_N2_OFFSET 0 |
2441 | 2487 | ||
2442 | /* PIPEB timing regs are same start from 0x61000 */ | 2488 | /* PIPEB timing regs are same start from 0x61000 */ |
2443 | 2489 | ||
2444 | #define PIPEB_DATA_M1 0x61030 | 2490 | #define PIPEB_DATA_M1 0x61030 |
2445 | #define PIPEB_DATA_M1_OFFSET 0 | ||
2446 | #define PIPEB_DATA_N1 0x61034 | 2491 | #define PIPEB_DATA_N1 0x61034 |
2447 | #define PIPEB_DATA_N1_OFFSET 0 | ||
2448 | 2492 | ||
2449 | #define PIPEB_DATA_M2 0x61038 | 2493 | #define PIPEB_DATA_M2 0x61038 |
2450 | #define PIPEB_DATA_M2_OFFSET 0 | ||
2451 | #define PIPEB_DATA_N2 0x6103c | 2494 | #define PIPEB_DATA_N2 0x6103c |
2452 | #define PIPEB_DATA_N2_OFFSET 0 | ||
2453 | 2495 | ||
2454 | #define PIPEB_LINK_M1 0x61040 | 2496 | #define PIPEB_LINK_M1 0x61040 |
2455 | #define PIPEB_LINK_M1_OFFSET 0 | ||
2456 | #define PIPEB_LINK_N1 0x61044 | 2497 | #define PIPEB_LINK_N1 0x61044 |
2457 | #define PIPEB_LINK_N1_OFFSET 0 | ||
2458 | 2498 | ||
2459 | #define PIPEB_LINK_M2 0x61048 | 2499 | #define PIPEB_LINK_M2 0x61048 |
2460 | #define PIPEB_LINK_M2_OFFSET 0 | ||
2461 | #define PIPEB_LINK_N2 0x6104c | 2500 | #define PIPEB_LINK_N2 0x6104c |
2462 | #define PIPEB_LINK_N2_OFFSET 0 | 2501 | |
2502 | #define PIPE_DATA_M1(pipe) _PIPE(pipe, PIPEA_DATA_M1, PIPEB_DATA_M1) | ||
2503 | #define PIPE_DATA_N1(pipe) _PIPE(pipe, PIPEA_DATA_N1, PIPEB_DATA_N1) | ||
2504 | #define PIPE_DATA_M2(pipe) _PIPE(pipe, PIPEA_DATA_M2, PIPEB_DATA_M2) | ||
2505 | #define PIPE_DATA_N2(pipe) _PIPE(pipe, PIPEA_DATA_N2, PIPEB_DATA_N2) | ||
2506 | #define PIPE_LINK_M1(pipe) _PIPE(pipe, PIPEA_LINK_M1, PIPEB_LINK_M1) | ||
2507 | #define PIPE_LINK_N1(pipe) _PIPE(pipe, PIPEA_LINK_N1, PIPEB_LINK_N1) | ||
2508 | #define PIPE_LINK_M2(pipe) _PIPE(pipe, PIPEA_LINK_M2, PIPEB_LINK_M2) | ||
2509 | #define PIPE_LINK_N2(pipe) _PIPE(pipe, PIPEA_LINK_N2, PIPEB_LINK_N2) | ||
2463 | 2510 | ||
2464 | /* CPU panel fitter */ | 2511 | /* CPU panel fitter */ |
2465 | #define PFA_CTL_1 0x68080 | 2512 | #define PFA_CTL_1 0x68080 |
@@ -2516,7 +2563,7 @@ | |||
2516 | #define GT_SYNC_STATUS (1 << 2) | 2563 | #define GT_SYNC_STATUS (1 << 2) |
2517 | #define GT_USER_INTERRUPT (1 << 0) | 2564 | #define GT_USER_INTERRUPT (1 << 0) |
2518 | #define GT_BSD_USER_INTERRUPT (1 << 5) | 2565 | #define GT_BSD_USER_INTERRUPT (1 << 5) |
2519 | 2566 | #define GT_GEN6_BSD_USER_INTERRUPT (1 << 12) | |
2520 | 2567 | ||
2521 | #define GTISR 0x44010 | 2568 | #define GTISR 0x44010 |
2522 | #define GTIMR 0x44014 | 2569 | #define GTIMR 0x44014 |
@@ -2600,11 +2647,14 @@ | |||
2600 | 2647 | ||
2601 | #define PCH_DPLL_A 0xc6014 | 2648 | #define PCH_DPLL_A 0xc6014 |
2602 | #define PCH_DPLL_B 0xc6018 | 2649 | #define PCH_DPLL_B 0xc6018 |
2650 | #define PCH_DPLL(pipe) _PIPE(pipe, PCH_DPLL_A, PCH_DPLL_B) | ||
2603 | 2651 | ||
2604 | #define PCH_FPA0 0xc6040 | 2652 | #define PCH_FPA0 0xc6040 |
2605 | #define PCH_FPA1 0xc6044 | 2653 | #define PCH_FPA1 0xc6044 |
2606 | #define PCH_FPB0 0xc6048 | 2654 | #define PCH_FPB0 0xc6048 |
2607 | #define PCH_FPB1 0xc604c | 2655 | #define PCH_FPB1 0xc604c |
2656 | #define PCH_FP0(pipe) _PIPE(pipe, PCH_FPA0, PCH_FPB0) | ||
2657 | #define PCH_FP1(pipe) _PIPE(pipe, PCH_FPA1, PCH_FPB1) | ||
2608 | 2658 | ||
2609 | #define PCH_DPLL_TEST 0xc606c | 2659 | #define PCH_DPLL_TEST 0xc606c |
2610 | 2660 | ||
@@ -2690,6 +2740,13 @@ | |||
2690 | #define TRANS_VBLANK_B 0xe1010 | 2740 | #define TRANS_VBLANK_B 0xe1010 |
2691 | #define TRANS_VSYNC_B 0xe1014 | 2741 | #define TRANS_VSYNC_B 0xe1014 |
2692 | 2742 | ||
2743 | #define TRANS_HTOTAL(pipe) _PIPE(pipe, TRANS_HTOTAL_A, TRANS_HTOTAL_B) | ||
2744 | #define TRANS_HBLANK(pipe) _PIPE(pipe, TRANS_HBLANK_A, TRANS_HBLANK_B) | ||
2745 | #define TRANS_HSYNC(pipe) _PIPE(pipe, TRANS_HSYNC_A, TRANS_HSYNC_B) | ||
2746 | #define TRANS_VTOTAL(pipe) _PIPE(pipe, TRANS_VTOTAL_A, TRANS_VTOTAL_B) | ||
2747 | #define TRANS_VBLANK(pipe) _PIPE(pipe, TRANS_VBLANK_A, TRANS_VBLANK_B) | ||
2748 | #define TRANS_VSYNC(pipe) _PIPE(pipe, TRANS_VSYNC_A, TRANS_VSYNC_B) | ||
2749 | |||
2693 | #define TRANSB_DATA_M1 0xe1030 | 2750 | #define TRANSB_DATA_M1 0xe1030 |
2694 | #define TRANSB_DATA_N1 0xe1034 | 2751 | #define TRANSB_DATA_N1 0xe1034 |
2695 | #define TRANSB_DATA_M2 0xe1038 | 2752 | #define TRANSB_DATA_M2 0xe1038 |
@@ -2701,6 +2758,7 @@ | |||
2701 | 2758 | ||
2702 | #define TRANSACONF 0xf0008 | 2759 | #define TRANSACONF 0xf0008 |
2703 | #define TRANSBCONF 0xf1008 | 2760 | #define TRANSBCONF 0xf1008 |
2761 | #define TRANSCONF(plane) _PIPE(plane, TRANSACONF, TRANSBCONF) | ||
2704 | #define TRANS_DISABLE (0<<31) | 2762 | #define TRANS_DISABLE (0<<31) |
2705 | #define TRANS_ENABLE (1<<31) | 2763 | #define TRANS_ENABLE (1<<31) |
2706 | #define TRANS_STATE_MASK (1<<30) | 2764 | #define TRANS_STATE_MASK (1<<30) |
@@ -2725,6 +2783,7 @@ | |||
2725 | /* CPU: FDI_TX */ | 2783 | /* CPU: FDI_TX */ |
2726 | #define FDI_TXA_CTL 0x60100 | 2784 | #define FDI_TXA_CTL 0x60100 |
2727 | #define FDI_TXB_CTL 0x61100 | 2785 | #define FDI_TXB_CTL 0x61100 |
2786 | #define FDI_TX_CTL(pipe) _PIPE(pipe, FDI_TXA_CTL, FDI_TXB_CTL) | ||
2728 | #define FDI_TX_DISABLE (0<<31) | 2787 | #define FDI_TX_DISABLE (0<<31) |
2729 | #define FDI_TX_ENABLE (1<<31) | 2788 | #define FDI_TX_ENABLE (1<<31) |
2730 | #define FDI_LINK_TRAIN_PATTERN_1 (0<<28) | 2789 | #define FDI_LINK_TRAIN_PATTERN_1 (0<<28) |
@@ -2766,8 +2825,8 @@ | |||
2766 | /* FDI_RX, FDI_X is hard-wired to Transcoder_X */ | 2825 | /* FDI_RX, FDI_X is hard-wired to Transcoder_X */ |
2767 | #define FDI_RXA_CTL 0xf000c | 2826 | #define FDI_RXA_CTL 0xf000c |
2768 | #define FDI_RXB_CTL 0xf100c | 2827 | #define FDI_RXB_CTL 0xf100c |
2828 | #define FDI_RX_CTL(pipe) _PIPE(pipe, FDI_RXA_CTL, FDI_RXB_CTL) | ||
2769 | #define FDI_RX_ENABLE (1<<31) | 2829 | #define FDI_RX_ENABLE (1<<31) |
2770 | #define FDI_RX_DISABLE (0<<31) | ||
2771 | /* train, dp width same as FDI_TX */ | 2830 | /* train, dp width same as FDI_TX */ |
2772 | #define FDI_DP_PORT_WIDTH_X8 (7<<19) | 2831 | #define FDI_DP_PORT_WIDTH_X8 (7<<19) |
2773 | #define FDI_8BPC (0<<16) | 2832 | #define FDI_8BPC (0<<16) |
@@ -2782,8 +2841,7 @@ | |||
2782 | #define FDI_FS_ERR_REPORT_ENABLE (1<<9) | 2841 | #define FDI_FS_ERR_REPORT_ENABLE (1<<9) |
2783 | #define FDI_FE_ERR_REPORT_ENABLE (1<<8) | 2842 | #define FDI_FE_ERR_REPORT_ENABLE (1<<8) |
2784 | #define FDI_RX_ENHANCE_FRAME_ENABLE (1<<6) | 2843 | #define FDI_RX_ENHANCE_FRAME_ENABLE (1<<6) |
2785 | #define FDI_SEL_RAWCLK (0<<4) | 2844 | #define FDI_PCDCLK (1<<4) |
2786 | #define FDI_SEL_PCDCLK (1<<4) | ||
2787 | /* CPT */ | 2845 | /* CPT */ |
2788 | #define FDI_AUTO_TRAINING (1<<10) | 2846 | #define FDI_AUTO_TRAINING (1<<10) |
2789 | #define FDI_LINK_TRAIN_PATTERN_1_CPT (0<<8) | 2847 | #define FDI_LINK_TRAIN_PATTERN_1_CPT (0<<8) |
@@ -2798,6 +2856,9 @@ | |||
2798 | #define FDI_RXA_TUSIZE2 0xf0038 | 2856 | #define FDI_RXA_TUSIZE2 0xf0038 |
2799 | #define FDI_RXB_TUSIZE1 0xf1030 | 2857 | #define FDI_RXB_TUSIZE1 0xf1030 |
2800 | #define FDI_RXB_TUSIZE2 0xf1038 | 2858 | #define FDI_RXB_TUSIZE2 0xf1038 |
2859 | #define FDI_RX_MISC(pipe) _PIPE(pipe, FDI_RXA_MISC, FDI_RXB_MISC) | ||
2860 | #define FDI_RX_TUSIZE1(pipe) _PIPE(pipe, FDI_RXA_TUSIZE1, FDI_RXB_TUSIZE1) | ||
2861 | #define FDI_RX_TUSIZE2(pipe) _PIPE(pipe, FDI_RXA_TUSIZE2, FDI_RXB_TUSIZE2) | ||
2801 | 2862 | ||
2802 | /* FDI_RX interrupt register format */ | 2863 | /* FDI_RX interrupt register format */ |
2803 | #define FDI_RX_INTER_LANE_ALIGN (1<<10) | 2864 | #define FDI_RX_INTER_LANE_ALIGN (1<<10) |
@@ -2816,6 +2877,8 @@ | |||
2816 | #define FDI_RXA_IMR 0xf0018 | 2877 | #define FDI_RXA_IMR 0xf0018 |
2817 | #define FDI_RXB_IIR 0xf1014 | 2878 | #define FDI_RXB_IIR 0xf1014 |
2818 | #define FDI_RXB_IMR 0xf1018 | 2879 | #define FDI_RXB_IMR 0xf1018 |
2880 | #define FDI_RX_IIR(pipe) _PIPE(pipe, FDI_RXA_IIR, FDI_RXB_IIR) | ||
2881 | #define FDI_RX_IMR(pipe) _PIPE(pipe, FDI_RXA_IMR, FDI_RXB_IMR) | ||
2819 | 2882 | ||
2820 | #define FDI_PLL_CTL_1 0xfe000 | 2883 | #define FDI_PLL_CTL_1 0xfe000 |
2821 | #define FDI_PLL_CTL_2 0xfe004 | 2884 | #define FDI_PLL_CTL_2 0xfe004 |
@@ -2935,6 +2998,7 @@ | |||
2935 | #define TRANS_DP_CTL_A 0xe0300 | 2998 | #define TRANS_DP_CTL_A 0xe0300 |
2936 | #define TRANS_DP_CTL_B 0xe1300 | 2999 | #define TRANS_DP_CTL_B 0xe1300 |
2937 | #define TRANS_DP_CTL_C 0xe2300 | 3000 | #define TRANS_DP_CTL_C 0xe2300 |
3001 | #define TRANS_DP_CTL(pipe) (TRANS_DP_CTL_A + (pipe) * 0x01000) | ||
2938 | #define TRANS_DP_OUTPUT_ENABLE (1<<31) | 3002 | #define TRANS_DP_OUTPUT_ENABLE (1<<31) |
2939 | #define TRANS_DP_PORT_SEL_B (0<<29) | 3003 | #define TRANS_DP_PORT_SEL_B (0<<29) |
2940 | #define TRANS_DP_PORT_SEL_C (1<<29) | 3004 | #define TRANS_DP_PORT_SEL_C (1<<29) |