Subversion Repositories Kolibri OS

Rev

Rev 3031 | Rev 3480 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3031 Rev 3243
Line 24... Line 24...
24
 
24
 
25
#ifndef _I915_REG_H_
25
#ifndef _I915_REG_H_
Line 26... Line 26...
26
#define _I915_REG_H_
26
#define _I915_REG_H_
-
 
27
 
Line 27... Line 28...
27
 
28
#define _PIPE(pipe, a, b) ((a) + (pipe)*((b)-(a)))
Line 28... Line 29...
28
#define _PIPE(pipe, a, b) ((a) + (pipe)*((b)-(a)))
29
#define _TRANSCODER(tran, a, b) ((a) + (tran)*((b)-(a)))
29
 
30
 
Line 38... Line 39...
38
 * This is all handled in the intel-gtt.ko module. i915.ko only
39
 * This is all handled in the intel-gtt.ko module. i915.ko only
39
 * cares about the vga bit for the vga rbiter.
40
 * cares about the vga bit for the vga rbiter.
40
 */
41
 */
41
#define INTEL_GMCH_CTRL		0x52
42
#define INTEL_GMCH_CTRL		0x52
42
#define INTEL_GMCH_VGA_DISABLE  (1 << 1)
43
#define INTEL_GMCH_VGA_DISABLE  (1 << 1)
-
 
44
#define SNB_GMCH_CTRL		0x50
-
 
45
#define    SNB_GMCH_GGMS_SHIFT	8 /* GTT Graphics Memory Size */
-
 
46
#define    SNB_GMCH_GGMS_MASK	0x3
-
 
47
#define    SNB_GMCH_GMS_SHIFT   3 /* Graphics Mode Select */
-
 
48
#define    SNB_GMCH_GMS_MASK    0x1f
-
 
49
#define    IVB_GMCH_GMS_SHIFT   4
-
 
50
#define    IVB_GMCH_GMS_MASK    0xf
-
 
51
 
Line 43... Line 52...
43
 
52
 
Line 44... Line 53...
44
/* PCI config space */
53
/* PCI config space */
45
 
54
 
Line 103... Line 112...
103
#define  GEN6_GRDOM_FULL		(1 << 0)
112
#define  GEN6_GRDOM_FULL		(1 << 0)
104
#define  GEN6_GRDOM_RENDER		(1 << 1)
113
#define  GEN6_GRDOM_RENDER		(1 << 1)
105
#define  GEN6_GRDOM_MEDIA		(1 << 2)
114
#define  GEN6_GRDOM_MEDIA		(1 << 2)
106
#define  GEN6_GRDOM_BLT			(1 << 3)
115
#define  GEN6_GRDOM_BLT			(1 << 3)
Line 107... Line -...
107
 
-
 
108
/* PPGTT stuff */
-
 
109
#define GEN6_GTT_ADDR_ENCODE(addr)	((addr) | (((addr) >> 28) & 0xff0))
-
 
110
 
-
 
111
#define GEN6_PDE_VALID			(1 << 0)
-
 
112
#define GEN6_PDE_LARGE_PAGE		(2 << 0) /* use 32kb pages */
-
 
113
/* gen6+ has bit 11-4 for physical addr bit 39-32 */
-
 
114
#define GEN6_PDE_ADDR_ENCODE(addr)	GEN6_GTT_ADDR_ENCODE(addr)
-
 
115
 
-
 
116
#define GEN6_PTE_VALID			(1 << 0)
-
 
117
#define GEN6_PTE_UNCACHED		(1 << 1)
-
 
118
#define HSW_PTE_UNCACHED		(0)
-
 
119
#define GEN6_PTE_CACHE_LLC		(2 << 1)
-
 
120
#define GEN6_PTE_CACHE_LLC_MLC		(3 << 1)
-
 
121
#define GEN6_PTE_CACHE_BITS		(3 << 1)
-
 
122
#define GEN6_PTE_GFDT			(1 << 3)
-
 
123
#define GEN6_PTE_ADDR_ENCODE(addr)	GEN6_GTT_ADDR_ENCODE(addr)
-
 
124
 
116
 
125
#define RING_PP_DIR_BASE(ring)		((ring)->mmio_base+0x228)
117
#define RING_PP_DIR_BASE(ring)		((ring)->mmio_base+0x228)
126
#define RING_PP_DIR_BASE_READ(ring)	((ring)->mmio_base+0x518)
118
#define RING_PP_DIR_BASE_READ(ring)	((ring)->mmio_base+0x518)
127
#define RING_PP_DIR_DCLV(ring)		((ring)->mmio_base+0x220)
119
#define RING_PP_DIR_DCLV(ring)		((ring)->mmio_base+0x220)
Line 239... Line 231...
239
 * - One can actually load arbitrary many arbitrary registers: Simply issue x
231
 * - One can actually load arbitrary many arbitrary registers: Simply issue x
240
 *   address/value pairs. Don't overdue it, though, x <= 2^4 must hold!
232
 *   address/value pairs. Don't overdue it, though, x <= 2^4 must hold!
241
 */
233
 */
242
#define MI_LOAD_REGISTER_IMM(x)	MI_INSTR(0x22, 2*x-1)
234
#define MI_LOAD_REGISTER_IMM(x)	MI_INSTR(0x22, 2*x-1)
243
#define MI_FLUSH_DW		MI_INSTR(0x26, 1) /* for GEN6 */
235
#define MI_FLUSH_DW		MI_INSTR(0x26, 1) /* for GEN6 */
-
 
236
#define   MI_FLUSH_DW_STORE_INDEX	(1<<21)
244
#define   MI_INVALIDATE_TLB	(1<<18)
237
#define   MI_INVALIDATE_TLB	(1<<18)
-
 
238
#define   MI_FLUSH_DW_OP_STOREDW	(1<<14)
245
#define   MI_INVALIDATE_BSD	(1<<7)
239
#define   MI_INVALIDATE_BSD	(1<<7)
-
 
240
#define   MI_FLUSH_DW_USE_GTT		(1<<2)
-
 
241
#define   MI_FLUSH_DW_USE_PPGTT		(0<<2)
246
#define MI_BATCH_BUFFER		MI_INSTR(0x30, 1)
242
#define MI_BATCH_BUFFER		MI_INSTR(0x30, 1)
247
#define   MI_BATCH_NON_SECURE	(1)
243
#define   MI_BATCH_NON_SECURE	(1)
-
 
244
/* for snb/ivb/vlv this also means "batch in ppgtt" when ppgtt is enabled. */
248
#define   MI_BATCH_NON_SECURE_I965 (1<<8)
245
#define   MI_BATCH_NON_SECURE_I965 (1<<8)
-
 
246
#define   MI_BATCH_PPGTT_HSW		(1<<8)
-
 
247
#define   MI_BATCH_NON_SECURE_HSW 	(1<<13)
249
#define MI_BATCH_BUFFER_START	MI_INSTR(0x31, 0)
248
#define MI_BATCH_BUFFER_START	MI_INSTR(0x31, 0)
250
#define   MI_BATCH_GTT		    (2<<6) /* aliased with (1<<7) on gen4 */
249
#define   MI_BATCH_GTT		    (2<<6) /* aliased with (1<<7) on gen4 */
251
#define MI_SEMAPHORE_MBOX	MI_INSTR(0x16, 1) /* gen6+ */
250
#define MI_SEMAPHORE_MBOX	MI_INSTR(0x16, 1) /* gen6+ */
252
#define  MI_SEMAPHORE_GLOBAL_GTT    (1<<22)
251
#define  MI_SEMAPHORE_GLOBAL_GTT    (1<<22)
253
#define  MI_SEMAPHORE_UPDATE	    (1<<21)
252
#define  MI_SEMAPHORE_UPDATE	    (1<<21)
Line 367... Line 366...
367
#define _DPIO_REFSFR_A			0x8014
366
#define _DPIO_REFSFR_A			0x8014
368
#define   DPIO_REFSEL_OVERRIDE		27
367
#define   DPIO_REFSEL_OVERRIDE		27
369
#define   DPIO_PLL_MODESEL_SHIFT	24 /* 3 bits */
368
#define   DPIO_PLL_MODESEL_SHIFT	24 /* 3 bits */
370
#define   DPIO_BIAS_CURRENT_CTL_SHIFT	21 /* 3 bits, always 0x7 */
369
#define   DPIO_BIAS_CURRENT_CTL_SHIFT	21 /* 3 bits, always 0x7 */
371
#define   DPIO_PLL_REFCLK_SEL_SHIFT	16 /* 2 bits */
370
#define   DPIO_PLL_REFCLK_SEL_SHIFT	16 /* 2 bits */
-
 
371
#define   DPIO_PLL_REFCLK_SEL_MASK	3
372
#define   DPIO_DRIVER_CTL_SHIFT		12 /* always set to 0x8 */
372
#define   DPIO_DRIVER_CTL_SHIFT		12 /* always set to 0x8 */
373
#define   DPIO_CLK_BIAS_CTL_SHIFT	8 /* always set to 0x5 */
373
#define   DPIO_CLK_BIAS_CTL_SHIFT	8 /* always set to 0x5 */
374
#define _DPIO_REFSFR_B			0x8034
374
#define _DPIO_REFSFR_B			0x8034
375
#define DPIO_REFSFR(pipe) _PIPE(pipe, _DPIO_REFSFR_A, _DPIO_REFSFR_B)
375
#define DPIO_REFSFR(pipe) _PIPE(pipe, _DPIO_REFSFR_A, _DPIO_REFSFR_B)
Line 382... Line 382...
382
#define _DPIO_LFP_COEFF_B		0x8068
382
#define _DPIO_LFP_COEFF_B		0x8068
383
#define DPIO_LFP_COEFF(pipe) _PIPE(pipe, _DPIO_LFP_COEFF_A, _DPIO_LFP_COEFF_B)
383
#define DPIO_LFP_COEFF(pipe) _PIPE(pipe, _DPIO_LFP_COEFF_A, _DPIO_LFP_COEFF_B)
Line 384... Line 384...
384
 
384
 
Line -... Line 385...
-
 
385
#define DPIO_FASTCLK_DISABLE		0x8100
-
 
386
 
-
 
387
#define DPIO_DATA_CHANNEL1		0x8220
385
#define DPIO_FASTCLK_DISABLE		0x8100
388
#define DPIO_DATA_CHANNEL2		0x8420
386
 
389
 
387
/*
390
/*
388
 * Fence registers
391
 * Fence registers
389
 */
392
 */
Line 507... Line 510...
507
 
510
 
508
#define ERROR_GEN6	0x040a0
511
#define ERROR_GEN6	0x040a0
509
#define GEN7_ERR_INT	0x44040
512
#define GEN7_ERR_INT	0x44040
Line -... Line 513...
-
 
513
#define   ERR_INT_MMIO_UNCLAIMED (1<<13)
-
 
514
 
510
#define   ERR_INT_MMIO_UNCLAIMED (1<<13)
515
#define DERRMR		0x44050
511
 
516
 
512
/* GM45+ chicken bits -- debug workaround bits that may be required
517
/* GM45+ chicken bits -- debug workaround bits that may be required
513
 * for various sorts of correct behavior.  The top 16 bits of each are
518
 * for various sorts of correct behavior.  The top 16 bits of each are
514
 * the enables for writing to the corresponding low bit.
519
 * the enables for writing to the corresponding low bit.
-
 
520
 */
515
 */
521
#define _3D_CHICKEN	0x02084
516
#define _3D_CHICKEN	0x02084
522
#define  _3D_CHICKEN_HIZ_PLANE_DISABLE_MSAA_4X_SNB	(1 << 10)
517
#define _3D_CHICKEN2	0x0208c
523
#define _3D_CHICKEN2	0x0208c
518
/* Disables pipelining of read flushes past the SF-WIZ interface.
524
/* Disables pipelining of read flushes past the SF-WIZ interface.
519
 * Required on all Ironlake steppings according to the B-Spec, but the
525
 * Required on all Ironlake steppings according to the B-Spec, but the
520
 * particular danger of not doing so is not specified.
526
 * particular danger of not doing so is not specified.
521
 */
527
 */
-
 
528
# define _3D_CHICKEN2_WM_READ_PIPELINED			(1 << 14)
522
# define _3D_CHICKEN2_WM_READ_PIPELINED			(1 << 14)
529
#define _3D_CHICKEN3	0x02090
Line 523... Line 530...
523
#define _3D_CHICKEN3	0x02090
530
#define  _3D_CHICKEN_SF_DISABLE_OBJEND_CULL		(1 << 10)
524
#define  _3D_CHICKEN3_SF_DISABLE_FASTCLIP_CULL		(1 << 5)
531
#define  _3D_CHICKEN3_SF_DISABLE_FASTCLIP_CULL		(1 << 5)
525
 
532
 
-
 
533
#define MI_MODE		0x0209c
Line 526... Line 534...
526
#define MI_MODE		0x0209c
534
# define VS_TIMER_DISPATCH				(1 << 6)
527
# define VS_TIMER_DISPATCH				(1 << 6)
535
# define MI_FLUSH_ENABLE				(1 << 12)
-
 
536
# define ASYNC_FLIP_PERF_DISABLE			(1 << 14)
Line 528... Line 537...
528
# define MI_FLUSH_ENABLE				(1 << 12)
537
 
529
 
538
#define GEN6_GT_MODE	0x20d0
530
#define GEN6_GT_MODE	0x20d0
539
#define   GEN6_GT_MODE_HI	(1 << 9)
531
#define   GEN6_GT_MODE_HI	(1 << 9)
540
#define   GEN6_TD_FOUR_ROW_DISPATCH_DISABLE		(1 << 5)
Line 545... Line 554...
545
#define SCPD0		0x0209c /* 915+ only */
554
#define SCPD0		0x0209c /* 915+ only */
546
#define IER		0x020a0
555
#define IER		0x020a0
547
#define IIR		0x020a4
556
#define IIR		0x020a4
548
#define IMR		0x020a8
557
#define IMR		0x020a8
549
#define ISR		0x020ac
558
#define ISR		0x020ac
-
 
559
#define VLV_GUNIT_CLOCK_GATE	0x182060
-
 
560
#define   GCFG_DIS		(1<<8)
550
#define VLV_IIR_RW	0x182084
561
#define VLV_IIR_RW	0x182084
551
#define VLV_IER		0x1820a0
562
#define VLV_IER		0x1820a0
552
#define VLV_IIR		0x1820a4
563
#define VLV_IIR		0x1820a4
553
#define VLV_IMR		0x1820a8
564
#define VLV_IMR		0x1820a8
554
#define VLV_ISR		0x1820ac
565
#define VLV_ISR		0x1820ac
Line 659... Line 670...
659
/* Set display plane priority */
670
/* Set display plane priority */
660
#define   MI_ARB_DISPLAY_PRIORITY_A_B		(0 << 0)	/* display A > display B */
671
#define   MI_ARB_DISPLAY_PRIORITY_A_B		(0 << 0)	/* display A > display B */
661
#define   MI_ARB_DISPLAY_PRIORITY_B_A		(1 << 0)	/* display B > display A */
672
#define   MI_ARB_DISPLAY_PRIORITY_B_A		(1 << 0)	/* display B > display A */
Line 662... Line 673...
662
 
673
 
-
 
674
#define CACHE_MODE_0	0x02120 /* 915+ only */
663
#define CACHE_MODE_0	0x02120 /* 915+ only */
675
#define   CM0_PIPELINED_RENDER_FLUSH_DISABLE (1<<8)
664
#define   CM0_IZ_OPT_DISABLE      (1<<6)
676
#define   CM0_IZ_OPT_DISABLE      (1<<6)
665
#define   CM0_ZR_OPT_DISABLE      (1<<5)
677
#define   CM0_ZR_OPT_DISABLE      (1<<5)
666
#define	  CM0_STC_EVICT_DISABLE_LRA_SNB	(1<<5)
678
#define	  CM0_STC_EVICT_DISABLE_LRA_SNB	(1<<5)
667
#define   CM0_DEPTH_EVICT_DISABLE (1<<4)
679
#define   CM0_DEPTH_EVICT_DISABLE (1<<4)
668
#define   CM0_COLOR_EVICT_DISABLE (1<<3)
680
#define   CM0_COLOR_EVICT_DISABLE (1<<3)
669
#define   CM0_DEPTH_WRITE_DISABLE (1<<1)
681
#define   CM0_DEPTH_WRITE_DISABLE (1<<1)
670
#define   CM0_RC_OP_FLUSH_DISABLE (1<<0)
682
#define   CM0_RC_OP_FLUSH_DISABLE (1<<0)
671
#define BB_ADDR		0x02140 /* 8 bytes */
683
#define BB_ADDR		0x02140 /* 8 bytes */
-
 
684
#define GFX_FLSH_CNTL	0x02170 /* 915+ only */
-
 
685
#define GFX_FLSH_CNTL_GEN6	0x101008
672
#define GFX_FLSH_CNTL	0x02170 /* 915+ only */
686
#define   GFX_FLSH_CNTL_EN	(1<<0)
673
#define ECOSKPD		0x021d0
687
#define ECOSKPD		0x021d0
674
#define   ECO_GATING_CX_ONLY	(1<<3)
688
#define   ECO_GATING_CX_ONLY	(1<<3)
Line 675... Line 689...
675
#define   ECO_FLIP_DONE		(1<<0)
689
#define   ECO_FLIP_DONE		(1<<0)
Line 1557... Line 1571...
1557
#define _PIPEBSRC	0x6101c
1571
#define _PIPEBSRC	0x6101c
1558
#define _BCLRPAT_B	0x61020
1572
#define _BCLRPAT_B	0x61020
1559
#define _VSYNCSHIFT_B	0x61028
1573
#define _VSYNCSHIFT_B	0x61028
Line 1560... Line 1574...
1560
 
1574
 
1561
 
1575
 
1562
#define HTOTAL(pipe) _PIPE(pipe, _HTOTAL_A, _HTOTAL_B)
1576
#define HTOTAL(trans) _TRANSCODER(trans, _HTOTAL_A, _HTOTAL_B)
1563
#define HBLANK(pipe) _PIPE(pipe, _HBLANK_A, _HBLANK_B)
1577
#define HBLANK(trans) _TRANSCODER(trans, _HBLANK_A, _HBLANK_B)
1564
#define HSYNC(pipe) _PIPE(pipe, _HSYNC_A, _HSYNC_B)
1578
#define HSYNC(trans) _TRANSCODER(trans, _HSYNC_A, _HSYNC_B)
1565
#define VTOTAL(pipe) _PIPE(pipe, _VTOTAL_A, _VTOTAL_B)
1579
#define VTOTAL(trans) _TRANSCODER(trans, _VTOTAL_A, _VTOTAL_B)
1566
#define VBLANK(pipe) _PIPE(pipe, _VBLANK_A, _VBLANK_B)
1580
#define VBLANK(trans) _TRANSCODER(trans, _VBLANK_A, _VBLANK_B)
1567
#define VSYNC(pipe) _PIPE(pipe, _VSYNC_A, _VSYNC_B)
1581
#define VSYNC(trans) _TRANSCODER(trans, _VSYNC_A, _VSYNC_B)
Line 1568... Line 1582...
1568
#define BCLRPAT(pipe) _PIPE(pipe, _BCLRPAT_A, _BCLRPAT_B)
1582
#define BCLRPAT(pipe) _PIPE(pipe, _BCLRPAT_A, _BCLRPAT_B)
1569
#define VSYNCSHIFT(pipe) _PIPE(pipe, _VSYNCSHIFT_A, _VSYNCSHIFT_B)
1583
#define VSYNCSHIFT(trans) _TRANSCODER(trans, _VSYNCSHIFT_A, _VSYNCSHIFT_B)
1570
 
1584
 
1571
/* VGA port control */
1585
/* VGA port control */
Line 2639... Line 2653...
2639
#define   PIPECONF_PIPE_LOCKED	(1<<25)
2653
#define   PIPECONF_PIPE_LOCKED	(1<<25)
2640
#define   PIPECONF_PALETTE	0
2654
#define   PIPECONF_PALETTE	0
2641
#define   PIPECONF_GAMMA		(1<<24)
2655
#define   PIPECONF_GAMMA		(1<<24)
2642
#define   PIPECONF_FORCE_BORDER	(1<<25)
2656
#define   PIPECONF_FORCE_BORDER	(1<<25)
2643
#define   PIPECONF_INTERLACE_MASK	(7 << 21)
2657
#define   PIPECONF_INTERLACE_MASK	(7 << 21)
-
 
2658
#define   PIPECONF_INTERLACE_MASK_HSW	(3 << 21)
2644
/* Note that pre-gen3 does not support interlaced display directly. Panel
2659
/* Note that pre-gen3 does not support interlaced display directly. Panel
2645
 * fitting must be disabled on pre-ilk for interlaced. */
2660
 * fitting must be disabled on pre-ilk for interlaced. */
2646
#define   PIPECONF_PROGRESSIVE	(0 << 21)
2661
#define   PIPECONF_PROGRESSIVE	(0 << 21)
2647
#define   PIPECONF_INTERLACE_W_SYNC_SHIFT_PANEL	(4 << 21) /* gen4 only */
2662
#define   PIPECONF_INTERLACE_W_SYNC_SHIFT_PANEL	(4 << 21) /* gen4 only */
2648
#define   PIPECONF_INTERLACE_W_SYNC_SHIFT	(5 << 21) /* gen4 only */
2663
#define   PIPECONF_INTERLACE_W_SYNC_SHIFT	(5 << 21) /* gen4 only */
Line 2709... Line 2724...
2709
#define   PIPE_10BPC				(1 << 5)
2724
#define   PIPE_10BPC				(1 << 5)
2710
#define   PIPE_6BPC				(2 << 5)
2725
#define   PIPE_6BPC				(2 << 5)
2711
#define   PIPE_12BPC				(3 << 5)
2726
#define   PIPE_12BPC				(3 << 5)
Line 2712... Line 2727...
2712
 
2727
 
2713
#define PIPESRC(pipe) _PIPE(pipe, _PIPEASRC, _PIPEBSRC)
2728
#define PIPESRC(pipe) _PIPE(pipe, _PIPEASRC, _PIPEBSRC)
2714
#define PIPECONF(pipe) _PIPE(pipe, _PIPEACONF, _PIPEBCONF)
2729
#define PIPECONF(tran) _TRANSCODER(tran, _PIPEACONF, _PIPEBCONF)
2715
#define PIPEDSL(pipe)  _PIPE(pipe, _PIPEADSL, _PIPEBDSL)
2730
#define PIPEDSL(pipe)  _PIPE(pipe, _PIPEADSL, _PIPEBDSL)
2716
#define PIPEFRAME(pipe) _PIPE(pipe, _PIPEAFRAMEHIGH, _PIPEBFRAMEHIGH)
2731
#define PIPEFRAME(pipe) _PIPE(pipe, _PIPEAFRAMEHIGH, _PIPEBFRAMEHIGH)
2717
#define PIPEFRAMEPIXEL(pipe)  _PIPE(pipe, _PIPEAFRAMEPIXEL, _PIPEBFRAMEPIXEL)
2732
#define PIPEFRAMEPIXEL(pipe)  _PIPE(pipe, _PIPEAFRAMEPIXEL, _PIPEBFRAMEPIXEL)
Line 2996... Line 3011...
2996
#define   DISPLAY_PLANE_ENABLE			(1<<31)
3011
#define   DISPLAY_PLANE_ENABLE			(1<<31)
2997
#define   DISPLAY_PLANE_DISABLE			0
3012
#define   DISPLAY_PLANE_DISABLE			0
2998
#define   DISPPLANE_GAMMA_ENABLE		(1<<30)
3013
#define   DISPPLANE_GAMMA_ENABLE		(1<<30)
2999
#define   DISPPLANE_GAMMA_DISABLE		0
3014
#define   DISPPLANE_GAMMA_DISABLE		0
3000
#define   DISPPLANE_PIXFORMAT_MASK		(0xf<<26)
3015
#define   DISPPLANE_PIXFORMAT_MASK		(0xf<<26)
-
 
3016
#define   DISPPLANE_YUV422			(0x0<<26)
3001
#define   DISPPLANE_8BPP			(0x2<<26)
3017
#define   DISPPLANE_8BPP			(0x2<<26)
-
 
3018
#define   DISPPLANE_BGRA555			(0x3<<26)
3002
#define   DISPPLANE_15_16BPP			(0x4<<26)
3019
#define   DISPPLANE_BGRX555			(0x4<<26)
3003
#define   DISPPLANE_16BPP			(0x5<<26)
3020
#define   DISPPLANE_BGRX565			(0x5<<26)
3004
#define   DISPPLANE_32BPP_NO_ALPHA		(0x6<<26)
3021
#define   DISPPLANE_BGRX888			(0x6<<26)
3005
#define   DISPPLANE_32BPP			(0x7<<26)
3022
#define   DISPPLANE_BGRA888			(0x7<<26)
-
 
3023
#define   DISPPLANE_RGBX101010			(0x8<<26)
-
 
3024
#define   DISPPLANE_RGBA101010			(0x9<<26)
3006
#define   DISPPLANE_32BPP_30BIT_NO_ALPHA	(0xa<<26)
3025
#define   DISPPLANE_BGRX101010			(0xa<<26)
-
 
3026
#define   DISPPLANE_RGBX161616			(0xc<<26)
-
 
3027
#define   DISPPLANE_RGBX888			(0xe<<26)
-
 
3028
#define   DISPPLANE_RGBA888			(0xf<<26)
3007
#define   DISPPLANE_STEREO_ENABLE		(1<<25)
3029
#define   DISPPLANE_STEREO_ENABLE		(1<<25)
3008
#define   DISPPLANE_STEREO_DISABLE		0
3030
#define   DISPPLANE_STEREO_DISABLE		0
3009
#define   DISPPLANE_SEL_PIPE_SHIFT		24
3031
#define   DISPPLANE_SEL_PIPE_SHIFT		24
3010
#define   DISPPLANE_SEL_PIPE_MASK		(3<
3032
#define   DISPPLANE_SEL_PIPE_MASK		(3<
3011
#define   DISPPLANE_SEL_PIPE_A			0
3033
#define   DISPPLANE_SEL_PIPE_A			0
Line 3022... Line 3044...
3022
#define _DSPASTRIDE		0x70188
3044
#define _DSPASTRIDE		0x70188
3023
#define _DSPAPOS			0x7018C /* reserved */
3045
#define _DSPAPOS			0x7018C /* reserved */
3024
#define _DSPASIZE		0x70190
3046
#define _DSPASIZE		0x70190
3025
#define _DSPASURF		0x7019C /* 965+ only */
3047
#define _DSPASURF		0x7019C /* 965+ only */
3026
#define _DSPATILEOFF		0x701A4 /* 965+ only */
3048
#define _DSPATILEOFF		0x701A4 /* 965+ only */
-
 
3049
#define _DSPAOFFSET		0x701A4 /* HSW */
-
 
3050
#define _DSPASURFLIVE		0x701AC
Line 3027... Line 3051...
3027
 
3051
 
3028
#define DSPCNTR(plane) _PIPE(plane, _DSPACNTR, _DSPBCNTR)
3052
#define DSPCNTR(plane) _PIPE(plane, _DSPACNTR, _DSPBCNTR)
3029
#define DSPADDR(plane) _PIPE(plane, _DSPAADDR, _DSPBADDR)
3053
#define DSPADDR(plane) _PIPE(plane, _DSPAADDR, _DSPBADDR)
3030
#define DSPSTRIDE(plane) _PIPE(plane, _DSPASTRIDE, _DSPBSTRIDE)
3054
#define DSPSTRIDE(plane) _PIPE(plane, _DSPASTRIDE, _DSPBSTRIDE)
3031
#define DSPPOS(plane) _PIPE(plane, _DSPAPOS, _DSPBPOS)
3055
#define DSPPOS(plane) _PIPE(plane, _DSPAPOS, _DSPBPOS)
3032
#define DSPSIZE(plane) _PIPE(plane, _DSPASIZE, _DSPBSIZE)
3056
#define DSPSIZE(plane) _PIPE(plane, _DSPASIZE, _DSPBSIZE)
3033
#define DSPSURF(plane) _PIPE(plane, _DSPASURF, _DSPBSURF)
3057
#define DSPSURF(plane) _PIPE(plane, _DSPASURF, _DSPBSURF)
3034
#define DSPTILEOFF(plane) _PIPE(plane, _DSPATILEOFF, _DSPBTILEOFF)
3058
#define DSPTILEOFF(plane) _PIPE(plane, _DSPATILEOFF, _DSPBTILEOFF)
-
 
3059
#define DSPLINOFF(plane) DSPADDR(plane)
-
 
3060
#define DSPOFFSET(plane) _PIPE(plane, _DSPAOFFSET, _DSPBOFFSET)
Line 3035... Line 3061...
3035
#define DSPLINOFF(plane) DSPADDR(plane)
3061
#define DSPSURFLIVE(plane) _PIPE(plane, _DSPASURFLIVE, _DSPBSURFLIVE)
3036
 
3062
 
3037
/* Display/Sprite base address macros */
3063
/* Display/Sprite base address macros */
3038
#define DISP_BASEADDR_MASK	(0xfffff000)
3064
#define DISP_BASEADDR_MASK	(0xfffff000)
Line 3076... Line 3102...
3076
#define _DSPBSTRIDE		0x71188
3102
#define _DSPBSTRIDE		0x71188
3077
#define _DSPBPOS			0x7118C
3103
#define _DSPBPOS			0x7118C
3078
#define _DSPBSIZE		0x71190
3104
#define _DSPBSIZE		0x71190
3079
#define _DSPBSURF		0x7119C
3105
#define _DSPBSURF		0x7119C
3080
#define _DSPBTILEOFF		0x711A4
3106
#define _DSPBTILEOFF		0x711A4
-
 
3107
#define _DSPBOFFSET		0x711A4
-
 
3108
#define _DSPBSURFLIVE		0x711AC
Line 3081... Line 3109...
3081
 
3109
 
3082
/* Sprite A control */
3110
/* Sprite A control */
3083
#define _DVSACNTR		0x72180
3111
#define _DVSACNTR		0x72180
3084
#define   DVS_ENABLE		(1<<31)
3112
#define   DVS_ENABLE		(1<<31)
Line 3141... Line 3169...
3141
#define DVSSIZE(pipe) _PIPE(pipe, _DVSASIZE, _DVSBSIZE)
3169
#define DVSSIZE(pipe) _PIPE(pipe, _DVSASIZE, _DVSBSIZE)
3142
#define DVSSCALE(pipe) _PIPE(pipe, _DVSASCALE, _DVSBSCALE)
3170
#define DVSSCALE(pipe) _PIPE(pipe, _DVSASCALE, _DVSBSCALE)
3143
#define DVSTILEOFF(pipe) _PIPE(pipe, _DVSATILEOFF, _DVSBTILEOFF)
3171
#define DVSTILEOFF(pipe) _PIPE(pipe, _DVSATILEOFF, _DVSBTILEOFF)
3144
#define DVSKEYVAL(pipe) _PIPE(pipe, _DVSAKEYVAL, _DVSBKEYVAL)
3172
#define DVSKEYVAL(pipe) _PIPE(pipe, _DVSAKEYVAL, _DVSBKEYVAL)
3145
#define DVSKEYMSK(pipe) _PIPE(pipe, _DVSAKEYMSK, _DVSBKEYMSK)
3173
#define DVSKEYMSK(pipe) _PIPE(pipe, _DVSAKEYMSK, _DVSBKEYMSK)
-
 
3174
#define DVSSURFLIVE(pipe) _PIPE(pipe, _DVSASURFLIVE, _DVSBSURFLIVE)
Line 3146... Line 3175...
3146
 
3175
 
3147
#define _SPRA_CTL		0x70280
3176
#define _SPRA_CTL		0x70280
3148
#define   SPRITE_ENABLE			(1<<31)
3177
#define   SPRITE_ENABLE			(1<<31)
3149
#define   SPRITE_GAMMA_ENABLE		(1<<30)
3178
#define   SPRITE_GAMMA_ENABLE		(1<<30)
Line 3175... Line 3204...
3175
#define _SPRA_KEYVAL		0x70294
3204
#define _SPRA_KEYVAL		0x70294
3176
#define _SPRA_KEYMSK		0x70298
3205
#define _SPRA_KEYMSK		0x70298
3177
#define _SPRA_SURF		0x7029c
3206
#define _SPRA_SURF		0x7029c
3178
#define _SPRA_KEYMAX		0x702a0
3207
#define _SPRA_KEYMAX		0x702a0
3179
#define _SPRA_TILEOFF		0x702a4
3208
#define _SPRA_TILEOFF		0x702a4
-
 
3209
#define _SPRA_OFFSET		0x702a4
-
 
3210
#define _SPRA_SURFLIVE		0x702ac
3180
#define _SPRA_SCALE		0x70304
3211
#define _SPRA_SCALE		0x70304
3181
#define   SPRITE_SCALE_ENABLE	(1<<31)
3212
#define   SPRITE_SCALE_ENABLE	(1<<31)
3182
#define   SPRITE_FILTER_MASK	(3<<29)
3213
#define   SPRITE_FILTER_MASK	(3<<29)
3183
#define   SPRITE_FILTER_MEDIUM	(0<<29)
3214
#define   SPRITE_FILTER_MEDIUM	(0<<29)
3184
#define   SPRITE_FILTER_ENHANCING	(1<<29)
3215
#define   SPRITE_FILTER_ENHANCING	(1<<29)
Line 3195... Line 3226...
3195
#define _SPRB_KEYVAL		0x71294
3226
#define _SPRB_KEYVAL		0x71294
3196
#define _SPRB_KEYMSK		0x71298
3227
#define _SPRB_KEYMSK		0x71298
3197
#define _SPRB_SURF		0x7129c
3228
#define _SPRB_SURF		0x7129c
3198
#define _SPRB_KEYMAX		0x712a0
3229
#define _SPRB_KEYMAX		0x712a0
3199
#define _SPRB_TILEOFF		0x712a4
3230
#define _SPRB_TILEOFF		0x712a4
-
 
3231
#define _SPRB_OFFSET		0x712a4
-
 
3232
#define _SPRB_SURFLIVE		0x712ac
3200
#define _SPRB_SCALE		0x71304
3233
#define _SPRB_SCALE		0x71304
3201
#define _SPRB_GAMC		0x71400
3234
#define _SPRB_GAMC		0x71400
Line 3202... Line 3235...
3202
 
3235
 
3203
#define SPRCTL(pipe) _PIPE(pipe, _SPRA_CTL, _SPRB_CTL)
3236
#define SPRCTL(pipe) _PIPE(pipe, _SPRA_CTL, _SPRB_CTL)
Line 3208... Line 3241...
3208
#define SPRKEYVAL(pipe) _PIPE(pipe, _SPRA_KEYVAL, _SPRB_KEYVAL)
3241
#define SPRKEYVAL(pipe) _PIPE(pipe, _SPRA_KEYVAL, _SPRB_KEYVAL)
3209
#define SPRKEYMSK(pipe) _PIPE(pipe, _SPRA_KEYMSK, _SPRB_KEYMSK)
3242
#define SPRKEYMSK(pipe) _PIPE(pipe, _SPRA_KEYMSK, _SPRB_KEYMSK)
3210
#define SPRSURF(pipe) _PIPE(pipe, _SPRA_SURF, _SPRB_SURF)
3243
#define SPRSURF(pipe) _PIPE(pipe, _SPRA_SURF, _SPRB_SURF)
3211
#define SPRKEYMAX(pipe) _PIPE(pipe, _SPRA_KEYMAX, _SPRB_KEYMAX)
3244
#define SPRKEYMAX(pipe) _PIPE(pipe, _SPRA_KEYMAX, _SPRB_KEYMAX)
3212
#define SPRTILEOFF(pipe) _PIPE(pipe, _SPRA_TILEOFF, _SPRB_TILEOFF)
3245
#define SPRTILEOFF(pipe) _PIPE(pipe, _SPRA_TILEOFF, _SPRB_TILEOFF)
-
 
3246
#define SPROFFSET(pipe) _PIPE(pipe, _SPRA_OFFSET, _SPRB_OFFSET)
3213
#define SPRSCALE(pipe) _PIPE(pipe, _SPRA_SCALE, _SPRB_SCALE)
3247
#define SPRSCALE(pipe) _PIPE(pipe, _SPRA_SCALE, _SPRB_SCALE)
3214
#define SPRGAMC(pipe) _PIPE(pipe, _SPRA_GAMC, _SPRB_GAMC)
3248
#define SPRGAMC(pipe) _PIPE(pipe, _SPRA_GAMC, _SPRB_GAMC)
-
 
3249
#define SPRSURFLIVE(pipe) _PIPE(pipe, _SPRA_SURFLIVE, _SPRB_SURFLIVE)
Line 3215... Line 3250...
3215
 
3250
 
3216
/* VBIOS regs */
3251
/* VBIOS regs */
3217
#define VGACNTRL		0x71400
3252
#define VGACNTRL		0x71400
3218
# define VGA_DISP_DISABLE			(1 << 31)
3253
# define VGA_DISP_DISABLE			(1 << 31)
Line 3244... Line 3279...
3244
#define FDI_PLL_BIOS_2  0x46008
3279
#define FDI_PLL_BIOS_2  0x46008
3245
#define DISPLAY_PORT_PLL_BIOS_0         0x4600c
3280
#define DISPLAY_PORT_PLL_BIOS_0         0x4600c
3246
#define DISPLAY_PORT_PLL_BIOS_1         0x46010
3281
#define DISPLAY_PORT_PLL_BIOS_1         0x46010
3247
#define DISPLAY_PORT_PLL_BIOS_2         0x46014
3282
#define DISPLAY_PORT_PLL_BIOS_2         0x46014
Line 3248... Line -...
3248
 
-
 
3249
#define PCH_DSPCLK_GATE_D	0x42020
-
 
3250
# define DPFCUNIT_CLOCK_GATE_DISABLE		(1 << 9)
-
 
3251
# define DPFCRUNIT_CLOCK_GATE_DISABLE		(1 << 8)
-
 
3252
# define DPFDUNIT_CLOCK_GATE_DISABLE		(1 << 7)
-
 
3253
# define DPARBUNIT_CLOCK_GATE_DISABLE		(1 << 5)
-
 
3254
 
3283
 
3255
#define PCH_3DCGDIS0		0x46020
3284
#define PCH_3DCGDIS0		0x46020
3256
# define MARIUNIT_CLOCK_GATE_DISABLE		(1 << 18)
3285
# define MARIUNIT_CLOCK_GATE_DISABLE		(1 << 18)
Line 3257... Line 3286...
3257
# define SVSMUNIT_CLOCK_GATE_DISABLE		(1 << 1)
3286
# define SVSMUNIT_CLOCK_GATE_DISABLE		(1 << 1)
Line 3299... Line 3328...
3299
#define _PIPEB_LINK_N1           0x61044
3328
#define _PIPEB_LINK_N1           0x61044
Line 3300... Line 3329...
3300
 
3329
 
3301
#define _PIPEB_LINK_M2           0x61048
3330
#define _PIPEB_LINK_M2           0x61048
Line 3302... Line 3331...
3302
#define _PIPEB_LINK_N2           0x6104c
3331
#define _PIPEB_LINK_N2           0x6104c
3303
 
3332
 
3304
#define PIPE_DATA_M1(pipe) _PIPE(pipe, _PIPEA_DATA_M1, _PIPEB_DATA_M1)
3333
#define PIPE_DATA_M1(tran) _TRANSCODER(tran, _PIPEA_DATA_M1, _PIPEB_DATA_M1)
3305
#define PIPE_DATA_N1(pipe) _PIPE(pipe, _PIPEA_DATA_N1, _PIPEB_DATA_N1)
3334
#define PIPE_DATA_N1(tran) _TRANSCODER(tran, _PIPEA_DATA_N1, _PIPEB_DATA_N1)
3306
#define PIPE_DATA_M2(pipe) _PIPE(pipe, _PIPEA_DATA_M2, _PIPEB_DATA_M2)
3335
#define PIPE_DATA_M2(tran) _TRANSCODER(tran, _PIPEA_DATA_M2, _PIPEB_DATA_M2)
3307
#define PIPE_DATA_N2(pipe) _PIPE(pipe, _PIPEA_DATA_N2, _PIPEB_DATA_N2)
3336
#define PIPE_DATA_N2(tran) _TRANSCODER(tran, _PIPEA_DATA_N2, _PIPEB_DATA_N2)
3308
#define PIPE_LINK_M1(pipe) _PIPE(pipe, _PIPEA_LINK_M1, _PIPEB_LINK_M1)
3337
#define PIPE_LINK_M1(tran) _TRANSCODER(tran, _PIPEA_LINK_M1, _PIPEB_LINK_M1)
3309
#define PIPE_LINK_N1(pipe) _PIPE(pipe, _PIPEA_LINK_N1, _PIPEB_LINK_N1)
3338
#define PIPE_LINK_N1(tran) _TRANSCODER(tran, _PIPEA_LINK_N1, _PIPEB_LINK_N1)
Line 3310... Line 3339...
3310
#define PIPE_LINK_M2(pipe) _PIPE(pipe, _PIPEA_LINK_M2, _PIPEB_LINK_M2)
3339
#define PIPE_LINK_M2(tran) _TRANSCODER(tran, _PIPEA_LINK_M2, _PIPEB_LINK_M2)
3311
#define PIPE_LINK_N2(pipe) _PIPE(pipe, _PIPEA_LINK_N2, _PIPEB_LINK_N2)
3340
#define PIPE_LINK_N2(tran) _TRANSCODER(tran, _PIPEA_LINK_N2, _PIPEB_LINK_N2)
3312
 
3341
 
3313
/* CPU panel fitter */
3342
/* CPU panel fitter */
3314
/* IVB+ has 3 fitters, 0 is 7x5 capable, the other two only 3x3 */
3343
/* IVB+ has 3 fitters, 0 is 7x5 capable, the other two only 3x3 */
-
 
3344
#define _PFA_CTL_1               0x68080
-
 
3345
#define _PFB_CTL_1               0x68880
3315
#define _PFA_CTL_1               0x68080
3346
#define  PF_ENABLE              (1<<31)
3316
#define _PFB_CTL_1               0x68880
3347
#define  PF_PIPE_SEL_MASK_IVB	(3<<29)
3317
#define  PF_ENABLE              (1<<31)
3348
#define  PF_PIPE_SEL_IVB(pipe)	((pipe)<<29)
3318
#define  PF_FILTER_MASK		(3<<23)
3349
#define  PF_FILTER_MASK		(3<<23)
3319
#define  PF_FILTER_PROGRAMMED	(0<<23)
3350
#define  PF_FILTER_PROGRAMMED	(0<<23)
Line 3421... Line 3452...
3421
#define  ILK_INTERNAL_DISPLAY_DISABLE	(1<<30)
3452
#define  ILK_INTERNAL_DISPLAY_DISABLE	(1<<30)
3422
#define  ILK_DISPLAY_DEBUG_DISABLE	(1<<29)
3453
#define  ILK_DISPLAY_DEBUG_DISABLE	(1<<29)
3423
#define  ILK_HDCP_DISABLE		(1<<25)
3454
#define  ILK_HDCP_DISABLE		(1<<25)
3424
#define  ILK_eDP_A_DISABLE		(1<<24)
3455
#define  ILK_eDP_A_DISABLE		(1<<24)
3425
#define  ILK_DESKTOP			(1<<23)
3456
#define  ILK_DESKTOP			(1<<23)
-
 
3457
 
3426
#define ILK_DSPCLK_GATE		0x42020
3458
#define ILK_DSPCLK_GATE_D			0x42020
3427
#define  IVB_VRHUNIT_CLK_GATE	(1<<28)
3459
#define   ILK_VRHUNIT_CLOCK_GATE_DISABLE	(1 << 28)
3428
#define  ILK_DPARB_CLK_GATE	(1<<5)
3460
#define   ILK_DPFCUNIT_CLOCK_GATE_DISABLE	(1 << 9)
3429
#define  ILK_DPFD_CLK_GATE	(1<<7)
3461
#define   ILK_DPFCRUNIT_CLOCK_GATE_DISABLE	(1 << 8)
3430
 
-
 
3431
/* According to spec this bit 7/8/9 of 0x42020 should be set to enable FBC */
-
 
3432
#define   ILK_CLK_FBC		(1<<7)
3462
#define   ILK_DPFDUNIT_CLOCK_GATE_ENABLE	(1 << 7)
3433
#define   ILK_DPFC_DIS1		(1<<8)
-
 
3434
#define   ILK_DPFC_DIS2		(1<<9)
3463
#define   ILK_DPARBUNIT_CLOCK_GATE_ENABLE	(1 << 5)
Line 3435... Line 3464...
3435
 
3464
 
3436
#define IVB_CHICKEN3	0x4200c
3465
#define IVB_CHICKEN3	0x4200c
3437
# define CHICKEN3_DGMG_REQ_OUT_FIX_DISABLE	(1 << 5)
3466
# define CHICKEN3_DGMG_REQ_OUT_FIX_DISABLE	(1 << 5)
Line 3445... Line 3474...
3445
#define GEN7_COMMON_SLICE_CHICKEN1		0x7010
3474
#define GEN7_COMMON_SLICE_CHICKEN1		0x7010
3446
# define GEN7_CSC1_RHWO_OPT_DISABLE_IN_RCC	((1<<10) | (1<<26))
3475
# define GEN7_CSC1_RHWO_OPT_DISABLE_IN_RCC	((1<<10) | (1<<26))
Line 3447... Line 3476...
3447
 
3476
 
3448
#define GEN7_L3CNTLREG1				0xB01C
3477
#define GEN7_L3CNTLREG1				0xB01C
-
 
3478
#define  GEN7_WA_FOR_GEN7_L3_CONTROL			0x3C4FFF8C
Line 3449... Line 3479...
3449
#define  GEN7_WA_FOR_GEN7_L3_CONTROL			0x3C4FFF8C
3479
#define  GEN7_L3AGDIS				(1<<19)
3450
 
3480
 
Line -... Line 3481...
-
 
3481
#define GEN7_L3_CHICKEN_MODE_REGISTER		0xB030
-
 
3482
#define  GEN7_WA_L3_CHICKEN_MODE				0x20000000
-
 
3483
 
3451
#define GEN7_L3_CHICKEN_MODE_REGISTER		0xB030
3484
#define GEN7_L3SQCREG4				0xb034
3452
#define  GEN7_WA_L3_CHICKEN_MODE				0x20000000
3485
#define  L3SQ_URB_READ_CAM_MATCH_DISABLE	(1<<27)
3453
 
3486
 
Line -... Line 3487...
-
 
3487
/* WaCatErrorRejectionIssue */
-
 
3488
#define GEN7_SQ_CHICKEN_MBCUNIT_CONFIG		0x9030
-
 
3489
#define  GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB	(1<<11)
3454
/* WaCatErrorRejectionIssue */
3490
 
Line 3455... Line 3491...
3455
#define GEN7_SQ_CHICKEN_MBCUNIT_CONFIG		0x9030
3491
#define HSW_FUSE_STRAP		0x42014
3456
#define  GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB	(1<<11)
3492
#define  HSW_CDCLK_LIMIT	(1 << 24)
3457
 
3493
 
Line 3684... Line 3720...
3684
 
3720
 
3685
#define TVIDEO_DIP_CTL(pipe) _PIPE(pipe, _VIDEO_DIP_CTL_A, _VIDEO_DIP_CTL_B)
3721
#define TVIDEO_DIP_CTL(pipe) _PIPE(pipe, _VIDEO_DIP_CTL_A, _VIDEO_DIP_CTL_B)
3686
#define TVIDEO_DIP_DATA(pipe) _PIPE(pipe, _VIDEO_DIP_DATA_A, _VIDEO_DIP_DATA_B)
3722
#define TVIDEO_DIP_DATA(pipe) _PIPE(pipe, _VIDEO_DIP_DATA_A, _VIDEO_DIP_DATA_B)
Line 3687... Line 3723...
3687
#define TVIDEO_DIP_GCP(pipe) _PIPE(pipe, _VIDEO_DIP_GCP_A, _VIDEO_DIP_GCP_B)
3723
#define TVIDEO_DIP_GCP(pipe) _PIPE(pipe, _VIDEO_DIP_GCP_A, _VIDEO_DIP_GCP_B)
3688
 
3724
 
3689
#define VLV_VIDEO_DIP_CTL_A		0x60220
3725
#define VLV_VIDEO_DIP_CTL_A		0x60200
Line 3690... Line 3726...
3690
#define VLV_VIDEO_DIP_DATA_A		0x60208
3726
#define VLV_VIDEO_DIP_DATA_A		0x60208
3691
#define VLV_VIDEO_DIP_GDCP_PAYLOAD_A	0x60210
3727
#define VLV_VIDEO_DIP_GDCP_PAYLOAD_A	0x60210
Line 3793... Line 3829...
3793
#define  TRANS_8BPC             (0<<5)
3829
#define  TRANS_8BPC             (0<<5)
3794
#define  TRANS_10BPC            (1<<5)
3830
#define  TRANS_10BPC            (1<<5)
3795
#define  TRANS_6BPC             (2<<5)
3831
#define  TRANS_6BPC             (2<<5)
3796
#define  TRANS_12BPC            (3<<5)
3832
#define  TRANS_12BPC            (3<<5)
Line -... Line 3833...
-
 
3833
 
-
 
3834
#define _TRANSA_CHICKEN1	 0xf0060
-
 
3835
#define _TRANSB_CHICKEN1	 0xf1060
-
 
3836
#define TRANS_CHICKEN1(pipe) _PIPE(pipe, _TRANSA_CHICKEN1, _TRANSB_CHICKEN1)
3797
 
3837
#define  TRANS_CHICKEN1_DP0UNIT_GC_DISABLE	(1<<4)
3798
#define _TRANSA_CHICKEN2	 0xf0064
3838
#define _TRANSA_CHICKEN2	 0xf0064
3799
#define _TRANSB_CHICKEN2	 0xf1064
3839
#define _TRANSB_CHICKEN2	 0xf1064
3800
#define TRANS_CHICKEN2(pipe) _PIPE(pipe, _TRANSA_CHICKEN2, _TRANSB_CHICKEN2)
3840
#define TRANS_CHICKEN2(pipe) _PIPE(pipe, _TRANSA_CHICKEN2, _TRANSB_CHICKEN2)
-
 
3841
#define  TRANS_CHICKEN2_TIMING_OVERRIDE		(1<<31)
Line 3801... Line 3842...
3801
#define   TRANS_AUTOTRAIN_GEN_STALL_DIS	(1<<31)
3842
 
3802
 
3843
 
3803
#define SOUTH_CHICKEN1		0xc2000
3844
#define SOUTH_CHICKEN1		0xc2000
3804
#define  FDIA_PHASE_SYNC_SHIFT_OVR	19
3845
#define  FDIA_PHASE_SYNC_SHIFT_OVR	19
3805
#define  FDIA_PHASE_SYNC_SHIFT_EN	18
3846
#define  FDIA_PHASE_SYNC_SHIFT_EN	18
-
 
3847
#define FDI_PHASE_SYNC_OVR(pipe) (1<<(FDIA_PHASE_SYNC_SHIFT_OVR - ((pipe) * 2)))
3806
#define FDI_PHASE_SYNC_OVR(pipe) (1<<(FDIA_PHASE_SYNC_SHIFT_OVR - ((pipe) * 2)))
3848
#define FDI_PHASE_SYNC_EN(pipe) (1<<(FDIA_PHASE_SYNC_SHIFT_EN - ((pipe) * 2)))
-
 
3849
#define  FDI_BC_BIFURCATION_SELECT	(1 << 12)
-
 
3850
#define SOUTH_CHICKEN2		0xc2004
3807
#define FDI_PHASE_SYNC_EN(pipe) (1<<(FDIA_PHASE_SYNC_SHIFT_EN - ((pipe) * 2)))
3851
#define  FDI_MPHY_IOSFSB_RESET_STATUS	(1<<13)
Line 3808... Line 3852...
3808
#define SOUTH_CHICKEN2		0xc2004
3852
#define  FDI_MPHY_IOSFSB_RESET_CTL	(1<<12)
3809
#define  DPLS_EDP_PPS_FIX_DIS	(1<<0)
3853
#define  DPLS_EDP_PPS_FIX_DIS	(1<<0)
3810
 
3854
 
3811
#define _FDI_RXA_CHICKEN         0xc200c
3855
#define _FDI_RXA_CHICKEN         0xc200c
3812
#define _FDI_RXB_CHICKEN         0xc2010
3856
#define _FDI_RXB_CHICKEN         0xc2010
Line 3813... Line 3857...
3813
#define  FDI_RX_PHASE_SYNC_POINTER_OVR	(1<<1)
3857
#define  FDI_RX_PHASE_SYNC_POINTER_OVR	(1<<1)
3814
#define  FDI_RX_PHASE_SYNC_POINTER_EN	(1<<0)
3858
#define  FDI_RX_PHASE_SYNC_POINTER_EN	(1<<0)
-
 
3859
#define FDI_RX_CHICKEN(pipe) _PIPE(pipe, _FDI_RXA_CHICKEN, _FDI_RXB_CHICKEN)
Line 3815... Line 3860...
3815
#define FDI_RX_CHICKEN(pipe) _PIPE(pipe, _FDI_RXA_CHICKEN, _FDI_RXB_CHICKEN)
3860
 
3816
 
3861
#define SOUTH_DSPCLK_GATE_D	0xc2020
3817
#define SOUTH_DSPCLK_GATE_D	0xc2020
3862
#define  PCH_DPLSUNIT_CLOCK_GATE_DISABLE (1<<29)
3818
#define  PCH_DPLSUNIT_CLOCK_GATE_DISABLE (1<<29)
3863
#define  PCH_LP_PARTITION_LEVEL_DISABLE  (1<<12)
Line 3875... Line 3920...
3875
#define  FDI_RX_ENABLE          (1<<31)
3920
#define  FDI_RX_ENABLE          (1<<31)
3876
/* train, dp width same as FDI_TX */
3921
/* train, dp width same as FDI_TX */
3877
#define  FDI_FS_ERRC_ENABLE		(1<<27)
3922
#define  FDI_FS_ERRC_ENABLE		(1<<27)
3878
#define  FDI_FE_ERRC_ENABLE		(1<<26)
3923
#define  FDI_FE_ERRC_ENABLE		(1<<26)
3879
#define  FDI_DP_PORT_WIDTH_X8           (7<<19)
3924
#define  FDI_DP_PORT_WIDTH_X8           (7<<19)
-
 
3925
#define  FDI_RX_POLARITY_REVERSED_LPT	(1<<16)
3880
#define  FDI_8BPC                       (0<<16)
3926
#define  FDI_8BPC                       (0<<16)
3881
#define  FDI_10BPC                      (1<<16)
3927
#define  FDI_10BPC                      (1<<16)
3882
#define  FDI_6BPC                       (2<<16)
3928
#define  FDI_6BPC                       (2<<16)
3883
#define  FDI_12BPC                      (3<<16)
3929
#define  FDI_12BPC                      (3<<16)
3884
#define  FDI_LINK_REVERSE_OVERWRITE     (1<<15)
3930
#define  FDI_LINK_REVERSE_OVERWRITE     (1<<15)
Line 3901... Line 3947...
3901
#define  FDI_PORT_WIDTH_2X_LPT			(1<<19)
3947
#define  FDI_PORT_WIDTH_2X_LPT			(1<<19)
3902
#define  FDI_PORT_WIDTH_1X_LPT			(0<<19)
3948
#define  FDI_PORT_WIDTH_1X_LPT			(0<<19)
Line 3903... Line 3949...
3903
 
3949
 
3904
#define _FDI_RXA_MISC            0xf0010
3950
#define _FDI_RXA_MISC            0xf0010
3905
#define _FDI_RXB_MISC            0xf1010
3951
#define _FDI_RXB_MISC            0xf1010
3906
#define _FDI_RXA_TUSIZE1         0xf0030
3952
#define  FDI_RX_PWRDN_LANE1_MASK	(3<<26)
3907
#define _FDI_RXA_TUSIZE2         0xf0038
3953
#define  FDI_RX_PWRDN_LANE1_VAL(x)	((x)<<26)
3908
#define _FDI_RXB_TUSIZE1         0xf1030
3954
#define  FDI_RX_PWRDN_LANE0_MASK	(3<<24)
3909
#define _FDI_RXB_TUSIZE2         0xf1038
3955
#define  FDI_RX_PWRDN_LANE0_VAL(x)	((x)<<24)
3910
#define  FDI_RX_TP1_TO_TP2_48	(2<<20)
3956
#define  FDI_RX_TP1_TO_TP2_48		(2<<20)
3911
#define  FDI_RX_TP1_TO_TP2_64	(3<<20)
3957
#define  FDI_RX_TP1_TO_TP2_64		(3<<20)
3912
#define  FDI_RX_FDI_DELAY_90	(0x90<<0)
3958
#define  FDI_RX_FDI_DELAY_90		(0x90<<0)
-
 
3959
#define FDI_RX_MISC(pipe) _PIPE(pipe, _FDI_RXA_MISC, _FDI_RXB_MISC)
-
 
3960
 
-
 
3961
#define _FDI_RXA_TUSIZE1         0xf0030
-
 
3962
#define _FDI_RXA_TUSIZE2         0xf0038
-
 
3963
#define _FDI_RXB_TUSIZE1         0xf1030
3913
#define FDI_RX_MISC(pipe) _PIPE(pipe, _FDI_RXA_MISC, _FDI_RXB_MISC)
3964
#define _FDI_RXB_TUSIZE2         0xf1038
3914
#define FDI_RX_TUSIZE1(pipe) _PIPE(pipe, _FDI_RXA_TUSIZE1, _FDI_RXB_TUSIZE1)
3965
#define FDI_RX_TUSIZE1(pipe) _PIPE(pipe, _FDI_RXA_TUSIZE1, _FDI_RXB_TUSIZE1)
Line 3915... Line 3966...
3915
#define FDI_RX_TUSIZE2(pipe) _PIPE(pipe, _FDI_RXA_TUSIZE2, _FDI_RXB_TUSIZE2)
3966
#define FDI_RX_TUSIZE2(pipe) _PIPE(pipe, _FDI_RXA_TUSIZE2, _FDI_RXB_TUSIZE2)
3916
 
3967
 
Line 4001... Line 4052...
4001
#define  PANEL_POWER_UP_DELAY_SHIFT	16
4052
#define  PANEL_POWER_UP_DELAY_SHIFT	16
4002
#define  PANEL_LIGHT_ON_DELAY_MASK	(0x1fff)
4053
#define  PANEL_LIGHT_ON_DELAY_MASK	(0x1fff)
4003
#define  PANEL_LIGHT_ON_DELAY_SHIFT	0
4054
#define  PANEL_LIGHT_ON_DELAY_SHIFT	0
Line 4004... Line 4055...
4004
 
4055
 
-
 
4056
#define PCH_PP_OFF_DELAYS	0xc720c
-
 
4057
#define  PANEL_POWER_PORT_SELECT_MASK	(0x3 << 30)
-
 
4058
#define  PANEL_POWER_PORT_LVDS		(0 << 30)
-
 
4059
#define  PANEL_POWER_PORT_DP_A		(1 << 30)
-
 
4060
#define  PANEL_POWER_PORT_DP_C		(2 << 30)
4005
#define PCH_PP_OFF_DELAYS	0xc720c
4061
#define  PANEL_POWER_PORT_DP_D		(3 << 30)
4006
#define  PANEL_POWER_DOWN_DELAY_MASK	(0x1fff0000)
4062
#define  PANEL_POWER_DOWN_DELAY_MASK	(0x1fff0000)
4007
#define  PANEL_POWER_DOWN_DELAY_SHIFT	16
4063
#define  PANEL_POWER_DOWN_DELAY_SHIFT	16
4008
#define  PANEL_LIGHT_OFF_DELAY_MASK	(0x1fff)
4064
#define  PANEL_LIGHT_OFF_DELAY_MASK	(0x1fff)
Line 4048... Line 4104...
4048
#define  PORT_TO_PIPE_CPT(val)	(((val) & PORT_TRANS_SEL_MASK) >> 29)
4104
#define  PORT_TO_PIPE_CPT(val)	(((val) & PORT_TRANS_SEL_MASK) >> 29)
Line 4049... Line 4105...
4049
 
4105
 
4050
#define TRANS_DP_CTL_A		0xe0300
4106
#define TRANS_DP_CTL_A		0xe0300
4051
#define TRANS_DP_CTL_B		0xe1300
4107
#define TRANS_DP_CTL_B		0xe1300
4052
#define TRANS_DP_CTL_C		0xe2300
4108
#define TRANS_DP_CTL_C		0xe2300
4053
#define TRANS_DP_CTL(pipe)	(TRANS_DP_CTL_A + (pipe) * 0x01000)
4109
#define TRANS_DP_CTL(pipe)	_PIPE(pipe, TRANS_DP_CTL_A, TRANS_DP_CTL_B)
4054
#define  TRANS_DP_OUTPUT_ENABLE	(1<<31)
4110
#define  TRANS_DP_OUTPUT_ENABLE	(1<<31)
4055
#define  TRANS_DP_PORT_SEL_B	(0<<29)
4111
#define  TRANS_DP_PORT_SEL_B	(0<<29)
4056
#define  TRANS_DP_PORT_SEL_C	(1<<29)
4112
#define  TRANS_DP_PORT_SEL_C	(1<<29)
4057
#define  TRANS_DP_PORT_SEL_D	(2<<29)
4113
#define  TRANS_DP_PORT_SEL_D	(2<<29)
Line 4106... Line 4162...
4106
#define  FORCEWAKE_VLV				0x1300b0
4162
#define  FORCEWAKE_VLV				0x1300b0
4107
#define  FORCEWAKE_ACK_VLV			0x1300b4
4163
#define  FORCEWAKE_ACK_VLV			0x1300b4
4108
#define  FORCEWAKE_ACK_HSW			0x130044
4164
#define  FORCEWAKE_ACK_HSW			0x130044
4109
#define  FORCEWAKE_ACK				0x130090
4165
#define  FORCEWAKE_ACK				0x130090
4110
#define  FORCEWAKE_MT				0xa188 /* multi-threaded */
4166
#define  FORCEWAKE_MT				0xa188 /* multi-threaded */
-
 
4167
#define   FORCEWAKE_KERNEL			0x1
-
 
4168
#define   FORCEWAKE_USER			0x2
4111
#define  FORCEWAKE_MT_ACK			0x130040
4169
#define  FORCEWAKE_MT_ACK			0x130040
4112
#define  ECOBUS					0xa180
4170
#define  ECOBUS					0xa180
4113
#define    FORCEWAKE_MT_ENABLE			(1<<5)
4171
#define    FORCEWAKE_MT_ENABLE			(1<<5)
Line 4114... Line 4172...
4114
 
4172
 
Line 4218... Line 4276...
4218
#define GEN6_PCODE_MAILBOX			0x138124
4276
#define GEN6_PCODE_MAILBOX			0x138124
4219
#define   GEN6_PCODE_READY			(1<<31)
4277
#define   GEN6_PCODE_READY			(1<<31)
4220
#define   GEN6_READ_OC_PARAMS			0xc
4278
#define   GEN6_READ_OC_PARAMS			0xc
4221
#define   GEN6_PCODE_WRITE_MIN_FREQ_TABLE	0x8
4279
#define   GEN6_PCODE_WRITE_MIN_FREQ_TABLE	0x8
4222
#define   GEN6_PCODE_READ_MIN_FREQ_TABLE	0x9
4280
#define   GEN6_PCODE_READ_MIN_FREQ_TABLE	0x9
-
 
4281
#define	  GEN6_PCODE_WRITE_RC6VIDS		0x4
-
 
4282
#define	  GEN6_PCODE_READ_RC6VIDS		0x5
-
 
4283
#define   GEN6_ENCODE_RC6_VID(mv)		(((mv) / 5) - 245) < 0 ?: 0
-
 
4284
#define   GEN6_DECODE_RC6_VID(vids)		(((vids) * 5) > 0 ? ((vids) * 5) + 245 : 0)
4223
#define GEN6_PCODE_DATA				0x138128
4285
#define GEN6_PCODE_DATA				0x138128
4224
#define   GEN6_PCODE_FREQ_IA_RATIO_SHIFT	8
4286
#define   GEN6_PCODE_FREQ_IA_RATIO_SHIFT	8
Line 4225... Line 4287...
4225
 
4287
 
4226
#define GEN6_GT_CORE_STATUS		0x138060
4288
#define GEN6_GT_CORE_STATUS		0x138060
Line 4249... Line 4311...
4249
#define   GEN7_L3CDERRST1_ENABLE	(1<<7)
4311
#define   GEN7_L3CDERRST1_ENABLE	(1<<7)
Line 4250... Line 4312...
4250
 
4312
 
4251
#define GEN7_L3LOG_BASE			0xB070
4313
#define GEN7_L3LOG_BASE			0xB070
Line -... Line 4314...
-
 
4314
#define GEN7_L3LOG_SIZE			0x80
-
 
4315
 
-
 
4316
#define GEN7_HALF_SLICE_CHICKEN1	0xe100 /* IVB GT1 + VLV */
-
 
4317
#define GEN7_HALF_SLICE_CHICKEN1_GT2	0xf100
-
 
4318
#define   GEN7_MAX_PS_THREAD_DEP		(8<<12)
-
 
4319
#define   GEN7_PSD_SINGLE_PORT_DISPATCH_ENABLE	(1<<3)
-
 
4320
 
-
 
4321
#define GEN7_ROW_CHICKEN2		0xe4f4
-
 
4322
#define GEN7_ROW_CHICKEN2_GT2		0xf4f4
4252
#define GEN7_L3LOG_SIZE			0x80
4323
#define   DOP_CLOCK_GATING_DISABLE	(1<<0)
4253
 
4324
 
4254
#define G4X_AUD_VID_DID			0x62020
4325
#define G4X_AUD_VID_DID			0x62020
4255
#define INTEL_AUDIO_DEVCL		0x808629FB
4326
#define INTEL_AUDIO_DEVCL		0x808629FB
Line 4378... Line 4449...
4378
#define   HSW_PWR_WELL_PWR_GATE_OVERRIDE	(1<<20)
4449
#define   HSW_PWR_WELL_PWR_GATE_OVERRIDE	(1<<20)
4379
#define   HSW_PWR_WELL_FORCE_ON				(1<<19)
4450
#define   HSW_PWR_WELL_FORCE_ON				(1<<19)
4380
#define HSW_PWR_WELL_CTL6		0x45414
4451
#define HSW_PWR_WELL_CTL6		0x45414
Line 4381... Line 4452...
4381
 
4452
 
4382
/* Per-pipe DDI Function Control */
4453
/* Per-pipe DDI Function Control */
4383
#define PIPE_DDI_FUNC_CTL_A			0x60400
4454
#define TRANS_DDI_FUNC_CTL_A		0x60400
4384
#define PIPE_DDI_FUNC_CTL_B			0x61400
4455
#define TRANS_DDI_FUNC_CTL_B		0x61400
4385
#define PIPE_DDI_FUNC_CTL_C			0x62400
4456
#define TRANS_DDI_FUNC_CTL_C		0x62400
4386
#define PIPE_DDI_FUNC_CTL_EDP		0x6F400
4457
#define TRANS_DDI_FUNC_CTL_EDP		0x6F400
4387
#define DDI_FUNC_CTL(pipe) _PIPE(pipe, PIPE_DDI_FUNC_CTL_A, \
4458
#define TRANS_DDI_FUNC_CTL(tran) _TRANSCODER(tran, TRANS_DDI_FUNC_CTL_A, \
4388
					PIPE_DDI_FUNC_CTL_B)
4459
						   TRANS_DDI_FUNC_CTL_B)
4389
#define  PIPE_DDI_FUNC_ENABLE		(1<<31)
4460
#define  TRANS_DDI_FUNC_ENABLE		(1<<31)
4390
/* Those bits are ignored by pipe EDP since it can only connect to DDI A */
4461
/* Those bits are ignored by pipe EDP since it can only connect to DDI A */
4391
#define  PIPE_DDI_PORT_MASK			(7<<28)
4462
#define  TRANS_DDI_PORT_MASK		(7<<28)
-
 
4463
#define  TRANS_DDI_SELECT_PORT(x)	((x)<<28)
4392
#define  PIPE_DDI_SELECT_PORT(x)		((x)<<28)
4464
#define  TRANS_DDI_PORT_NONE		(0<<28)
4393
#define  PIPE_DDI_MODE_SELECT_MASK	(7<<24)
4465
#define  TRANS_DDI_MODE_SELECT_MASK	(7<<24)
4394
#define  PIPE_DDI_MODE_SELECT_HDMI		(0<<24)
4466
#define  TRANS_DDI_MODE_SELECT_HDMI	(0<<24)
4395
#define  PIPE_DDI_MODE_SELECT_DVI		(1<<24)
4467
#define  TRANS_DDI_MODE_SELECT_DVI	(1<<24)
4396
#define  PIPE_DDI_MODE_SELECT_DP_SST	(2<<24)
4468
#define  TRANS_DDI_MODE_SELECT_DP_SST	(2<<24)
4397
#define  PIPE_DDI_MODE_SELECT_DP_MST	(3<<24)
4469
#define  TRANS_DDI_MODE_SELECT_DP_MST	(3<<24)
4398
#define  PIPE_DDI_MODE_SELECT_FDI		(4<<24)
4470
#define  TRANS_DDI_MODE_SELECT_FDI	(4<<24)
4399
#define  PIPE_DDI_BPC_MASK		(7<<20)
4471
#define  TRANS_DDI_BPC_MASK		(7<<20)
4400
#define  PIPE_DDI_BPC_8					(0<<20)
4472
#define  TRANS_DDI_BPC_8		(0<<20)
4401
#define  PIPE_DDI_BPC_10				(1<<20)
4473
#define  TRANS_DDI_BPC_10		(1<<20)
4402
#define  PIPE_DDI_BPC_6					(2<<20)
4474
#define  TRANS_DDI_BPC_6		(2<<20)
4403
#define  PIPE_DDI_BPC_12				(3<<20)
4475
#define  TRANS_DDI_BPC_12		(3<<20)
4404
#define  PIPE_DDI_PVSYNC		(1<<17)
4476
#define  TRANS_DDI_PVSYNC		(1<<17)
-
 
4477
#define  TRANS_DDI_PHSYNC		(1<<16)
-
 
4478
#define  TRANS_DDI_EDP_INPUT_MASK	(7<<12)
-
 
4479
#define  TRANS_DDI_EDP_INPUT_A_ON	(0<<12)
-
 
4480
#define  TRANS_DDI_EDP_INPUT_A_ONOFF	(4<<12)
-
 
4481
#define  TRANS_DDI_EDP_INPUT_B_ONOFF	(5<<12)
4405
#define  PIPE_DDI_PHSYNC		(1<<16)
4482
#define  TRANS_DDI_EDP_INPUT_C_ONOFF	(6<<12)
4406
#define  PIPE_DDI_BFI_ENABLE			(1<<4)
4483
#define  TRANS_DDI_BFI_ENABLE		(1<<4)
4407
#define  PIPE_DDI_PORT_WIDTH_X1			(0<<1)
4484
#define  TRANS_DDI_PORT_WIDTH_X1	(0<<1)
4408
#define  PIPE_DDI_PORT_WIDTH_X2			(1<<1)
4485
#define  TRANS_DDI_PORT_WIDTH_X2	(1<<1)
Line 4409... Line 4486...
4409
#define  PIPE_DDI_PORT_WIDTH_X4			(3<<1)
4486
#define  TRANS_DDI_PORT_WIDTH_X4	(3<<1)
4410
 
4487
 
4411
/* DisplayPort Transport Control */
4488
/* DisplayPort Transport Control */
4412
#define DP_TP_CTL_A			0x64040
4489
#define DP_TP_CTL_A			0x64040
Line 4418... Line 4495...
4418
#define  DP_TP_CTL_ENHANCED_FRAME_ENABLE	(1<<18)
4495
#define  DP_TP_CTL_ENHANCED_FRAME_ENABLE	(1<<18)
4419
#define  DP_TP_CTL_FDI_AUTOTRAIN	(1<<15)
4496
#define  DP_TP_CTL_FDI_AUTOTRAIN	(1<<15)
4420
#define  DP_TP_CTL_LINK_TRAIN_MASK		(7<<8)
4497
#define  DP_TP_CTL_LINK_TRAIN_MASK		(7<<8)
4421
#define  DP_TP_CTL_LINK_TRAIN_PAT1		(0<<8)
4498
#define  DP_TP_CTL_LINK_TRAIN_PAT1		(0<<8)
4422
#define  DP_TP_CTL_LINK_TRAIN_PAT2		(1<<8)
4499
#define  DP_TP_CTL_LINK_TRAIN_PAT2		(1<<8)
-
 
4500
#define  DP_TP_CTL_LINK_TRAIN_PAT3		(4<<8)
-
 
4501
#define  DP_TP_CTL_LINK_TRAIN_IDLE		(2<<8)
4423
#define  DP_TP_CTL_LINK_TRAIN_NORMAL	(3<<8)
4502
#define  DP_TP_CTL_LINK_TRAIN_NORMAL	(3<<8)
-
 
4503
#define  DP_TP_CTL_SCRAMBLE_DISABLE		(1<<7)
Line 4424... Line 4504...
4424
 
4504
 
4425
/* DisplayPort Transport Status */
4505
/* DisplayPort Transport Status */
4426
#define DP_TP_STATUS_A			0x64044
4506
#define DP_TP_STATUS_A			0x64044
4427
#define DP_TP_STATUS_B			0x64144
4507
#define DP_TP_STATUS_B			0x64144
-
 
4508
#define DP_TP_STATUS(port) _PORT(port, DP_TP_STATUS_A, DP_TP_STATUS_B)
4428
#define DP_TP_STATUS(port) _PORT(port, DP_TP_STATUS_A, DP_TP_STATUS_B)
4509
#define  DP_TP_STATUS_IDLE_DONE		(1<<25)
Line 4429... Line 4510...
4429
#define  DP_TP_STATUS_AUTOTRAIN_DONE	(1<<12)
4510
#define  DP_TP_STATUS_AUTOTRAIN_DONE	(1<<12)
4430
 
4511
 
4431
/* DDI Buffer Control */
4512
/* DDI Buffer Control */
Line 4442... Line 4523...
4442
#define  DDI_BUF_EMP_600MV_6DB_HSW		(6<<24)   /* Sel6 */
4523
#define  DDI_BUF_EMP_600MV_6DB_HSW		(6<<24)   /* Sel6 */
4443
#define  DDI_BUF_EMP_800MV_0DB_HSW		(7<<24)   /* Sel7 */
4524
#define  DDI_BUF_EMP_800MV_0DB_HSW		(7<<24)   /* Sel7 */
4444
#define  DDI_BUF_EMP_800MV_3_5DB_HSW	(8<<24)   /* Sel8 */
4525
#define  DDI_BUF_EMP_800MV_3_5DB_HSW	(8<<24)   /* Sel8 */
4445
#define  DDI_BUF_EMP_MASK				(0xf<<24)
4526
#define  DDI_BUF_EMP_MASK				(0xf<<24)
4446
#define  DDI_BUF_IS_IDLE				(1<<7)
4527
#define  DDI_BUF_IS_IDLE				(1<<7)
-
 
4528
#define  DDI_A_4_LANES				(1<<4)
4447
#define  DDI_PORT_WIDTH_X1				(0<<1)
4529
#define  DDI_PORT_WIDTH_X1				(0<<1)
4448
#define  DDI_PORT_WIDTH_X2				(1<<1)
4530
#define  DDI_PORT_WIDTH_X2				(1<<1)
4449
#define  DDI_PORT_WIDTH_X4				(3<<1)
4531
#define  DDI_PORT_WIDTH_X4				(3<<1)
4450
#define  DDI_INIT_DISPLAY_DETECTED		(1<<0)
4532
#define  DDI_INIT_DISPLAY_DETECTED		(1<<0)
Line 4458... Line 4540...
4458
 * SBI_ADDR, which contains the register offset; and SBI_DATA,
4540
 * SBI_ADDR, which contains the register offset; and SBI_DATA,
4459
 * which contains the payload */
4541
 * which contains the payload */
4460
#define SBI_ADDR				0xC6000
4542
#define SBI_ADDR				0xC6000
4461
#define SBI_DATA				0xC6004
4543
#define SBI_DATA				0xC6004
4462
#define SBI_CTL_STAT			0xC6008
4544
#define SBI_CTL_STAT			0xC6008
-
 
4545
#define  SBI_CTL_DEST_ICLK		(0x0<<16)
-
 
4546
#define  SBI_CTL_DEST_MPHY		(0x1<<16)
-
 
4547
#define  SBI_CTL_OP_IORD		(0x2<<8)
-
 
4548
#define  SBI_CTL_OP_IOWR		(0x3<<8)
4463
#define  SBI_CTL_OP_CRRD		(0x6<<8)
4549
#define  SBI_CTL_OP_CRRD		(0x6<<8)
4464
#define  SBI_CTL_OP_CRWR		(0x7<<8)
4550
#define  SBI_CTL_OP_CRWR		(0x7<<8)
4465
#define  SBI_RESPONSE_FAIL		(0x1<<1)
4551
#define  SBI_RESPONSE_FAIL		(0x1<<1)
4466
#define  SBI_RESPONSE_SUCCESS	(0x0<<1)
4552
#define  SBI_RESPONSE_SUCCESS	(0x0<<1)
4467
#define  SBI_BUSY				(0x1<<0)
4553
#define  SBI_BUSY				(0x1<<0)
Line 4475... Line 4561...
4475
#define   SBI_SSCDIVINTPHASE_INCVAL(x)		((x)<<8)
4561
#define   SBI_SSCDIVINTPHASE_INCVAL(x)		((x)<<8)
4476
#define   SBI_SSCDIVINTPHASE_DIR(x)			((x)<<15)
4562
#define   SBI_SSCDIVINTPHASE_DIR(x)			((x)<<15)
4477
#define   SBI_SSCDIVINTPHASE_PROPAGATE		(1<<0)
4563
#define   SBI_SSCDIVINTPHASE_PROPAGATE		(1<<0)
4478
#define  SBI_SSCCTL					0x020c
4564
#define  SBI_SSCCTL					0x020c
4479
#define  SBI_SSCCTL6				0x060C
4565
#define  SBI_SSCCTL6				0x060C
-
 
4566
#define   SBI_SSCCTL_PATHALT			(1<<3)
4480
#define   SBI_SSCCTL_DISABLE		(1<<0)
4567
#define   SBI_SSCCTL_DISABLE		(1<<0)
4481
#define  SBI_SSCAUXDIV6				0x0610
4568
#define  SBI_SSCAUXDIV6				0x0610
4482
#define   SBI_SSCAUXDIV_FINALDIV2SEL(x)		((x)<<4)
4569
#define   SBI_SSCAUXDIV_FINALDIV2SEL(x)		((x)<<4)
4483
#define  SBI_DBUFF0					0x2a00
4570
#define  SBI_DBUFF0					0x2a00
-
 
4571
#define   SBI_DBUFF0_ENABLE			(1<<0)
Line 4484... Line 4572...
4484
 
4572
 
4485
/* LPT PIXCLK_GATE */
4573
/* LPT PIXCLK_GATE */
4486
#define PIXCLK_GATE				0xC6020
4574
#define PIXCLK_GATE				0xC6020
4487
#define  PIXCLK_GATE_UNGATE		(1<<0)
4575
#define  PIXCLK_GATE_UNGATE		(1<<0)
Line 4488... Line 4576...
4488
#define  PIXCLK_GATE_GATE		(0<<0)
4576
#define  PIXCLK_GATE_GATE		(0<<0)
4489
 
4577
 
4490
/* SPLL */
4578
/* SPLL */
4491
#define SPLL_CTL				0x46020
4579
#define SPLL_CTL				0x46020
4492
#define  SPLL_PLL_ENABLE		(1<<31)
4580
#define  SPLL_PLL_ENABLE		(1<<31)
4493
#define  SPLL_PLL_SCC			(1<<28)
4581
#define  SPLL_PLL_SSC			(1<<28)
4494
#define  SPLL_PLL_NON_SCC		(2<<28)
4582
#define  SPLL_PLL_NON_SSC		(2<<28)
Line 4495... Line 4583...
4495
#define  SPLL_PLL_FREQ_810MHz	(0<<26)
4583
#define  SPLL_PLL_FREQ_810MHz	(0<<26)
4496
#define  SPLL_PLL_FREQ_1350MHz	(1<<26)
4584
#define  SPLL_PLL_FREQ_1350MHz	(1<<26)
4497
 
4585
 
4498
/* WRPLL */
4586
/* WRPLL */
4499
#define WRPLL_CTL1				0x46040
4587
#define WRPLL_CTL1				0x46040
4500
#define WRPLL_CTL2				0x46060
4588
#define WRPLL_CTL2				0x46060
4501
#define  WRPLL_PLL_ENABLE				(1<<31)
4589
#define  WRPLL_PLL_ENABLE				(1<<31)
4502
#define  WRPLL_PLL_SELECT_SSC			(0x01<<28)
4590
#define  WRPLL_PLL_SELECT_SSC			(0x01<<28)
4503
#define  WRPLL_PLL_SELECT_NON_SCC		(0x02<<28)
4591
#define  WRPLL_PLL_SELECT_NON_SSC	(0x02<<28)
4504
#define  WRPLL_PLL_SELECT_LCPLL_2700	(0x03<<28)
4592
#define  WRPLL_PLL_SELECT_LCPLL_2700	(0x03<<28)
4505
/* WRPLL divider programming */
4593
/* WRPLL divider programming */
Line 4515... Line 4603...
4515
#define  PORT_CLK_SEL_LCPLL_1350	(1<<29)
4603
#define  PORT_CLK_SEL_LCPLL_1350	(1<<29)
4516
#define  PORT_CLK_SEL_LCPLL_810		(2<<29)
4604
#define  PORT_CLK_SEL_LCPLL_810		(2<<29)
4517
#define  PORT_CLK_SEL_SPLL			(3<<29)
4605
#define  PORT_CLK_SEL_SPLL			(3<<29)
4518
#define  PORT_CLK_SEL_WRPLL1		(4<<29)
4606
#define  PORT_CLK_SEL_WRPLL1		(4<<29)
4519
#define  PORT_CLK_SEL_WRPLL2		(5<<29)
4607
#define  PORT_CLK_SEL_WRPLL2		(5<<29)
-
 
4608
#define  PORT_CLK_SEL_NONE		(7<<29)
Line 4520... Line 4609...
4520
 
4609
 
4521
/* Pipe clock selection */
4610
/* Transcoder clock selection */
4522
#define PIPE_CLK_SEL_A			0x46140
4611
#define TRANS_CLK_SEL_A			0x46140
4523
#define PIPE_CLK_SEL_B			0x46144
4612
#define TRANS_CLK_SEL_B			0x46144
4524
#define PIPE_CLK_SEL(pipe) _PIPE(pipe, PIPE_CLK_SEL_A, PIPE_CLK_SEL_B)
4613
#define TRANS_CLK_SEL(tran) _TRANSCODER(tran, TRANS_CLK_SEL_A, TRANS_CLK_SEL_B)
4525
/* For each pipe, we need to select the corresponding port clock */
4614
/* For each transcoder, we need to select the corresponding port clock */
4526
#define  PIPE_CLK_SEL_DISABLED	(0x0<<29)
4615
#define  TRANS_CLK_SEL_DISABLED		(0x0<<29)
-
 
4616
#define  TRANS_CLK_SEL_PORT(x)		((x+1)<<29)
-
 
4617
 
-
 
4618
#define _TRANSA_MSA_MISC		0x60410
-
 
4619
#define _TRANSB_MSA_MISC		0x61410
-
 
4620
#define TRANS_MSA_MISC(tran) _TRANSCODER(tran, _TRANSA_MSA_MISC, \
-
 
4621
					       _TRANSB_MSA_MISC)
-
 
4622
#define  TRANS_MSA_SYNC_CLK		(1<<0)
-
 
4623
#define  TRANS_MSA_6_BPC		(0<<5)
-
 
4624
#define  TRANS_MSA_8_BPC		(1<<5)
-
 
4625
#define  TRANS_MSA_10_BPC		(2<<5)
-
 
4626
#define  TRANS_MSA_12_BPC		(3<<5)
Line 4527... Line 4627...
4527
#define  PIPE_CLK_SEL_PORT(x)	((x+1)<<29)
4627
#define  TRANS_MSA_16_BPC		(4<<5)
4528
 
4628
 
4529
/* LCPLL Control */
4629
/* LCPLL Control */
4530
#define LCPLL_CTL				0x130040
4630
#define LCPLL_CTL				0x130040
-
 
4631
#define  LCPLL_PLL_DISABLE		(1<<31)
-
 
4632
#define  LCPLL_PLL_LOCK			(1<<30)
4531
#define  LCPLL_PLL_DISABLE		(1<<31)
4633
#define  LCPLL_CLK_FREQ_MASK		(3<<26)
4532
#define  LCPLL_PLL_LOCK			(1<<30)
4634
#define  LCPLL_CLK_FREQ_450		(0<<26)
-
 
4635
#define  LCPLL_CD_CLOCK_DISABLE	(1<<25)
Line 4533... Line 4636...
4533
#define  LCPLL_CD_CLOCK_DISABLE	(1<<25)
4636
#define  LCPLL_CD2X_CLOCK_DISABLE	(1<<23)
4534
#define  LCPLL_CD2X_CLOCK_DISABLE	(1<<23)
4637
#define  LCPLL_CD_SOURCE_FCLK		(1<<21)
4535
 
4638
 
4536
/* Pipe WM_LINETIME - watermark line time */
4639
/* Pipe WM_LINETIME - watermark line time */