Subversion Repositories Kolibri OS

Rev

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

Rev 3243 Rev 3480
Line 139... Line 139...
139
#define VGA_MSR_WRITE 0x3c2
139
#define VGA_MSR_WRITE 0x3c2
140
#define VGA_MSR_READ 0x3cc
140
#define VGA_MSR_READ 0x3cc
141
#define   VGA_MSR_MEM_EN (1<<1)
141
#define   VGA_MSR_MEM_EN (1<<1)
142
#define   VGA_MSR_CGA_MODE (1<<0)
142
#define   VGA_MSR_CGA_MODE (1<<0)
Line -... Line 143...
-
 
143
 
-
 
144
/*
-
 
145
 * SR01 is the only VGA register touched on non-UMS setups.
-
 
146
 * VLV doesn't do UMS, so the sequencer index/data registers
-
 
147
 * are the only VGA registers which need to include
-
 
148
 * display_mmio_offset.
143
 
149
 */
144
#define VGA_SR_INDEX 0x3c4
150
#define VGA_SR_INDEX (dev_priv->info->display_mmio_offset + 0x3c4)
-
 
151
#define SR01			1
Line 145... Line 152...
145
#define VGA_SR_DATA 0x3c5
152
#define VGA_SR_DATA (dev_priv->info->display_mmio_offset + 0x3c5)
146
 
153
 
147
#define VGA_AR_INDEX 0x3c0
154
#define VGA_AR_INDEX 0x3c0
148
#define   VGA_AR_VID_EN (1<<5)
155
#define   VGA_AR_VID_EN (1<<5)
Line 299... Line 306...
299
#define CMD_OP_DISPLAYBUFFER_INFO ((0x0<<29)|(0x14<<23)|2)
306
#define CMD_OP_DISPLAYBUFFER_INFO ((0x0<<29)|(0x14<<23)|2)
300
#define   ASYNC_FLIP                (1<<22)
307
#define   ASYNC_FLIP                (1<<22)
301
#define   DISPLAY_PLANE_A           (0<<20)
308
#define   DISPLAY_PLANE_A           (0<<20)
302
#define   DISPLAY_PLANE_B           (1<<20)
309
#define   DISPLAY_PLANE_B           (1<<20)
303
#define GFX_OP_PIPE_CONTROL(len)	((0x3<<29)|(0x3<<27)|(0x2<<24)|(len-2))
310
#define GFX_OP_PIPE_CONTROL(len)	((0x3<<29)|(0x3<<27)|(0x2<<24)|(len-2))
-
 
311
#define   PIPE_CONTROL_GLOBAL_GTT_IVB			(1<<24) /* gen7+ */
304
#define   PIPE_CONTROL_CS_STALL				(1<<20)
312
#define   PIPE_CONTROL_CS_STALL				(1<<20)
305
#define   PIPE_CONTROL_TLB_INVALIDATE			(1<<18)
313
#define   PIPE_CONTROL_TLB_INVALIDATE			(1<<18)
306
#define   PIPE_CONTROL_QW_WRITE	(1<<14)
314
#define   PIPE_CONTROL_QW_WRITE	(1<<14)
307
#define   PIPE_CONTROL_DEPTH_STALL (1<<13)
315
#define   PIPE_CONTROL_DEPTH_STALL (1<<13)
308
#define   PIPE_CONTROL_WRITE_FLUSH			(1<<12)
316
#define   PIPE_CONTROL_WRITE_FLUSH			(1<<12)
Line 333... Line 341...
333
 *  0x8014: REF and SFR select
341
 *  0x8014: REF and SFR select
334
 *  0x8014: N divider, VCO select
342
 *  0x8014: N divider, VCO select
335
 *  0x801c/3c: core clock bits
343
 *  0x801c/3c: core clock bits
336
 *  0x8048/68: low pass filter coefficients
344
 *  0x8048/68: low pass filter coefficients
337
 *  0x8100: fast clock controls
345
 *  0x8100: fast clock controls
-
 
346
 *
-
 
347
 * DPIO is VLV only.
338
 */
348
 */
339
#define DPIO_PKT			0x2100
349
#define DPIO_PKT			(VLV_DISPLAY_BASE + 0x2100)
340
#define  DPIO_RID			(0<<24)
350
#define  DPIO_RID			(0<<24)
341
#define  DPIO_OP_WRITE			(1<<16)
351
#define  DPIO_OP_WRITE			(1<<16)
342
#define  DPIO_OP_READ			(0<<16)
352
#define  DPIO_OP_READ			(0<<16)
343
#define  DPIO_PORTID			(0x12<<8)
353
#define  DPIO_PORTID			(0x12<<8)
344
#define  DPIO_BYTE			(0xf<<4)
354
#define  DPIO_BYTE			(0xf<<4)
345
#define  DPIO_BUSY			(1<<0) /* status only */
355
#define  DPIO_BUSY			(1<<0) /* status only */
346
#define DPIO_DATA			0x2104
356
#define DPIO_DATA			(VLV_DISPLAY_BASE + 0x2104)
347
#define DPIO_REG			0x2108
357
#define DPIO_REG			(VLV_DISPLAY_BASE + 0x2108)
348
#define DPIO_CTL			0x2110
358
#define DPIO_CTL			(VLV_DISPLAY_BASE + 0x2110)
349
#define  DPIO_MODSEL1			(1<<3) /* if ref clk b == 27 */
359
#define  DPIO_MODSEL1			(1<<3) /* if ref clk b == 27 */
350
#define  DPIO_MODSEL0			(1<<2) /* if ref clk a == 27 */
360
#define  DPIO_MODSEL0			(1<<2) /* if ref clk a == 27 */
351
#define  DPIO_SFR_BYPASS		(1<<1)
361
#define  DPIO_SFR_BYPASS		(1<<1)
352
#define  DPIO_RESET			(1<<0)
362
#define  DPIO_RESET			(1<<0)
Line 554... Line 564...
554
#define SCPD0		0x0209c /* 915+ only */
564
#define SCPD0		0x0209c /* 915+ only */
555
#define IER		0x020a0
565
#define IER		0x020a0
556
#define IIR		0x020a4
566
#define IIR		0x020a4
557
#define IMR		0x020a8
567
#define IMR		0x020a8
558
#define ISR		0x020ac
568
#define ISR		0x020ac
559
#define VLV_GUNIT_CLOCK_GATE	0x182060
569
#define VLV_GUNIT_CLOCK_GATE	(VLV_DISPLAY_BASE + 0x2060)
560
#define   GCFG_DIS		(1<<8)
570
#define   GCFG_DIS		(1<<8)
561
#define VLV_IIR_RW	0x182084
571
#define VLV_IIR_RW	(VLV_DISPLAY_BASE + 0x2084)
562
#define VLV_IER		0x1820a0
572
#define VLV_IER		(VLV_DISPLAY_BASE + 0x20a0)
563
#define VLV_IIR		0x1820a4
573
#define VLV_IIR		(VLV_DISPLAY_BASE + 0x20a4)
564
#define VLV_IMR		0x1820a8
574
#define VLV_IMR		(VLV_DISPLAY_BASE + 0x20a8)
565
#define VLV_ISR		0x1820ac
575
#define VLV_ISR		(VLV_DISPLAY_BASE + 0x20ac)
566
#define   I915_PIPE_CONTROL_NOTIFY_INTERRUPT		(1<<18)
576
#define   I915_PIPE_CONTROL_NOTIFY_INTERRUPT		(1<<18)
567
#define   I915_DISPLAY_PORT_INTERRUPT			(1<<17)
577
#define   I915_DISPLAY_PORT_INTERRUPT			(1<<17)
568
#define   I915_RENDER_COMMAND_PARSER_ERROR_INTERRUPT	(1<<15)
578
#define   I915_RENDER_COMMAND_PARSER_ERROR_INTERRUPT	(1<<15)
569
#define   I915_GMCH_THERMAL_SENSOR_EVENT_INTERRUPT	(1<<14) /* p-state */
579
#define   I915_GMCH_THERMAL_SENSOR_EVENT_INTERRUPT	(1<<14) /* p-state */
570
#define   I915_HWB_OOM_INTERRUPT			(1<<13)
580
#define   I915_HWB_OOM_INTERRUPT			(1<<13)
Line 733... Line 743...
733
#define   GEN7_FF_SCHED_MASK		0x0077070
743
#define   GEN7_FF_SCHED_MASK		0x0077070
734
#define   GEN7_FF_TS_SCHED_HS1		(0x5<<16)
744
#define   GEN7_FF_TS_SCHED_HS1		(0x5<<16)
735
#define   GEN7_FF_TS_SCHED_HS0		(0x3<<16)
745
#define   GEN7_FF_TS_SCHED_HS0		(0x3<<16)
736
#define   GEN7_FF_TS_SCHED_LOAD_BALANCE	(0x1<<16)
746
#define   GEN7_FF_TS_SCHED_LOAD_BALANCE	(0x1<<16)
737
#define   GEN7_FF_TS_SCHED_HW		(0x0<<16) /* Default */
747
#define   GEN7_FF_TS_SCHED_HW		(0x0<<16) /* Default */
-
 
748
#define   GEN7_FF_VS_REF_CNT_FFME	(1 << 15)
738
#define   GEN7_FF_VS_SCHED_HS1		(0x5<<12)
749
#define   GEN7_FF_VS_SCHED_HS1		(0x5<<12)
739
#define   GEN7_FF_VS_SCHED_HS0		(0x3<<12)
750
#define   GEN7_FF_VS_SCHED_HS0		(0x3<<12)
740
#define   GEN7_FF_VS_SCHED_LOAD_BALANCE	(0x1<<12) /* Default */
751
#define   GEN7_FF_VS_SCHED_LOAD_BALANCE	(0x1<<12) /* Default */
741
#define   GEN7_FF_VS_SCHED_HW		(0x0<<12)
752
#define   GEN7_FF_VS_SCHED_HW		(0x0<<12)
742
#define   GEN7_FF_DS_SCHED_HS1		(0x5<<4)
753
#define   GEN7_FF_DS_SCHED_HS1		(0x5<<4)
Line 919... Line 930...
919
#define   VGA0_PD_P1_MASK	(0x1f << 0)
930
#define   VGA0_PD_P1_MASK	(0x1f << 0)
920
#define   VGA1_PD_P2_DIV_4	(1 << 15)
931
#define   VGA1_PD_P2_DIV_4	(1 << 15)
921
#define   VGA1_PD_P1_DIV_2	(1 << 13)
932
#define   VGA1_PD_P1_DIV_2	(1 << 13)
922
#define   VGA1_PD_P1_SHIFT	8
933
#define   VGA1_PD_P1_SHIFT	8
923
#define   VGA1_PD_P1_MASK	(0x1f << 8)
934
#define   VGA1_PD_P1_MASK	(0x1f << 8)
924
#define _DPLL_A	0x06014
935
#define _DPLL_A	(dev_priv->info->display_mmio_offset + 0x6014)
925
#define _DPLL_B	0x06018
936
#define _DPLL_B	(dev_priv->info->display_mmio_offset + 0x6018)
926
#define DPLL(pipe) _PIPE(pipe, _DPLL_A, _DPLL_B)
937
#define DPLL(pipe) _PIPE(pipe, _DPLL_A, _DPLL_B)
927
#define   DPLL_VCO_ENABLE		(1 << 31)
938
#define   DPLL_VCO_ENABLE		(1 << 31)
928
#define   DPLL_DVO_HIGH_SPEED		(1 << 30)
939
#define   DPLL_DVO_HIGH_SPEED		(1 << 30)
929
#define   DPLL_EXT_BUFFER_ENABLE_VLV	(1 << 30)
940
#define   DPLL_EXT_BUFFER_ENABLE_VLV	(1 << 30)
930
#define   DPLL_SYNCLOCK_ENABLE		(1 << 29)
941
#define   DPLL_SYNCLOCK_ENABLE		(1 << 29)
Line 941... Line 952...
941
#define   DPLL_FPA01_P1_POST_DIV_MASK	0x00ff0000 /* i915 */
952
#define   DPLL_FPA01_P1_POST_DIV_MASK	0x00ff0000 /* i915 */
942
#define   DPLL_FPA01_P1_POST_DIV_MASK_PINEVIEW	0x00ff8000 /* Pineview */
953
#define   DPLL_FPA01_P1_POST_DIV_MASK_PINEVIEW	0x00ff8000 /* Pineview */
943
#define   DPLL_LOCK_VLV			(1<<15)
954
#define   DPLL_LOCK_VLV			(1<<15)
944
#define   DPLL_INTEGRATED_CLOCK_VLV	(1<<13)
955
#define   DPLL_INTEGRATED_CLOCK_VLV	(1<<13)
Line 945... Line -...
945
 
-
 
946
#define SRX_INDEX		0x3c4
-
 
947
#define SRX_DATA		0x3c5
-
 
948
#define SR01			1
-
 
949
#define SR01_SCREEN_OFF		(1<<5)
-
 
950
 
-
 
951
#define PPCR			0x61204
-
 
952
#define PPCR_ON			(1<<0)
-
 
953
 
-
 
954
#define DVOB			0x61140
-
 
955
#define DVOB_ON			(1<<31)
-
 
956
#define DVOC			0x61160
-
 
957
#define DVOC_ON			(1<<31)
-
 
958
#define LVDS			0x61180
-
 
959
#define LVDS_ON			(1<<31)
-
 
960
 
-
 
961
/* Scratch pad debug 0 reg:
-
 
962
 */
956
 
963
#define   DPLL_FPA01_P1_POST_DIV_MASK_I830	0x001f0000
957
#define   DPLL_FPA01_P1_POST_DIV_MASK_I830	0x001f0000
964
/*
958
/*
965
 * The i830 generation, in LVDS mode, defines P1 as the bit number set within
959
 * The i830 generation, in LVDS mode, defines P1 as the bit number set within
966
 * this field (only one bit may be set).
960
 * this field (only one bit may be set).
Line 996... Line 990...
996
 * SDVO multiplier for 945G/GM. Not used on 965.
990
 * SDVO multiplier for 945G/GM. Not used on 965.
997
 */
991
 */
998
#define   SDVO_MULTIPLIER_MASK			0x000000ff
992
#define   SDVO_MULTIPLIER_MASK			0x000000ff
999
#define   SDVO_MULTIPLIER_SHIFT_HIRES		4
993
#define   SDVO_MULTIPLIER_SHIFT_HIRES		4
1000
#define   SDVO_MULTIPLIER_SHIFT_VGA		0
994
#define   SDVO_MULTIPLIER_SHIFT_VGA		0
1001
#define _DPLL_A_MD 0x0601c /* 965+ only */
995
#define _DPLL_A_MD (dev_priv->info->display_mmio_offset + 0x601c) /* 965+ only */
1002
/*
996
/*
1003
 * UDI pixel divider, controlling how many pixels are stuffed into a packet.
997
 * UDI pixel divider, controlling how many pixels are stuffed into a packet.
1004
 *
998
 *
1005
 * Value is pixels minus 1.  Must be set to 1 pixel for SDVO.
999
 * Value is pixels minus 1.  Must be set to 1 pixel for SDVO.
1006
 */
1000
 */
Line 1033... Line 1027...
1033
 * This best be set to the default value (3) or the CRT won't work. No,
1027
 * This best be set to the default value (3) or the CRT won't work. No,
1034
 * I don't entirely understand what this does...
1028
 * I don't entirely understand what this does...
1035
 */
1029
 */
1036
#define   DPLL_MD_VGA_UDI_MULTIPLIER_MASK	0x0000003f
1030
#define   DPLL_MD_VGA_UDI_MULTIPLIER_MASK	0x0000003f
1037
#define   DPLL_MD_VGA_UDI_MULTIPLIER_SHIFT	0
1031
#define   DPLL_MD_VGA_UDI_MULTIPLIER_SHIFT	0
1038
#define _DPLL_B_MD 0x06020 /* 965+ only */
1032
#define _DPLL_B_MD (dev_priv->info->display_mmio_offset + 0x6020) /* 965+ only */
1039
#define DPLL_MD(pipe) _PIPE(pipe, _DPLL_A_MD, _DPLL_B_MD)
1033
#define DPLL_MD(pipe) _PIPE(pipe, _DPLL_A_MD, _DPLL_B_MD)
Line 1040... Line 1034...
1040
 
1034
 
1041
#define _FPA0	0x06040
1035
#define _FPA0	0x06040
1042
#define _FPA1	0x06044
1036
#define _FPA1	0x06044
Line 1176... Line 1170...
1176
#define GS_UNIT_CLOCK_GATE_DISABLE		(1 << 7)
1170
#define GS_UNIT_CLOCK_GATE_DISABLE		(1 << 7)
1177
#define CL_UNIT_CLOCK_GATE_DISABLE		(1 << 6)
1171
#define CL_UNIT_CLOCK_GATE_DISABLE		(1 << 6)
1178
#define RAMCLK_GATE_D		0x6210		/* CRL only */
1172
#define RAMCLK_GATE_D		0x6210		/* CRL only */
1179
#define DEUC			0x6214          /* CRL only */
1173
#define DEUC			0x6214          /* CRL only */
Line 1180... Line 1174...
1180
 
1174
 
1181
#define FW_BLC_SELF_VLV		0x6500
1175
#define FW_BLC_SELF_VLV		(VLV_DISPLAY_BASE + 0x6500)
Line 1182... Line 1176...
1182
#define  FW_CSPWRDWNEN		(1<<15)
1176
#define  FW_CSPWRDWNEN		(1<<15)
1183
 
1177
 
1184
/*
1178
/*
Line 1185... Line 1179...
1185
 * Palette regs
1179
 * Palette regs
1186
 */
1180
 */
1187
 
1181
 
Line 1188... Line 1182...
1188
#define _PALETTE_A		0x0a000
1182
#define _PALETTE_A		(dev_priv->info->display_mmio_offset + 0xa000)
Line 1189... Line 1183...
1189
#define _PALETTE_B		0x0a800
1183
#define _PALETTE_B		(dev_priv->info->display_mmio_offset + 0xa800)
Line 1240... Line 1234...
1240
#define   MAD_DIMM_B_SIZE_SHIFT		8
1234
#define   MAD_DIMM_B_SIZE_SHIFT		8
1241
#define   MAD_DIMM_B_SIZE_MASK		(0xff << MAD_DIMM_B_SIZE_SHIFT)
1235
#define   MAD_DIMM_B_SIZE_MASK		(0xff << MAD_DIMM_B_SIZE_SHIFT)
1242
#define   MAD_DIMM_A_SIZE_SHIFT		0
1236
#define   MAD_DIMM_A_SIZE_SHIFT		0
1243
#define   MAD_DIMM_A_SIZE_MASK		(0xff << MAD_DIMM_A_SIZE_SHIFT)
1237
#define   MAD_DIMM_A_SIZE_MASK		(0xff << MAD_DIMM_A_SIZE_SHIFT)
Line -... Line 1238...
-
 
1238
 
-
 
1239
/** snb MCH registers for priority tuning */
-
 
1240
#define MCH_SSKPD			(MCHBAR_MIRROR_BASE_SNB + 0x5d10)
-
 
1241
#define   MCH_SSKPD_WM0_MASK		0x3f
Line 1244... Line 1242...
1244
 
1242
#define   MCH_SSKPD_WM0_VAL		0xc
1245
 
1243
 
1246
/* Clocking configuration register */
1244
/* Clocking configuration register */
1247
#define CLKCFG			0x10c00
1245
#define CLKCFG			0x10c00
Line 1549... Line 1547...
1549
/*
1547
/*
1550
 * Display engine regs
1548
 * Display engine regs
1551
 */
1549
 */
Line 1552... Line 1550...
1552
 
1550
 
1553
/* Pipe A timing regs */
1551
/* Pipe A timing regs */
1554
#define _HTOTAL_A	0x60000
1552
#define _HTOTAL_A	(dev_priv->info->display_mmio_offset + 0x60000)
1555
#define _HBLANK_A	0x60004
1553
#define _HBLANK_A	(dev_priv->info->display_mmio_offset + 0x60004)
1556
#define _HSYNC_A		0x60008
1554
#define _HSYNC_A	(dev_priv->info->display_mmio_offset + 0x60008)
1557
#define _VTOTAL_A	0x6000c
1555
#define _VTOTAL_A	(dev_priv->info->display_mmio_offset + 0x6000c)
1558
#define _VBLANK_A	0x60010
1556
#define _VBLANK_A	(dev_priv->info->display_mmio_offset + 0x60010)
1559
#define _VSYNC_A		0x60014
1557
#define _VSYNC_A	(dev_priv->info->display_mmio_offset + 0x60014)
1560
#define _PIPEASRC	0x6001c
1558
#define _PIPEASRC	(dev_priv->info->display_mmio_offset + 0x6001c)
1561
#define _BCLRPAT_A	0x60020
1559
#define _BCLRPAT_A	(dev_priv->info->display_mmio_offset + 0x60020)
Line 1562... Line 1560...
1562
#define _VSYNCSHIFT_A	0x60028
1560
#define _VSYNCSHIFT_A	(dev_priv->info->display_mmio_offset + 0x60028)
1563
 
1561
 
1564
/* Pipe B timing regs */
1562
/* Pipe B timing regs */
1565
#define _HTOTAL_B	0x61000
1563
#define _HTOTAL_B	(dev_priv->info->display_mmio_offset + 0x61000)
1566
#define _HBLANK_B	0x61004
1564
#define _HBLANK_B	(dev_priv->info->display_mmio_offset + 0x61004)
1567
#define _HSYNC_B		0x61008
1565
#define _HSYNC_B	(dev_priv->info->display_mmio_offset + 0x61008)
1568
#define _VTOTAL_B	0x6100c
1566
#define _VTOTAL_B	(dev_priv->info->display_mmio_offset + 0x6100c)
1569
#define _VBLANK_B	0x61010
1567
#define _VBLANK_B	(dev_priv->info->display_mmio_offset + 0x61010)
1570
#define _VSYNC_B		0x61014
1568
#define _VSYNC_B	(dev_priv->info->display_mmio_offset + 0x61014)
1571
#define _PIPEBSRC	0x6101c
1569
#define _PIPEBSRC	(dev_priv->info->display_mmio_offset + 0x6101c)
Line 1572... Line 1570...
1572
#define _BCLRPAT_B	0x61020
1570
#define _BCLRPAT_B	(dev_priv->info->display_mmio_offset + 0x61020)
1573
#define _VSYNCSHIFT_B	0x61028
1571
#define _VSYNCSHIFT_B	(dev_priv->info->display_mmio_offset + 0x61028)
1574
 
1572
 
Line 1613... Line 1611...
1613
#define   ADPA_CRT_HOTPLUG_VOLREF_325MV  (0<<17)
1611
#define   ADPA_CRT_HOTPLUG_VOLREF_325MV  (0<<17)
1614
#define   ADPA_CRT_HOTPLUG_VOLREF_475MV  (1<<17)
1612
#define   ADPA_CRT_HOTPLUG_VOLREF_475MV  (1<<17)
1615
#define   ADPA_CRT_HOTPLUG_FORCE_TRIGGER (1<<16)
1613
#define   ADPA_CRT_HOTPLUG_FORCE_TRIGGER (1<<16)
1616
#define   ADPA_USE_VGA_HVPOLARITY (1<<15)
1614
#define   ADPA_USE_VGA_HVPOLARITY (1<<15)
1617
#define   ADPA_SETS_HVPOLARITY	0
1615
#define   ADPA_SETS_HVPOLARITY	0
1618
#define   ADPA_VSYNC_CNTL_DISABLE (1<<11)
1616
#define   ADPA_VSYNC_CNTL_DISABLE (1<<10)
1619
#define   ADPA_VSYNC_CNTL_ENABLE 0
1617
#define   ADPA_VSYNC_CNTL_ENABLE 0
1620
#define   ADPA_HSYNC_CNTL_DISABLE (1<<10)
1618
#define   ADPA_HSYNC_CNTL_DISABLE (1<<11)
1621
#define   ADPA_HSYNC_CNTL_ENABLE 0
1619
#define   ADPA_HSYNC_CNTL_ENABLE 0
1622
#define   ADPA_VSYNC_ACTIVE_HIGH (1<<4)
1620
#define   ADPA_VSYNC_ACTIVE_HIGH (1<<4)
1623
#define   ADPA_VSYNC_ACTIVE_LOW	0
1621
#define   ADPA_VSYNC_ACTIVE_LOW	0
1624
#define   ADPA_HSYNC_ACTIVE_HIGH (1<<3)
1622
#define   ADPA_HSYNC_ACTIVE_HIGH (1<<3)
1625
#define   ADPA_HSYNC_ACTIVE_LOW	0
1623
#define   ADPA_HSYNC_ACTIVE_LOW	0
Line 1629... Line 1627...
1629
#define   ADPA_DPMS_STANDBY	(2<<10)
1627
#define   ADPA_DPMS_STANDBY	(2<<10)
1630
#define   ADPA_DPMS_OFF		(3<<10)
1628
#define   ADPA_DPMS_OFF		(3<<10)
Line 1631... Line 1629...
1631
 
1629
 
1632
 
1630
 
1633
/* Hotplug control (945+ only) */
1631
/* Hotplug control (945+ only) */
1634
#define PORT_HOTPLUG_EN		0x61110
-
 
1635
#define   HDMIB_HOTPLUG_INT_EN			(1 << 29)
1632
#define PORT_HOTPLUG_EN		(dev_priv->info->display_mmio_offset + 0x61110)
1636
#define   DPB_HOTPLUG_INT_EN			(1 << 29)
-
 
1637
#define   HDMIC_HOTPLUG_INT_EN			(1 << 28)
1633
#define   PORTB_HOTPLUG_INT_EN			(1 << 29)
1638
#define   DPC_HOTPLUG_INT_EN			(1 << 28)
-
 
1639
#define   HDMID_HOTPLUG_INT_EN			(1 << 27)
1634
#define   PORTC_HOTPLUG_INT_EN			(1 << 28)
1640
#define   DPD_HOTPLUG_INT_EN			(1 << 27)
1635
#define   PORTD_HOTPLUG_INT_EN			(1 << 27)
1641
#define   SDVOB_HOTPLUG_INT_EN			(1 << 26)
1636
#define   SDVOB_HOTPLUG_INT_EN			(1 << 26)
1642
#define   SDVOC_HOTPLUG_INT_EN			(1 << 25)
1637
#define   SDVOC_HOTPLUG_INT_EN			(1 << 25)
1643
#define   TV_HOTPLUG_INT_EN			(1 << 18)
1638
#define   TV_HOTPLUG_INT_EN			(1 << 18)
Line 1656... Line 1651...
1656
#define CRT_HOTPLUG_DETECT_DELAY_1G		(0 << 4)
1651
#define CRT_HOTPLUG_DETECT_DELAY_1G		(0 << 4)
1657
#define CRT_HOTPLUG_DETECT_DELAY_2G		(1 << 4)
1652
#define CRT_HOTPLUG_DETECT_DELAY_2G		(1 << 4)
1658
#define CRT_HOTPLUG_DETECT_VOLTAGE_325MV	(0 << 2)
1653
#define CRT_HOTPLUG_DETECT_VOLTAGE_325MV	(0 << 2)
1659
#define CRT_HOTPLUG_DETECT_VOLTAGE_475MV	(1 << 2)
1654
#define CRT_HOTPLUG_DETECT_VOLTAGE_475MV	(1 << 2)
Line 1660... Line 1655...
1660
 
1655
 
1661
#define PORT_HOTPLUG_STAT	0x61114
1656
#define PORT_HOTPLUG_STAT	(dev_priv->info->display_mmio_offset + 0x61114)
1662
/* HDMI/DP bits are gen4+ */
1657
/* HDMI/DP bits are gen4+ */
1663
#define   DPB_HOTPLUG_LIVE_STATUS               (1 << 29)
1658
#define   PORTB_HOTPLUG_LIVE_STATUS               (1 << 29)
1664
#define   DPC_HOTPLUG_LIVE_STATUS               (1 << 28)
1659
#define   PORTC_HOTPLUG_LIVE_STATUS               (1 << 28)
1665
#define   DPD_HOTPLUG_LIVE_STATUS               (1 << 27)
-
 
1666
#define   DPD_HOTPLUG_INT_STATUS		(3 << 21)
-
 
1667
#define   DPC_HOTPLUG_INT_STATUS		(3 << 19)
-
 
1668
#define   DPB_HOTPLUG_INT_STATUS		(3 << 17)
-
 
1669
/* HDMI bits are shared with the DP bits */
-
 
1670
#define   HDMIB_HOTPLUG_LIVE_STATUS             (1 << 29)
-
 
1671
#define   HDMIC_HOTPLUG_LIVE_STATUS             (1 << 28)
-
 
1672
#define   HDMID_HOTPLUG_LIVE_STATUS             (1 << 27)
1660
#define   PORTD_HOTPLUG_LIVE_STATUS               (1 << 27)
1673
#define   HDMID_HOTPLUG_INT_STATUS		(3 << 21)
1661
#define   PORTD_HOTPLUG_INT_STATUS		(3 << 21)
1674
#define   HDMIC_HOTPLUG_INT_STATUS		(3 << 19)
1662
#define   PORTC_HOTPLUG_INT_STATUS		(3 << 19)
1675
#define   HDMIB_HOTPLUG_INT_STATUS		(3 << 17)
1663
#define   PORTB_HOTPLUG_INT_STATUS		(3 << 17)
1676
/* CRT/TV common between gen3+ */
1664
/* CRT/TV common between gen3+ */
1677
#define   CRT_HOTPLUG_INT_STATUS		(1 << 11)
1665
#define   CRT_HOTPLUG_INT_STATUS		(1 << 11)
1678
#define   TV_HOTPLUG_INT_STATUS			(1 << 10)
1666
#define   TV_HOTPLUG_INT_STATUS			(1 << 10)
1679
#define   CRT_HOTPLUG_MONITOR_MASK		(3 << 8)
1667
#define   CRT_HOTPLUG_MONITOR_MASK		(3 << 8)
Line 1875... Line 1863...
1875
#define PP_ON_DELAYS	0x61208
1863
#define PP_ON_DELAYS	0x61208
1876
#define PP_OFF_DELAYS	0x6120c
1864
#define PP_OFF_DELAYS	0x6120c
1877
#define PP_DIVISOR	0x61210
1865
#define PP_DIVISOR	0x61210
Line 1878... Line 1866...
1878
 
1866
 
1879
/* Panel fitting */
1867
/* Panel fitting */
1880
#define PFIT_CONTROL	0x61230
1868
#define PFIT_CONTROL	(dev_priv->info->display_mmio_offset + 0x61230)
1881
#define   PFIT_ENABLE		(1 << 31)
1869
#define   PFIT_ENABLE		(1 << 31)
1882
#define   PFIT_PIPE_MASK	(3 << 29)
1870
#define   PFIT_PIPE_MASK	(3 << 29)
1883
#define   PFIT_PIPE_SHIFT	29
1871
#define   PFIT_PIPE_SHIFT	29
1884
#define   VERT_INTERP_DISABLE	(0 << 10)
1872
#define   VERT_INTERP_DISABLE	(0 << 10)
Line 1893... Line 1881...
1893
#define   PFIT_FILTER_FUZZY	(0 << 24)
1881
#define   PFIT_FILTER_FUZZY	(0 << 24)
1894
#define   PFIT_SCALING_AUTO	(0 << 26)
1882
#define   PFIT_SCALING_AUTO	(0 << 26)
1895
#define   PFIT_SCALING_PROGRAMMED (1 << 26)
1883
#define   PFIT_SCALING_PROGRAMMED (1 << 26)
1896
#define   PFIT_SCALING_PILLAR	(2 << 26)
1884
#define   PFIT_SCALING_PILLAR	(2 << 26)
1897
#define   PFIT_SCALING_LETTER	(3 << 26)
1885
#define   PFIT_SCALING_LETTER	(3 << 26)
1898
#define PFIT_PGM_RATIOS	0x61234
1886
#define PFIT_PGM_RATIOS	(dev_priv->info->display_mmio_offset + 0x61234)
1899
#define   PFIT_VERT_SCALE_MASK			0xfff00000
-
 
1900
#define   PFIT_HORIZ_SCALE_MASK			0x0000fff0
-
 
1901
/* Pre-965 */
1887
/* Pre-965 */
1902
#define		PFIT_VERT_SCALE_SHIFT		20
1888
#define		PFIT_VERT_SCALE_SHIFT		20
1903
#define		PFIT_VERT_SCALE_MASK		0xfff00000
1889
#define		PFIT_VERT_SCALE_MASK		0xfff00000
1904
#define		PFIT_HORIZ_SCALE_SHIFT		4
1890
#define		PFIT_HORIZ_SCALE_SHIFT		4
1905
#define		PFIT_HORIZ_SCALE_MASK		0x0000fff0
1891
#define		PFIT_HORIZ_SCALE_MASK		0x0000fff0
Line 1907... Line 1893...
1907
#define		PFIT_VERT_SCALE_SHIFT_965	16
1893
#define		PFIT_VERT_SCALE_SHIFT_965	16
1908
#define		PFIT_VERT_SCALE_MASK_965	0x1fff0000
1894
#define		PFIT_VERT_SCALE_MASK_965	0x1fff0000
1909
#define		PFIT_HORIZ_SCALE_SHIFT_965	0
1895
#define		PFIT_HORIZ_SCALE_SHIFT_965	0
1910
#define		PFIT_HORIZ_SCALE_MASK_965	0x00001fff
1896
#define		PFIT_HORIZ_SCALE_MASK_965	0x00001fff
Line 1911... Line 1897...
1911
 
1897
 
Line 1912... Line 1898...
1912
#define PFIT_AUTO_RATIOS 0x61238
1898
#define PFIT_AUTO_RATIOS (dev_priv->info->display_mmio_offset + 0x61238)
1913
 
1899
 
1914
/* Backlight control */
1900
/* Backlight control */
1915
#define BLC_PWM_CTL2		0x61250 /* 965+ only */
1901
#define BLC_PWM_CTL2		0x61250 /* 965+ only */
Line 2637... Line 2623...
2637
#define PIPE_DP_LINK_N(pipe) _PIPE(pipe, _PIPEA_DP_LINK_N, _PIPEB_DP_LINK_N)
2623
#define PIPE_DP_LINK_N(pipe) _PIPE(pipe, _PIPEA_DP_LINK_N, _PIPEB_DP_LINK_N)
Line 2638... Line 2624...
2638
 
2624
 
Line 2639... Line 2625...
2639
/* Display & cursor control */
2625
/* Display & cursor control */
2640
 
2626
 
2641
/* Pipe A */
2627
/* Pipe A */
2642
#define _PIPEADSL		0x70000
2628
#define _PIPEADSL		(dev_priv->info->display_mmio_offset + 0x70000)
2643
#define   DSL_LINEMASK_GEN2	0x00000fff
2629
#define   DSL_LINEMASK_GEN2	0x00000fff
2644
#define   DSL_LINEMASK_GEN3	0x00001fff
2630
#define   DSL_LINEMASK_GEN3	0x00001fff
2645
#define _PIPEACONF		0x70008
2631
#define _PIPEACONF		(dev_priv->info->display_mmio_offset + 0x70008)
2646
#define   PIPECONF_ENABLE	(1<<31)
2632
#define   PIPECONF_ENABLE	(1<<31)
2647
#define   PIPECONF_DISABLE	0
2633
#define   PIPECONF_DISABLE	0
2648
#define   PIPECONF_DOUBLE_WIDE	(1<<30)
2634
#define   PIPECONF_DOUBLE_WIDE	(1<<30)
Line 2669... Line 2655...
2669
#define   PIPECONF_PFIT_PF_INTERLACED_ILK	(1 << 21)
2655
#define   PIPECONF_PFIT_PF_INTERLACED_ILK	(1 << 21)
2670
#define   PIPECONF_INTERLACED_ILK		(3 << 21)
2656
#define   PIPECONF_INTERLACED_ILK		(3 << 21)
2671
#define   PIPECONF_INTERLACED_DBL_ILK		(4 << 21) /* ilk/snb only */
2657
#define   PIPECONF_INTERLACED_DBL_ILK		(4 << 21) /* ilk/snb only */
2672
#define   PIPECONF_PFIT_PF_INTERLACED_DBL_ILK	(5 << 21) /* ilk/snb only */
2658
#define   PIPECONF_PFIT_PF_INTERLACED_DBL_ILK	(5 << 21) /* ilk/snb only */
2673
#define   PIPECONF_CXSR_DOWNCLOCK	(1<<16)
2659
#define   PIPECONF_CXSR_DOWNCLOCK	(1<<16)
-
 
2660
#define   PIPECONF_COLOR_RANGE_SELECT	(1 << 13)
2674
#define   PIPECONF_BPP_MASK	(0x000000e0)
2661
#define   PIPECONF_BPC_MASK	(0x7 << 5)
2675
#define   PIPECONF_BPP_8	(0<<5)
2662
#define   PIPECONF_8BPC		(0<<5)
2676
#define   PIPECONF_BPP_10	(1<<5)
2663
#define   PIPECONF_10BPC	(1<<5)
2677
#define   PIPECONF_BPP_6	(2<<5)
2664
#define   PIPECONF_6BPC		(2<<5)
2678
#define   PIPECONF_BPP_12	(3<<5)
2665
#define   PIPECONF_12BPC	(3<<5)
2679
#define   PIPECONF_DITHER_EN	(1<<4)
2666
#define   PIPECONF_DITHER_EN	(1<<4)
2680
#define   PIPECONF_DITHER_TYPE_MASK (0x0000000c)
2667
#define   PIPECONF_DITHER_TYPE_MASK (0x0000000c)
2681
#define   PIPECONF_DITHER_TYPE_SP (0<<2)
2668
#define   PIPECONF_DITHER_TYPE_SP (0<<2)
2682
#define   PIPECONF_DITHER_TYPE_ST1 (1<<2)
2669
#define   PIPECONF_DITHER_TYPE_ST1 (1<<2)
2683
#define   PIPECONF_DITHER_TYPE_ST2 (2<<2)
2670
#define   PIPECONF_DITHER_TYPE_ST2 (2<<2)
2684
#define   PIPECONF_DITHER_TYPE_TEMP (3<<2)
2671
#define   PIPECONF_DITHER_TYPE_TEMP (3<<2)
2685
#define _PIPEASTAT		0x70024
2672
#define _PIPEASTAT		(dev_priv->info->display_mmio_offset + 0x70024)
2686
#define   PIPE_FIFO_UNDERRUN_STATUS		(1UL<<31)
2673
#define   PIPE_FIFO_UNDERRUN_STATUS		(1UL<<31)
2687
#define   SPRITE1_FLIPDONE_INT_EN_VLV		(1UL<<30)
2674
#define   SPRITE1_FLIPDONE_INT_EN_VLV		(1UL<<30)
2688
#define   PIPE_CRC_ERROR_ENABLE			(1UL<<29)
2675
#define   PIPE_CRC_ERROR_ENABLE			(1UL<<29)
2689
#define   PIPE_CRC_DONE_ENABLE			(1UL<<28)
2676
#define   PIPE_CRC_DONE_ENABLE			(1UL<<28)
2690
#define   PIPE_GMBUS_EVENT_ENABLE		(1UL<<27)
2677
#define   PIPE_GMBUS_EVENT_ENABLE		(1UL<<27)
2691
#define   PLANE_FLIP_DONE_INT_EN_VLV		(1UL<<26)
2678
#define   PLANE_FLIP_DONE_INT_EN_VLV		(1UL<<26)
2692
#define   PIPE_HOTPLUG_INTERRUPT_ENABLE		(1UL<<26)
2679
#define   PIPE_HOTPLUG_INTERRUPT_ENABLE		(1UL<<26)
2693
#define   PIPE_VSYNC_INTERRUPT_ENABLE		(1UL<<25)
2680
#define   PIPE_VSYNC_INTERRUPT_ENABLE		(1UL<<25)
2694
#define   PIPE_DISPLAY_LINE_COMPARE_ENABLE	(1UL<<24)
2681
#define   PIPE_DISPLAY_LINE_COMPARE_ENABLE	(1UL<<24)
2695
#define   PIPE_DPST_EVENT_ENABLE		(1UL<<23)
2682
#define   PIPE_DPST_EVENT_ENABLE		(1UL<<23)
2696
#define   SPRITE0_FLIP_DONE_INT_EN_VLV		(1UL<<26)
2683
#define   SPRITE0_FLIP_DONE_INT_EN_VLV		(1UL<<22)
2697
#define   PIPE_LEGACY_BLC_EVENT_ENABLE		(1UL<<22)
2684
#define   PIPE_LEGACY_BLC_EVENT_ENABLE		(1UL<<22)
2698
#define   PIPE_ODD_FIELD_INTERRUPT_ENABLE	(1UL<<21)
2685
#define   PIPE_ODD_FIELD_INTERRUPT_ENABLE	(1UL<<21)
2699
#define   PIPE_EVEN_FIELD_INTERRUPT_ENABLE	(1UL<<20)
2686
#define   PIPE_EVEN_FIELD_INTERRUPT_ENABLE	(1UL<<20)
2700
#define   PIPE_HOTPLUG_TV_INTERRUPT_ENABLE	(1UL<<18) /* pre-965 */
2687
#define   PIPE_HOTPLUG_TV_INTERRUPT_ENABLE	(1UL<<18) /* pre-965 */
2701
#define   PIPE_START_VBLANK_INTERRUPT_ENABLE	(1UL<<18) /* 965 or later */
2688
#define   PIPE_START_VBLANK_INTERRUPT_ENABLE	(1UL<<18) /* 965 or later */
2702
#define   PIPE_VBLANK_INTERRUPT_ENABLE		(1UL<<17)
2689
#define   PIPE_VBLANK_INTERRUPT_ENABLE		(1UL<<17)
2703
#define   PIPEA_HBLANK_INT_EN_VLV		(1UL<<16)
2690
#define   PIPEA_HBLANK_INT_EN_VLV		(1UL<<16)
2704
#define   PIPE_OVERLAY_UPDATED_ENABLE		(1UL<<16)
2691
#define   PIPE_OVERLAY_UPDATED_ENABLE		(1UL<<16)
2705
#define   SPRITE1_FLIPDONE_INT_STATUS_VLV	(1UL<<15)
2692
#define   SPRITE1_FLIPDONE_INT_STATUS_VLV	(1UL<<15)
2706
#define   SPRITE0_FLIPDONE_INT_STATUS_VLV	(1UL<<15)
2693
#define   SPRITE0_FLIPDONE_INT_STATUS_VLV	(1UL<<14)
2707
#define   PIPE_CRC_ERROR_INTERRUPT_STATUS	(1UL<<13)
2694
#define   PIPE_CRC_ERROR_INTERRUPT_STATUS	(1UL<<13)
2708
#define   PIPE_CRC_DONE_INTERRUPT_STATUS	(1UL<<12)
2695
#define   PIPE_CRC_DONE_INTERRUPT_STATUS	(1UL<<12)
2709
#define   PIPE_GMBUS_INTERRUPT_STATUS		(1UL<<11)
2696
#define   PIPE_GMBUS_INTERRUPT_STATUS		(1UL<<11)
2710
#define   PLANE_FLIPDONE_INT_STATUS_VLV		(1UL<<10)
2697
#define   PLANE_FLIPDONE_INT_STATUS_VLV		(1UL<<10)
2711
#define   PIPE_HOTPLUG_INTERRUPT_STATUS		(1UL<<10)
2698
#define   PIPE_HOTPLUG_INTERRUPT_STATUS		(1UL<<10)
Line 2717... Line 2704...
2717
#define   PIPE_EVEN_FIELD_INTERRUPT_STATUS	(1UL<<4)
2704
#define   PIPE_EVEN_FIELD_INTERRUPT_STATUS	(1UL<<4)
2718
#define   PIPE_HOTPLUG_TV_INTERRUPT_STATUS	(1UL<<2) /* pre-965 */
2705
#define   PIPE_HOTPLUG_TV_INTERRUPT_STATUS	(1UL<<2) /* pre-965 */
2719
#define   PIPE_START_VBLANK_INTERRUPT_STATUS	(1UL<<2) /* 965 or later */
2706
#define   PIPE_START_VBLANK_INTERRUPT_STATUS	(1UL<<2) /* 965 or later */
2720
#define   PIPE_VBLANK_INTERRUPT_STATUS		(1UL<<1)
2707
#define   PIPE_VBLANK_INTERRUPT_STATUS		(1UL<<1)
2721
#define   PIPE_OVERLAY_UPDATED_STATUS		(1UL<<0)
2708
#define   PIPE_OVERLAY_UPDATED_STATUS		(1UL<<0)
2722
#define   PIPE_BPC_MASK				(7 << 5) /* Ironlake */
-
 
2723
#define   PIPE_8BPC				(0 << 5)
-
 
2724
#define   PIPE_10BPC				(1 << 5)
-
 
2725
#define   PIPE_6BPC				(2 << 5)
-
 
2726
#define   PIPE_12BPC				(3 << 5)
-
 
Line 2727... Line 2709...
2727
 
2709
 
2728
#define PIPESRC(pipe) _PIPE(pipe, _PIPEASRC, _PIPEBSRC)
2710
#define PIPESRC(pipe) _PIPE(pipe, _PIPEASRC, _PIPEBSRC)
2729
#define PIPECONF(tran) _TRANSCODER(tran, _PIPEACONF, _PIPEBCONF)
2711
#define PIPECONF(tran) _TRANSCODER(tran, _PIPEACONF, _PIPEBCONF)
2730
#define PIPEDSL(pipe)  _PIPE(pipe, _PIPEADSL, _PIPEBDSL)
2712
#define PIPEDSL(pipe)  _PIPE(pipe, _PIPEADSL, _PIPEBDSL)
2731
#define PIPEFRAME(pipe) _PIPE(pipe, _PIPEAFRAMEHIGH, _PIPEBFRAMEHIGH)
2713
#define PIPEFRAME(pipe) _PIPE(pipe, _PIPEAFRAMEHIGH, _PIPEBFRAMEHIGH)
2732
#define PIPEFRAMEPIXEL(pipe)  _PIPE(pipe, _PIPEAFRAMEPIXEL, _PIPEBFRAMEPIXEL)
2714
#define PIPEFRAMEPIXEL(pipe)  _PIPE(pipe, _PIPEAFRAMEPIXEL, _PIPEBFRAMEPIXEL)
Line 2733... Line 2715...
2733
#define PIPESTAT(pipe) _PIPE(pipe, _PIPEASTAT, _PIPEBSTAT)
2715
#define PIPESTAT(pipe) _PIPE(pipe, _PIPEASTAT, _PIPEBSTAT)
2734
 
2716
 
2735
#define VLV_DPFLIPSTAT				0x70028
2717
#define VLV_DPFLIPSTAT				(VLV_DISPLAY_BASE + 0x70028)
2736
#define   PIPEB_LINE_COMPARE_INT_EN		(1<<29)
2718
#define   PIPEB_LINE_COMPARE_INT_EN		(1<<29)
2737
#define   PIPEB_HLINE_INT_EN			(1<<28)
2719
#define   PIPEB_HLINE_INT_EN			(1<<28)
2738
#define   PIPEB_VBLANK_INT_EN			(1<<27)
2720
#define   PIPEB_VBLANK_INT_EN			(1<<27)
Line 2744... Line 2726...
2744
#define   PIPEA_VBLANK_INT_EN			(1<<19)
2726
#define   PIPEA_VBLANK_INT_EN			(1<<19)
2745
#define   SPRITEB_FLIPDONE_INT_EN		(1<<18)
2727
#define   SPRITEB_FLIPDONE_INT_EN		(1<<18)
2746
#define   SPRITEA_FLIPDONE_INT_EN		(1<<17)
2728
#define   SPRITEA_FLIPDONE_INT_EN		(1<<17)
2747
#define   PLANEA_FLIPDONE_INT_EN		(1<<16)
2729
#define   PLANEA_FLIPDONE_INT_EN		(1<<16)
Line 2748... Line 2730...
2748
 
2730
 
2749
#define DPINVGTT				0x7002c /* VLV only */
2731
#define DPINVGTT				(VLV_DISPLAY_BASE + 0x7002c) /* VLV only */
2750
#define   CURSORB_INVALID_GTT_INT_EN		(1<<23)
2732
#define   CURSORB_INVALID_GTT_INT_EN		(1<<23)
2751
#define   CURSORA_INVALID_GTT_INT_EN		(1<<22)
2733
#define   CURSORA_INVALID_GTT_INT_EN		(1<<22)
2752
#define   SPRITED_INVALID_GTT_INT_EN		(1<<21)
2734
#define   SPRITED_INVALID_GTT_INT_EN		(1<<21)
2753
#define   SPRITEC_INVALID_GTT_INT_EN		(1<<20)
2735
#define   SPRITEC_INVALID_GTT_INT_EN		(1<<20)
Line 2772... Line 2754...
2772
#define   DSPARB_BSTART_MASK	(0x7f)
2754
#define   DSPARB_BSTART_MASK	(0x7f)
2773
#define   DSPARB_BSTART_SHIFT	0
2755
#define   DSPARB_BSTART_SHIFT	0
2774
#define   DSPARB_BEND_SHIFT	9 /* on 855 */
2756
#define   DSPARB_BEND_SHIFT	9 /* on 855 */
2775
#define   DSPARB_AEND_SHIFT	0
2757
#define   DSPARB_AEND_SHIFT	0
Line 2776... Line 2758...
2776
 
2758
 
2777
#define DSPFW1			0x70034
2759
#define DSPFW1			(dev_priv->info->display_mmio_offset + 0x70034)
2778
#define   DSPFW_SR_SHIFT	23
2760
#define   DSPFW_SR_SHIFT	23
2779
#define   DSPFW_SR_MASK 	(0x1ff<<23)
2761
#define   DSPFW_SR_MASK 	(0x1ff<<23)
2780
#define   DSPFW_CURSORB_SHIFT	16
2762
#define   DSPFW_CURSORB_SHIFT	16
2781
#define   DSPFW_CURSORB_MASK	(0x3f<<16)
2763
#define   DSPFW_CURSORB_MASK	(0x3f<<16)
2782
#define   DSPFW_PLANEB_SHIFT	8
2764
#define   DSPFW_PLANEB_SHIFT	8
2783
#define   DSPFW_PLANEB_MASK	(0x7f<<8)
2765
#define   DSPFW_PLANEB_MASK	(0x7f<<8)
2784
#define   DSPFW_PLANEA_MASK	(0x7f)
2766
#define   DSPFW_PLANEA_MASK	(0x7f)
2785
#define DSPFW2			0x70038
2767
#define DSPFW2			(dev_priv->info->display_mmio_offset + 0x70038)
2786
#define   DSPFW_CURSORA_MASK	0x00003f00
2768
#define   DSPFW_CURSORA_MASK	0x00003f00
2787
#define   DSPFW_CURSORA_SHIFT	8
2769
#define   DSPFW_CURSORA_SHIFT	8
2788
#define   DSPFW_PLANEC_MASK	(0x7f)
2770
#define   DSPFW_PLANEC_MASK	(0x7f)
2789
#define DSPFW3			0x7003c
2771
#define DSPFW3			(dev_priv->info->display_mmio_offset + 0x7003c)
2790
#define   DSPFW_HPLL_SR_EN	(1<<31)
2772
#define   DSPFW_HPLL_SR_EN	(1<<31)
2791
#define   DSPFW_CURSOR_SR_SHIFT	24
2773
#define   DSPFW_CURSOR_SR_SHIFT	24
2792
#define   PINEVIEW_SELF_REFRESH_EN	(1<<30)
2774
#define   PINEVIEW_SELF_REFRESH_EN	(1<<30)
2793
#define   DSPFW_CURSOR_SR_MASK		(0x3f<<24)
2775
#define   DSPFW_CURSOR_SR_MASK		(0x3f<<24)
Line 2796... Line 2778...
2796
#define   DSPFW_HPLL_SR_MASK		(0x1ff)
2778
#define   DSPFW_HPLL_SR_MASK		(0x1ff)
Line 2797... Line 2779...
2797
 
2779
 
2798
/* drain latency register values*/
2780
/* drain latency register values*/
2799
#define DRAIN_LATENCY_PRECISION_32	32
2781
#define DRAIN_LATENCY_PRECISION_32	32
2800
#define DRAIN_LATENCY_PRECISION_16	16
2782
#define DRAIN_LATENCY_PRECISION_16	16
2801
#define VLV_DDL1			0x70050
2783
#define VLV_DDL1			(VLV_DISPLAY_BASE + 0x70050)
2802
#define DDL_CURSORA_PRECISION_32	(1<<31)
2784
#define DDL_CURSORA_PRECISION_32	(1<<31)
2803
#define DDL_CURSORA_PRECISION_16	(0<<31)
2785
#define DDL_CURSORA_PRECISION_16	(0<<31)
2804
#define DDL_CURSORA_SHIFT		24
2786
#define DDL_CURSORA_SHIFT		24
2805
#define DDL_PLANEA_PRECISION_32		(1<<7)
2787
#define DDL_PLANEA_PRECISION_32		(1<<7)
2806
#define DDL_PLANEA_PRECISION_16		(0<<7)
2788
#define DDL_PLANEA_PRECISION_16		(0<<7)
2807
#define VLV_DDL2			0x70054
2789
#define VLV_DDL2			(VLV_DISPLAY_BASE + 0x70054)
2808
#define DDL_CURSORB_PRECISION_32	(1<<31)
2790
#define DDL_CURSORB_PRECISION_32	(1<<31)
2809
#define DDL_CURSORB_PRECISION_16	(0<<31)
2791
#define DDL_CURSORB_PRECISION_16	(0<<31)
2810
#define DDL_CURSORB_SHIFT		24
2792
#define DDL_CURSORB_SHIFT		24
2811
#define DDL_PLANEB_PRECISION_32		(1<<7)
2793
#define DDL_PLANEB_PRECISION_32		(1<<7)
Line 2946... Line 2928...
2946
 *    high2 = ((INREG(PIPEAFRAMEHIGH) & PIPE_FRAME_HIGH_MASK) >>
2928
 *    high2 = ((INREG(PIPEAFRAMEHIGH) & PIPE_FRAME_HIGH_MASK) >>
2947
 *             PIPE_FRAME_HIGH_SHIFT);
2929
 *             PIPE_FRAME_HIGH_SHIFT);
2948
 *  } while (high1 != high2);
2930
 *  } while (high1 != high2);
2949
 *  frame = (high1 << 8) | low1;
2931
 *  frame = (high1 << 8) | low1;
2950
 */
2932
 */
2951
#define _PIPEAFRAMEHIGH          0x70040
2933
#define _PIPEAFRAMEHIGH          (dev_priv->info->display_mmio_offset + 0x70040)
2952
#define   PIPE_FRAME_HIGH_MASK    0x0000ffff
2934
#define   PIPE_FRAME_HIGH_MASK    0x0000ffff
2953
#define   PIPE_FRAME_HIGH_SHIFT   0
2935
#define   PIPE_FRAME_HIGH_SHIFT   0
2954
#define _PIPEAFRAMEPIXEL         0x70044
2936
#define _PIPEAFRAMEPIXEL         (dev_priv->info->display_mmio_offset + 0x70044)
2955
#define   PIPE_FRAME_LOW_MASK     0xff000000
2937
#define   PIPE_FRAME_LOW_MASK     0xff000000
2956
#define   PIPE_FRAME_LOW_SHIFT    24
2938
#define   PIPE_FRAME_LOW_SHIFT    24
2957
#define   PIPE_PIXEL_MASK         0x00ffffff
2939
#define   PIPE_PIXEL_MASK         0x00ffffff
2958
#define   PIPE_PIXEL_SHIFT        0
2940
#define   PIPE_PIXEL_SHIFT        0
2959
/* GM45+ just has to be different */
2941
/* GM45+ just has to be different */
2960
#define _PIPEA_FRMCOUNT_GM45	0x70040
2942
#define _PIPEA_FRMCOUNT_GM45	0x70040
2961
#define _PIPEA_FLIPCOUNT_GM45	0x70044
2943
#define _PIPEA_FLIPCOUNT_GM45	0x70044
2962
#define PIPE_FRMCOUNT_GM45(pipe) _PIPE(pipe, _PIPEA_FRMCOUNT_GM45, _PIPEB_FRMCOUNT_GM45)
2944
#define PIPE_FRMCOUNT_GM45(pipe) _PIPE(pipe, _PIPEA_FRMCOUNT_GM45, _PIPEB_FRMCOUNT_GM45)
Line 2963... Line 2945...
2963
 
2945
 
2964
/* Cursor A & B regs */
2946
/* Cursor A & B regs */
2965
#define _CURACNTR		0x70080
2947
#define _CURACNTR		(dev_priv->info->display_mmio_offset + 0x70080)
2966
/* Old style CUR*CNTR flags (desktop 8xx) */
2948
/* Old style CUR*CNTR flags (desktop 8xx) */
2967
#define   CURSOR_ENABLE		0x80000000
2949
#define   CURSOR_ENABLE		0x80000000
2968
#define   CURSOR_GAMMA_ENABLE	0x40000000
2950
#define   CURSOR_GAMMA_ENABLE	0x40000000
-
 
2951
#define   CURSOR_STRIDE_MASK	0x30000000
2969
#define   CURSOR_STRIDE_MASK	0x30000000
2952
#define   CURSOR_PIPE_CSC_ENABLE (1<<24)
2970
#define   CURSOR_FORMAT_SHIFT	24
2953
#define   CURSOR_FORMAT_SHIFT	24
2971
#define   CURSOR_FORMAT_MASK	(0x07 << CURSOR_FORMAT_SHIFT)
2954
#define   CURSOR_FORMAT_MASK	(0x07 << CURSOR_FORMAT_SHIFT)
2972
#define   CURSOR_FORMAT_2C	(0x00 << CURSOR_FORMAT_SHIFT)
2955
#define   CURSOR_FORMAT_2C	(0x00 << CURSOR_FORMAT_SHIFT)
2973
#define   CURSOR_FORMAT_3C	(0x01 << CURSOR_FORMAT_SHIFT)
2956
#define   CURSOR_FORMAT_3C	(0x01 << CURSOR_FORMAT_SHIFT)
Line 2981... Line 2964...
2981
#define   CURSOR_MODE_64_ARGB_AX ((1 << 5) | CURSOR_MODE_64_32B_AX)
2964
#define   CURSOR_MODE_64_ARGB_AX ((1 << 5) | CURSOR_MODE_64_32B_AX)
2982
#define   MCURSOR_PIPE_SELECT	(1 << 28)
2965
#define   MCURSOR_PIPE_SELECT	(1 << 28)
2983
#define   MCURSOR_PIPE_A	0x00
2966
#define   MCURSOR_PIPE_A	0x00
2984
#define   MCURSOR_PIPE_B	(1 << 28)
2967
#define   MCURSOR_PIPE_B	(1 << 28)
2985
#define   MCURSOR_GAMMA_ENABLE  (1 << 26)
2968
#define   MCURSOR_GAMMA_ENABLE  (1 << 26)
2986
#define _CURABASE		0x70084
2969
#define _CURABASE		(dev_priv->info->display_mmio_offset + 0x70084)
2987
#define _CURAPOS			0x70088
2970
#define _CURAPOS		(dev_priv->info->display_mmio_offset + 0x70088)
2988
#define   CURSOR_POS_MASK       0x007FF
2971
#define   CURSOR_POS_MASK       0x007FF
2989
#define   CURSOR_POS_SIGN       0x8000
2972
#define   CURSOR_POS_SIGN       0x8000
2990
#define   CURSOR_X_SHIFT        0
2973
#define   CURSOR_X_SHIFT        0
2991
#define   CURSOR_Y_SHIFT        16
2974
#define   CURSOR_Y_SHIFT        16
2992
#define CURSIZE			0x700a0
2975
#define CURSIZE			0x700a0
2993
#define _CURBCNTR		0x700c0
2976
#define _CURBCNTR		(dev_priv->info->display_mmio_offset + 0x700c0)
2994
#define _CURBBASE		0x700c4
2977
#define _CURBBASE		(dev_priv->info->display_mmio_offset + 0x700c4)
2995
#define _CURBPOS			0x700c8
2978
#define _CURBPOS		(dev_priv->info->display_mmio_offset + 0x700c8)
Line 2996... Line 2979...
2996
 
2979
 
2997
#define _CURBCNTR_IVB		0x71080
2980
#define _CURBCNTR_IVB		0x71080
2998
#define _CURBBASE_IVB		0x71084
2981
#define _CURBBASE_IVB		0x71084
Line 3005... Line 2988...
3005
#define CURCNTR_IVB(pipe) _PIPE(pipe, _CURACNTR, _CURBCNTR_IVB)
2988
#define CURCNTR_IVB(pipe) _PIPE(pipe, _CURACNTR, _CURBCNTR_IVB)
3006
#define CURBASE_IVB(pipe) _PIPE(pipe, _CURABASE, _CURBBASE_IVB)
2989
#define CURBASE_IVB(pipe) _PIPE(pipe, _CURABASE, _CURBBASE_IVB)
3007
#define CURPOS_IVB(pipe) _PIPE(pipe, _CURAPOS, _CURBPOS_IVB)
2990
#define CURPOS_IVB(pipe) _PIPE(pipe, _CURAPOS, _CURBPOS_IVB)
Line 3008... Line 2991...
3008
 
2991
 
3009
/* Display A control */
2992
/* Display A control */
3010
#define _DSPACNTR                0x70180
2993
#define _DSPACNTR                (dev_priv->info->display_mmio_offset + 0x70180)
3011
#define   DISPLAY_PLANE_ENABLE			(1<<31)
2994
#define   DISPLAY_PLANE_ENABLE			(1<<31)
3012
#define   DISPLAY_PLANE_DISABLE			0
2995
#define   DISPLAY_PLANE_DISABLE			0
3013
#define   DISPPLANE_GAMMA_ENABLE		(1<<30)
2996
#define   DISPPLANE_GAMMA_ENABLE		(1<<30)
3014
#define   DISPPLANE_GAMMA_DISABLE		0
2997
#define   DISPPLANE_GAMMA_DISABLE		0
Line 3026... Line 3009...
3026
#define   DISPPLANE_RGBX161616			(0xc<<26)
3009
#define   DISPPLANE_RGBX161616			(0xc<<26)
3027
#define   DISPPLANE_RGBX888			(0xe<<26)
3010
#define   DISPPLANE_RGBX888			(0xe<<26)
3028
#define   DISPPLANE_RGBA888			(0xf<<26)
3011
#define   DISPPLANE_RGBA888			(0xf<<26)
3029
#define   DISPPLANE_STEREO_ENABLE		(1<<25)
3012
#define   DISPPLANE_STEREO_ENABLE		(1<<25)
3030
#define   DISPPLANE_STEREO_DISABLE		0
3013
#define   DISPPLANE_STEREO_DISABLE		0
-
 
3014
#define   DISPPLANE_PIPE_CSC_ENABLE		(1<<24)
3031
#define   DISPPLANE_SEL_PIPE_SHIFT		24
3015
#define   DISPPLANE_SEL_PIPE_SHIFT		24
3032
#define   DISPPLANE_SEL_PIPE_MASK		(3<
3016
#define   DISPPLANE_SEL_PIPE_MASK		(3<
3033
#define   DISPPLANE_SEL_PIPE_A			0
3017
#define   DISPPLANE_SEL_PIPE_A			0
3034
#define   DISPPLANE_SEL_PIPE_B			(1<
3018
#define   DISPPLANE_SEL_PIPE_B			(1<
3035
#define   DISPPLANE_SRC_KEY_ENABLE		(1<<22)
3019
#define   DISPPLANE_SRC_KEY_ENABLE		(1<<22)
Line 3038... Line 3022...
3038
#define   DISPPLANE_NO_LINE_DOUBLE		0
3022
#define   DISPPLANE_NO_LINE_DOUBLE		0
3039
#define   DISPPLANE_STEREO_POLARITY_FIRST	0
3023
#define   DISPPLANE_STEREO_POLARITY_FIRST	0
3040
#define   DISPPLANE_STEREO_POLARITY_SECOND	(1<<18)
3024
#define   DISPPLANE_STEREO_POLARITY_SECOND	(1<<18)
3041
#define   DISPPLANE_TRICKLE_FEED_DISABLE	(1<<14) /* Ironlake */
3025
#define   DISPPLANE_TRICKLE_FEED_DISABLE	(1<<14) /* Ironlake */
3042
#define   DISPPLANE_TILED			(1<<10)
3026
#define   DISPPLANE_TILED			(1<<10)
3043
#define _DSPAADDR		0x70184
3027
#define _DSPAADDR		(dev_priv->info->display_mmio_offset + 0x70184)
3044
#define _DSPASTRIDE		0x70188
3028
#define _DSPASTRIDE		(dev_priv->info->display_mmio_offset + 0x70188)
3045
#define _DSPAPOS			0x7018C /* reserved */
3029
#define _DSPAPOS		(dev_priv->info->display_mmio_offset + 0x7018C) /* reserved */
3046
#define _DSPASIZE		0x70190
3030
#define _DSPASIZE		(dev_priv->info->display_mmio_offset + 0x70190)
3047
#define _DSPASURF		0x7019C /* 965+ only */
3031
#define _DSPASURF		(dev_priv->info->display_mmio_offset + 0x7019C) /* 965+ only */
3048
#define _DSPATILEOFF		0x701A4 /* 965+ only */
3032
#define _DSPATILEOFF		(dev_priv->info->display_mmio_offset + 0x701A4) /* 965+ only */
3049
#define _DSPAOFFSET		0x701A4 /* HSW */
3033
#define _DSPAOFFSET		(dev_priv->info->display_mmio_offset + 0x701A4) /* HSW */
3050
#define _DSPASURFLIVE		0x701AC
3034
#define _DSPASURFLIVE		(dev_priv->info->display_mmio_offset + 0x701AC)
Line 3051... Line 3035...
3051
 
3035
 
3052
#define DSPCNTR(plane) _PIPE(plane, _DSPACNTR, _DSPBCNTR)
3036
#define DSPCNTR(plane) _PIPE(plane, _DSPACNTR, _DSPBCNTR)
3053
#define DSPADDR(plane) _PIPE(plane, _DSPAADDR, _DSPBADDR)
3037
#define DSPADDR(plane) _PIPE(plane, _DSPAADDR, _DSPBADDR)
3054
#define DSPSTRIDE(plane) _PIPE(plane, _DSPASTRIDE, _DSPBSTRIDE)
3038
#define DSPSTRIDE(plane) _PIPE(plane, _DSPASTRIDE, _DSPBSTRIDE)
Line 3066... Line 3050...
3066
#define I915_HI_DISPBASE(val)	(val & DISP_BASEADDR_MASK)
3050
#define I915_HI_DISPBASE(val)	(val & DISP_BASEADDR_MASK)
3067
#define I915_MODIFY_DISPBASE(reg, gfx_addr) \
3051
#define I915_MODIFY_DISPBASE(reg, gfx_addr) \
3068
		(I915_WRITE((reg), (gfx_addr) | I915_LO_DISPBASE(I915_READ(reg))))
3052
		(I915_WRITE((reg), (gfx_addr) | I915_LO_DISPBASE(I915_READ(reg))))
Line 3069... Line 3053...
3069
 
3053
 
3070
/* VBIOS flags */
3054
/* VBIOS flags */
3071
#define SWF00			0x71410
3055
#define SWF00			(dev_priv->info->display_mmio_offset + 0x71410)
3072
#define SWF01			0x71414
3056
#define SWF01			(dev_priv->info->display_mmio_offset + 0x71414)
3073
#define SWF02			0x71418
3057
#define SWF02			(dev_priv->info->display_mmio_offset + 0x71418)
3074
#define SWF03			0x7141c
3058
#define SWF03			(dev_priv->info->display_mmio_offset + 0x7141c)
3075
#define SWF04			0x71420
3059
#define SWF04			(dev_priv->info->display_mmio_offset + 0x71420)
3076
#define SWF05			0x71424
3060
#define SWF05			(dev_priv->info->display_mmio_offset + 0x71424)
3077
#define SWF06			0x71428
3061
#define SWF06			(dev_priv->info->display_mmio_offset + 0x71428)
3078
#define SWF10			0x70410
3062
#define SWF10			(dev_priv->info->display_mmio_offset + 0x70410)
3079
#define SWF11			0x70414
3063
#define SWF11			(dev_priv->info->display_mmio_offset + 0x70414)
3080
#define SWF14			0x71420
3064
#define SWF14			(dev_priv->info->display_mmio_offset + 0x71420)
3081
#define SWF30			0x72414
3065
#define SWF30			(dev_priv->info->display_mmio_offset + 0x72414)
3082
#define SWF31			0x72418
3066
#define SWF31			(dev_priv->info->display_mmio_offset + 0x72418)
Line 3083... Line 3067...
3083
#define SWF32			0x7241c
3067
#define SWF32			(dev_priv->info->display_mmio_offset + 0x7241c)
3084
 
3068
 
3085
/* Pipe B */
3069
/* Pipe B */
3086
#define _PIPEBDSL		0x71000
3070
#define _PIPEBDSL		(dev_priv->info->display_mmio_offset + 0x71000)
3087
#define _PIPEBCONF		0x71008
3071
#define _PIPEBCONF		(dev_priv->info->display_mmio_offset + 0x71008)
3088
#define _PIPEBSTAT		0x71024
3072
#define _PIPEBSTAT		(dev_priv->info->display_mmio_offset + 0x71024)
3089
#define _PIPEBFRAMEHIGH		0x71040
3073
#define _PIPEBFRAMEHIGH		(dev_priv->info->display_mmio_offset + 0x71040)
3090
#define _PIPEBFRAMEPIXEL		0x71044
3074
#define _PIPEBFRAMEPIXEL	(dev_priv->info->display_mmio_offset + 0x71044)
Line 3091... Line 3075...
3091
#define _PIPEB_FRMCOUNT_GM45	0x71040
3075
#define _PIPEB_FRMCOUNT_GM45	0x71040
3092
#define _PIPEB_FLIPCOUNT_GM45	0x71044
3076
#define _PIPEB_FLIPCOUNT_GM45	0x71044
3093
 
3077
 
3094
 
3078
 
3095
/* Display B control */
3079
/* Display B control */
3096
#define _DSPBCNTR		0x71180
3080
#define _DSPBCNTR		(dev_priv->info->display_mmio_offset + 0x71180)
3097
#define   DISPPLANE_ALPHA_TRANS_ENABLE		(1<<15)
3081
#define   DISPPLANE_ALPHA_TRANS_ENABLE		(1<<15)
3098
#define   DISPPLANE_ALPHA_TRANS_DISABLE		0
3082
#define   DISPPLANE_ALPHA_TRANS_DISABLE		0
3099
#define   DISPPLANE_SPRITE_ABOVE_DISPLAY	0
3083
#define   DISPPLANE_SPRITE_ABOVE_DISPLAY	0
3100
#define   DISPPLANE_SPRITE_ABOVE_OVERLAY	(1)
3084
#define   DISPPLANE_SPRITE_ABOVE_OVERLAY	(1)
3101
#define _DSPBADDR		0x71184
3085
#define _DSPBADDR		(dev_priv->info->display_mmio_offset + 0x71184)
3102
#define _DSPBSTRIDE		0x71188
3086
#define _DSPBSTRIDE		(dev_priv->info->display_mmio_offset + 0x71188)
3103
#define _DSPBPOS			0x7118C
3087
#define _DSPBPOS		(dev_priv->info->display_mmio_offset + 0x7118C)
3104
#define _DSPBSIZE		0x71190
3088
#define _DSPBSIZE		(dev_priv->info->display_mmio_offset + 0x71190)
Line 3105... Line 3089...
3105
#define _DSPBSURF		0x7119C
3089
#define _DSPBSURF		(dev_priv->info->display_mmio_offset + 0x7119C)
3106
#define _DSPBTILEOFF		0x711A4
3090
#define _DSPBTILEOFF		(dev_priv->info->display_mmio_offset + 0x711A4)
3107
#define _DSPBOFFSET		0x711A4
3091
#define _DSPBOFFSET		(dev_priv->info->display_mmio_offset + 0x711A4)
3108
#define _DSPBSURFLIVE		0x711AC
3092
#define _DSPBSURFLIVE		(dev_priv->info->display_mmio_offset + 0x711AC)
3109
 
3093
 
3110
/* Sprite A control */
3094
/* Sprite A control */
3111
#define _DVSACNTR		0x72180
3095
#define _DVSACNTR		0x72180
3112
#define   DVS_ENABLE		(1<<31)
3096
#define   DVS_ENABLE		(1<<31)
3113
#define   DVS_GAMMA_ENABLE	(1<<30)
3097
#define   DVS_GAMMA_ENABLE	(1<<30)
-
 
3098
#define   DVS_PIXFORMAT_MASK	(3<<25)
3114
#define   DVS_PIXFORMAT_MASK	(3<<25)
3099
#define   DVS_FORMAT_YUV422	(0<<25)
3115
#define   DVS_FORMAT_YUV422	(0<<25)
3100
#define   DVS_FORMAT_RGBX101010	(1<<25)
3116
#define   DVS_FORMAT_RGBX101010	(1<<25)
3101
#define   DVS_FORMAT_RGBX888	(2<<25)
3117
#define   DVS_FORMAT_RGBX888	(2<<25)
3102
#define   DVS_FORMAT_RGBX161616	(3<<25)
3118
#define   DVS_FORMAT_RGBX161616	(3<<25)
3103
#define   DVS_PIPE_CSC_ENABLE   (1<<24)
Line 3181... Line 3166...
3181
#define   SPRITE_FORMAT_RGBX101010	(1<<25)
3166
#define   SPRITE_FORMAT_RGBX101010	(1<<25)
3182
#define   SPRITE_FORMAT_RGBX888		(2<<25)
3167
#define   SPRITE_FORMAT_RGBX888		(2<<25)
3183
#define   SPRITE_FORMAT_RGBX161616	(3<<25)
3168
#define   SPRITE_FORMAT_RGBX161616	(3<<25)
3184
#define   SPRITE_FORMAT_YUV444		(4<<25)
3169
#define   SPRITE_FORMAT_YUV444		(4<<25)
3185
#define   SPRITE_FORMAT_XR_BGR101010	(5<<25) /* Extended range */
3170
#define   SPRITE_FORMAT_XR_BGR101010	(5<<25) /* Extended range */
3186
#define   SPRITE_CSC_ENABLE		(1<<24)
3171
#define   SPRITE_PIPE_CSC_ENABLE	(1<<24)
3187
#define   SPRITE_SOURCE_KEY		(1<<22)
3172
#define   SPRITE_SOURCE_KEY		(1<<22)
3188
#define   SPRITE_RGB_ORDER_RGBX		(1<<20) /* only for 888 and 161616 */
3173
#define   SPRITE_RGB_ORDER_RGBX		(1<<20) /* only for 888 and 161616 */
3189
#define   SPRITE_YUV_TO_RGB_CSC_DISABLE	(1<<19)
3174
#define   SPRITE_YUV_TO_RGB_CSC_DISABLE	(1<<19)
3190
#define   SPRITE_YUV_CSC_FORMAT_BT709	(1<<18) /* 0 is BT601 */
3175
#define   SPRITE_YUV_CSC_FORMAT_BT709	(1<<18) /* 0 is BT601 */
3191
#define   SPRITE_YUV_BYTE_ORDER_MASK	(3<<16)
3176
#define   SPRITE_YUV_BYTE_ORDER_MASK	(3<<16)
Line 3252... Line 3237...
3252
#define VGACNTRL		0x71400
3237
#define VGACNTRL		0x71400
3253
# define VGA_DISP_DISABLE			(1 << 31)
3238
# define VGA_DISP_DISABLE			(1 << 31)
3254
# define VGA_2X_MODE				(1 << 30)
3239
# define VGA_2X_MODE				(1 << 30)
3255
# define VGA_PIPE_B_SELECT			(1 << 29)
3240
# define VGA_PIPE_B_SELECT			(1 << 29)
Line -... Line 3241...
-
 
3241
 
-
 
3242
#define VLV_VGACNTRL		(VLV_DISPLAY_BASE + 0x71400)
3256
 
3243
 
Line 3257... Line 3244...
3257
/* Ironlake */
3244
/* Ironlake */
Line 3258... Line 3245...
3258
 
3245
 
Line 3292... Line 3279...
3292
#define  FDI_PLL_FREQ_CHANGE_REQUEST    (1<<24)
3279
#define  FDI_PLL_FREQ_CHANGE_REQUEST    (1<<24)
3293
#define  FDI_PLL_FREQ_LOCK_LIMIT_MASK   0xfff00
3280
#define  FDI_PLL_FREQ_LOCK_LIMIT_MASK   0xfff00
3294
#define  FDI_PLL_FREQ_DISABLE_COUNT_LIMIT_MASK  0xff
3281
#define  FDI_PLL_FREQ_DISABLE_COUNT_LIMIT_MASK  0xff
Line 3295... Line 3282...
3295
 
3282
 
3296
 
3283
 
3297
#define _PIPEA_DATA_M1           0x60030
3284
#define _PIPEA_DATA_M1           (dev_priv->info->display_mmio_offset + 0x60030)
3298
#define  TU_SIZE(x)             (((x)-1) << 25) /* default size 64 */
3285
#define  TU_SIZE(x)             (((x)-1) << 25) /* default size 64 */
3299
#define  TU_SIZE_MASK           0x7e000000
3286
#define  TU_SIZE_MASK           0x7e000000
3300
#define  PIPE_DATA_M1_OFFSET    0
3287
#define  PIPE_DATA_M1_OFFSET    0
Line 3301... Line 3288...
3301
#define _PIPEA_DATA_N1           0x60034
3288
#define _PIPEA_DATA_N1           (dev_priv->info->display_mmio_offset + 0x60034)
3302
#define  PIPE_DATA_N1_OFFSET    0
3289
#define  PIPE_DATA_N1_OFFSET    0
3303
 
3290
 
3304
#define _PIPEA_DATA_M2           0x60038
3291
#define _PIPEA_DATA_M2           (dev_priv->info->display_mmio_offset + 0x60038)
Line 3305... Line 3292...
3305
#define  PIPE_DATA_M2_OFFSET    0
3292
#define  PIPE_DATA_M2_OFFSET    0
3306
#define _PIPEA_DATA_N2           0x6003c
3293
#define _PIPEA_DATA_N2           (dev_priv->info->display_mmio_offset + 0x6003c)
3307
#define  PIPE_DATA_N2_OFFSET    0
3294
#define  PIPE_DATA_N2_OFFSET    0
3308
 
3295
 
Line 3309... Line 3296...
3309
#define _PIPEA_LINK_M1           0x60040
3296
#define _PIPEA_LINK_M1           (dev_priv->info->display_mmio_offset + 0x60040)
3310
#define  PIPE_LINK_M1_OFFSET    0
3297
#define  PIPE_LINK_M1_OFFSET    0
3311
#define _PIPEA_LINK_N1           0x60044
3298
#define _PIPEA_LINK_N1           (dev_priv->info->display_mmio_offset + 0x60044)
3312
#define  PIPE_LINK_N1_OFFSET    0
3299
#define  PIPE_LINK_N1_OFFSET    0
Line 3313... Line 3300...
3313
 
3300
 
Line 3314... Line 3301...
3314
#define _PIPEA_LINK_M2           0x60048
3301
#define _PIPEA_LINK_M2           (dev_priv->info->display_mmio_offset + 0x60048)
3315
#define  PIPE_LINK_M2_OFFSET    0
3302
#define  PIPE_LINK_M2_OFFSET    0
Line 3316... Line 3303...
3316
#define _PIPEA_LINK_N2           0x6004c
3303
#define _PIPEA_LINK_N2           (dev_priv->info->display_mmio_offset + 0x6004c)
3317
#define  PIPE_LINK_N2_OFFSET    0
3304
#define  PIPE_LINK_N2_OFFSET    0
Line 3318... Line 3305...
3318
 
3305
 
3319
/* PIPEB timing regs are same start from 0x61000 */
3306
/* PIPEB timing regs are same start from 0x61000 */
Line 3320... Line 3307...
3320
 
3307
 
3321
#define _PIPEB_DATA_M1           0x61030
3308
#define _PIPEB_DATA_M1           (dev_priv->info->display_mmio_offset + 0x61030)
Line 3322... Line 3309...
3322
#define _PIPEB_DATA_N1           0x61034
3309
#define _PIPEB_DATA_N1           (dev_priv->info->display_mmio_offset + 0x61034)
3323
 
3310
 
3324
#define _PIPEB_DATA_M2           0x61038
3311
#define _PIPEB_DATA_M2           (dev_priv->info->display_mmio_offset + 0x61038)
3325
#define _PIPEB_DATA_N2           0x6103c
3312
#define _PIPEB_DATA_N2           (dev_priv->info->display_mmio_offset + 0x6103c)
Line 3579... Line 3566...
3579
#define PORTD_PULSE_DURATION_2ms        (0)
3566
#define PORTD_PULSE_DURATION_2ms        (0)
3580
#define PORTD_PULSE_DURATION_4_5ms      (1 << 18)
3567
#define PORTD_PULSE_DURATION_4_5ms      (1 << 18)
3581
#define PORTD_PULSE_DURATION_6ms        (2 << 18)
3568
#define PORTD_PULSE_DURATION_6ms        (2 << 18)
3582
#define PORTD_PULSE_DURATION_100ms      (3 << 18)
3569
#define PORTD_PULSE_DURATION_100ms      (3 << 18)
3583
#define PORTD_PULSE_DURATION_MASK	(3 << 18)
3570
#define PORTD_PULSE_DURATION_MASK	(3 << 18)
-
 
3571
#define PORTD_HOTPLUG_STATUS_MASK	(0x3 << 16)
3584
#define PORTD_HOTPLUG_NO_DETECT         (0)
3572
#define  PORTD_HOTPLUG_NO_DETECT	(0 << 16)
3585
#define PORTD_HOTPLUG_SHORT_DETECT      (1 << 16)
3573
#define PORTD_HOTPLUG_SHORT_DETECT      (1 << 16)
3586
#define PORTD_HOTPLUG_LONG_DETECT       (1 << 17)
3574
#define  PORTD_HOTPLUG_LONG_DETECT	(2 << 16)
3587
#define PORTC_HOTPLUG_ENABLE            (1 << 12)
3575
#define PORTC_HOTPLUG_ENABLE            (1 << 12)
3588
#define PORTC_PULSE_DURATION_2ms        (0)
3576
#define PORTC_PULSE_DURATION_2ms        (0)
3589
#define PORTC_PULSE_DURATION_4_5ms      (1 << 10)
3577
#define PORTC_PULSE_DURATION_4_5ms      (1 << 10)
3590
#define PORTC_PULSE_DURATION_6ms        (2 << 10)
3578
#define PORTC_PULSE_DURATION_6ms        (2 << 10)
3591
#define PORTC_PULSE_DURATION_100ms      (3 << 10)
3579
#define PORTC_PULSE_DURATION_100ms      (3 << 10)
3592
#define PORTC_PULSE_DURATION_MASK	(3 << 10)
3580
#define PORTC_PULSE_DURATION_MASK	(3 << 10)
-
 
3581
#define PORTC_HOTPLUG_STATUS_MASK	(0x3 << 8)
3593
#define PORTC_HOTPLUG_NO_DETECT         (0)
3582
#define  PORTC_HOTPLUG_NO_DETECT	(0 << 8)
3594
#define PORTC_HOTPLUG_SHORT_DETECT      (1 << 8)
3583
#define PORTC_HOTPLUG_SHORT_DETECT      (1 << 8)
3595
#define PORTC_HOTPLUG_LONG_DETECT       (1 << 9)
3584
#define  PORTC_HOTPLUG_LONG_DETECT	(2 << 8)
3596
#define PORTB_HOTPLUG_ENABLE            (1 << 4)
3585
#define PORTB_HOTPLUG_ENABLE            (1 << 4)
3597
#define PORTB_PULSE_DURATION_2ms        (0)
3586
#define PORTB_PULSE_DURATION_2ms        (0)
3598
#define PORTB_PULSE_DURATION_4_5ms      (1 << 2)
3587
#define PORTB_PULSE_DURATION_4_5ms      (1 << 2)
3599
#define PORTB_PULSE_DURATION_6ms        (2 << 2)
3588
#define PORTB_PULSE_DURATION_6ms        (2 << 2)
3600
#define PORTB_PULSE_DURATION_100ms      (3 << 2)
3589
#define PORTB_PULSE_DURATION_100ms      (3 << 2)
3601
#define PORTB_PULSE_DURATION_MASK	(3 << 2)
3590
#define PORTB_PULSE_DURATION_MASK	(3 << 2)
-
 
3591
#define PORTB_HOTPLUG_STATUS_MASK	(0x3 << 0)
3602
#define PORTB_HOTPLUG_NO_DETECT         (0)
3592
#define  PORTB_HOTPLUG_NO_DETECT	(0 << 0)
3603
#define PORTB_HOTPLUG_SHORT_DETECT      (1 << 0)
3593
#define PORTB_HOTPLUG_SHORT_DETECT      (1 << 0)
3604
#define PORTB_HOTPLUG_LONG_DETECT       (1 << 1)
3594
#define  PORTB_HOTPLUG_LONG_DETECT	(2 << 0)
Line 3605... Line 3595...
3605
 
3595
 
3606
#define PCH_GPIOA               0xc5010
3596
#define PCH_GPIOA               0xc5010
3607
#define PCH_GPIOB               0xc5014
3597
#define PCH_GPIOB               0xc5014
3608
#define PCH_GPIOC               0xc5018
3598
#define PCH_GPIOC               0xc5018
Line 3720... Line 3710...
3720
 
3710
 
3721
#define TVIDEO_DIP_CTL(pipe) _PIPE(pipe, _VIDEO_DIP_CTL_A, _VIDEO_DIP_CTL_B)
3711
#define TVIDEO_DIP_CTL(pipe) _PIPE(pipe, _VIDEO_DIP_CTL_A, _VIDEO_DIP_CTL_B)
3722
#define TVIDEO_DIP_DATA(pipe) _PIPE(pipe, _VIDEO_DIP_DATA_A, _VIDEO_DIP_DATA_B)
3712
#define TVIDEO_DIP_DATA(pipe) _PIPE(pipe, _VIDEO_DIP_DATA_A, _VIDEO_DIP_DATA_B)
Line 3723... Line 3713...
3723
#define TVIDEO_DIP_GCP(pipe) _PIPE(pipe, _VIDEO_DIP_GCP_A, _VIDEO_DIP_GCP_B)
3713
#define TVIDEO_DIP_GCP(pipe) _PIPE(pipe, _VIDEO_DIP_GCP_A, _VIDEO_DIP_GCP_B)
3724
 
3714
 
3725
#define VLV_VIDEO_DIP_CTL_A		0x60200
3715
#define VLV_VIDEO_DIP_CTL_A		(VLV_DISPLAY_BASE + 0x60200)
3726
#define VLV_VIDEO_DIP_DATA_A		0x60208
3716
#define VLV_VIDEO_DIP_DATA_A		(VLV_DISPLAY_BASE + 0x60208)
3727
#define VLV_VIDEO_DIP_GDCP_PAYLOAD_A	0x60210
3717
#define VLV_VIDEO_DIP_GDCP_PAYLOAD_A	(VLV_DISPLAY_BASE + 0x60210)
3728
 
3718
 
3729
#define VLV_VIDEO_DIP_CTL_B		0x61170
3719
#define VLV_VIDEO_DIP_CTL_B		(VLV_DISPLAY_BASE + 0x61170)
Line 3730... Line 3720...
3730
#define VLV_VIDEO_DIP_DATA_B		0x61174
3720
#define VLV_VIDEO_DIP_DATA_B		(VLV_DISPLAY_BASE + 0x61174)
3731
#define VLV_VIDEO_DIP_GDCP_PAYLOAD_B	0x61178
3721
#define VLV_VIDEO_DIP_GDCP_PAYLOAD_B	(VLV_DISPLAY_BASE + 0x61178)
3732
 
3722
 
3733
#define VLV_TVIDEO_DIP_CTL(pipe) \
3723
#define VLV_TVIDEO_DIP_CTL(pipe) \
Line 3818... Line 3808...
3818
#define  TRANS_STATE_ENABLE     (1<<30)
3808
#define  TRANS_STATE_ENABLE     (1<<30)
3819
#define  TRANS_FSYNC_DELAY_HB1  (0<<27)
3809
#define  TRANS_FSYNC_DELAY_HB1  (0<<27)
3820
#define  TRANS_FSYNC_DELAY_HB2  (1<<27)
3810
#define  TRANS_FSYNC_DELAY_HB2  (1<<27)
3821
#define  TRANS_FSYNC_DELAY_HB3  (2<<27)
3811
#define  TRANS_FSYNC_DELAY_HB3  (2<<27)
3822
#define  TRANS_FSYNC_DELAY_HB4  (3<<27)
3812
#define  TRANS_FSYNC_DELAY_HB4  (3<<27)
3823
#define  TRANS_DP_AUDIO_ONLY    (1<<26)
-
 
3824
#define  TRANS_DP_VIDEO_AUDIO   (0<<26)
-
 
3825
#define  TRANS_INTERLACE_MASK   (7<<21)
3813
#define  TRANS_INTERLACE_MASK   (7<<21)
3826
#define  TRANS_PROGRESSIVE      (0<<21)
3814
#define  TRANS_PROGRESSIVE      (0<<21)
3827
#define  TRANS_INTERLACED       (3<<21)
3815
#define  TRANS_INTERLACED       (3<<21)
3828
#define  TRANS_LEGACY_INTERLACED_ILK (2<<21)
3816
#define  TRANS_LEGACY_INTERLACED_ILK (2<<21)
3829
#define  TRANS_8BPC             (0<<5)
3817
#define  TRANS_8BPC             (0<<5)
Line 3925... Line 3913...
3925
#define  FDI_RX_POLARITY_REVERSED_LPT	(1<<16)
3913
#define  FDI_RX_POLARITY_REVERSED_LPT	(1<<16)
3926
#define  FDI_8BPC                       (0<<16)
3914
#define  FDI_8BPC                       (0<<16)
3927
#define  FDI_10BPC                      (1<<16)
3915
#define  FDI_10BPC                      (1<<16)
3928
#define  FDI_6BPC                       (2<<16)
3916
#define  FDI_6BPC                       (2<<16)
3929
#define  FDI_12BPC                      (3<<16)
3917
#define  FDI_12BPC                      (3<<16)
3930
#define  FDI_LINK_REVERSE_OVERWRITE     (1<<15)
3918
#define  FDI_RX_LINK_REVERSAL_OVERRIDE  (1<<15)
3931
#define  FDI_DMI_LINK_REVERSE_MASK      (1<<14)
3919
#define  FDI_DMI_LINK_REVERSE_MASK      (1<<14)
3932
#define  FDI_RX_PLL_ENABLE              (1<<13)
3920
#define  FDI_RX_PLL_ENABLE              (1<<13)
3933
#define  FDI_FS_ERR_CORRECT_ENABLE      (1<<11)
3921
#define  FDI_FS_ERR_CORRECT_ENABLE      (1<<11)
3934
#define  FDI_FE_ERR_CORRECT_ENABLE      (1<<10)
3922
#define  FDI_FE_ERR_CORRECT_ENABLE      (1<<10)
3935
#define  FDI_FS_ERR_REPORT_ENABLE       (1<<9)
3923
#define  FDI_FS_ERR_REPORT_ENABLE       (1<<9)
Line 4018... Line 4006...
4018
 
4006
 
4019
#define PCH_LVDS	0xe1180
4007
#define PCH_LVDS	0xe1180
Line 4020... Line 4008...
4020
#define  LVDS_DETECTED	(1 << 1)
4008
#define  LVDS_DETECTED	(1 << 1)
4021
 
4009
 
4022
/* vlv has 2 sets of panel control regs. */
4010
/* vlv has 2 sets of panel control regs. */
4023
#define PIPEA_PP_STATUS         0x61200
4011
#define PIPEA_PP_STATUS         (VLV_DISPLAY_BASE + 0x61200)
4024
#define PIPEA_PP_CONTROL        0x61204
4012
#define PIPEA_PP_CONTROL        (VLV_DISPLAY_BASE + 0x61204)
4025
#define PIPEA_PP_ON_DELAYS      0x61208
4013
#define PIPEA_PP_ON_DELAYS      (VLV_DISPLAY_BASE + 0x61208)
4026
#define PIPEA_PP_OFF_DELAYS     0x6120c
4014
#define PIPEA_PP_OFF_DELAYS     (VLV_DISPLAY_BASE + 0x6120c)
4027
#define PIPEA_PP_DIVISOR        0x61210
4015
#define PIPEA_PP_DIVISOR        (VLV_DISPLAY_BASE + 0x61210)
4028
 
4016
 
4029
#define PIPEB_PP_STATUS         0x61300
4017
#define PIPEB_PP_STATUS         (VLV_DISPLAY_BASE + 0x61300)
4030
#define PIPEB_PP_CONTROL        0x61304
4018
#define PIPEB_PP_CONTROL        (VLV_DISPLAY_BASE + 0x61304)
4031
#define PIPEB_PP_ON_DELAYS      0x61308
4019
#define PIPEB_PP_ON_DELAYS      (VLV_DISPLAY_BASE + 0x61308)
Line 4032... Line 4020...
4032
#define PIPEB_PP_OFF_DELAYS     0x6130c
4020
#define PIPEB_PP_OFF_DELAYS     (VLV_DISPLAY_BASE + 0x6130c)
4033
#define PIPEB_PP_DIVISOR        0x61310
4021
#define PIPEB_PP_DIVISOR        (VLV_DISPLAY_BASE + 0x61310)
4034
 
4022
 
4035
#define PCH_PP_STATUS		0xc7200
4023
#define PCH_PP_STATUS		0xc7200
Line 4209... Line 4197...
4209
#define   GEN6_RC_CTL_HW_ENABLE			(1<<31)
4197
#define   GEN6_RC_CTL_HW_ENABLE			(1<<31)
4210
#define GEN6_RP_DOWN_TIMEOUT			0xA010
4198
#define GEN6_RP_DOWN_TIMEOUT			0xA010
4211
#define GEN6_RP_INTERRUPT_LIMITS		0xA014
4199
#define GEN6_RP_INTERRUPT_LIMITS		0xA014
4212
#define GEN6_RPSTAT1				0xA01C
4200
#define GEN6_RPSTAT1				0xA01C
4213
#define   GEN6_CAGF_SHIFT			8
4201
#define   GEN6_CAGF_SHIFT			8
-
 
4202
#define   HSW_CAGF_SHIFT			7
4214
#define   GEN6_CAGF_MASK			(0x7f << GEN6_CAGF_SHIFT)
4203
#define   GEN6_CAGF_MASK			(0x7f << GEN6_CAGF_SHIFT)
-
 
4204
#define   HSW_CAGF_MASK				(0x7f << HSW_CAGF_SHIFT)
4215
#define GEN6_RP_CONTROL				0xA024
4205
#define GEN6_RP_CONTROL				0xA024
4216
#define   GEN6_RP_MEDIA_TURBO			(1<<11)
4206
#define   GEN6_RP_MEDIA_TURBO			(1<<11)
4217
#define   GEN6_RP_MEDIA_MODE_MASK		(3<<9)
4207
#define   GEN6_RP_MEDIA_MODE_MASK		(3<<9)
4218
#define   GEN6_RP_MEDIA_HW_TURBO_MODE		(3<<9)
4208
#define   GEN6_RP_MEDIA_HW_TURBO_MODE		(3<<9)
4219
#define   GEN6_RP_MEDIA_HW_NORMAL_MODE		(2<<9)
4209
#define   GEN6_RP_MEDIA_HW_NORMAL_MODE		(2<<9)
Line 4278... Line 4268...
4278
#define   GEN6_READ_OC_PARAMS			0xc
4268
#define   GEN6_READ_OC_PARAMS			0xc
4279
#define   GEN6_PCODE_WRITE_MIN_FREQ_TABLE	0x8
4269
#define   GEN6_PCODE_WRITE_MIN_FREQ_TABLE	0x8
4280
#define   GEN6_PCODE_READ_MIN_FREQ_TABLE	0x9
4270
#define   GEN6_PCODE_READ_MIN_FREQ_TABLE	0x9
4281
#define	  GEN6_PCODE_WRITE_RC6VIDS		0x4
4271
#define	  GEN6_PCODE_WRITE_RC6VIDS		0x4
4282
#define	  GEN6_PCODE_READ_RC6VIDS		0x5
4272
#define	  GEN6_PCODE_READ_RC6VIDS		0x5
4283
#define   GEN6_ENCODE_RC6_VID(mv)		(((mv) / 5) - 245) < 0 ?: 0
4273
#define   GEN6_ENCODE_RC6_VID(mv)		(((mv) - 245) / 5)
4284
#define   GEN6_DECODE_RC6_VID(vids)		(((vids) * 5) > 0 ? ((vids) * 5) + 245 : 0)
4274
#define   GEN6_DECODE_RC6_VID(vids)		(((vids) * 5) + 245)
4285
#define GEN6_PCODE_DATA				0x138128
4275
#define GEN6_PCODE_DATA				0x138128
4286
#define   GEN6_PCODE_FREQ_IA_RATIO_SHIFT	8
4276
#define   GEN6_PCODE_FREQ_IA_RATIO_SHIFT	8
Line 4287... Line 4277...
4287
 
4277
 
4288
#define GEN6_GT_CORE_STATUS		0x138060
4278
#define GEN6_GT_CORE_STATUS		0x138060
Line 4320... Line 4310...
4320
 
4310
 
4321
#define GEN7_ROW_CHICKEN2		0xe4f4
4311
#define GEN7_ROW_CHICKEN2		0xe4f4
4322
#define GEN7_ROW_CHICKEN2_GT2		0xf4f4
4312
#define GEN7_ROW_CHICKEN2_GT2		0xf4f4
Line 4323... Line 4313...
4323
#define   DOP_CLOCK_GATING_DISABLE	(1<<0)
4313
#define   DOP_CLOCK_GATING_DISABLE	(1<<0)
4324
 
4314
 
4325
#define G4X_AUD_VID_DID			0x62020
4315
#define G4X_AUD_VID_DID			(dev_priv->info->display_mmio_offset + 0x62020)
4326
#define INTEL_AUDIO_DEVCL		0x808629FB
4316
#define INTEL_AUDIO_DEVCL		0x808629FB
Line 4327... Line 4317...
4327
#define INTEL_AUDIO_DEVBLC		0x80862801
4317
#define INTEL_AUDIO_DEVBLC		0x80862801
Line 4436... Line 4426...
4436
#define   AUDIO_CP_READY_A		(1<<1)
4426
#define   AUDIO_CP_READY_A		(1<<1)
4437
#define   AUDIO_CP_READY_B		(1<<5)
4427
#define   AUDIO_CP_READY_B		(1<<5)
4438
#define   AUDIO_CP_READY_C		(1<<9)
4428
#define   AUDIO_CP_READY_C		(1<<9)
Line 4439... Line 4429...
4439
 
4429
 
4440
/* HSW Power Wells */
4430
/* HSW Power Wells */
4441
#define HSW_PWR_WELL_CTL1		0x45400		/* BIOS */
4431
#define HSW_PWR_WELL_BIOS			0x45400 /* CTL1 */
4442
#define HSW_PWR_WELL_CTL2		0x45404		/* Driver */
4432
#define HSW_PWR_WELL_DRIVER			0x45404 /* CTL2 */
4443
#define HSW_PWR_WELL_CTL3		0x45408		/* KVMR */
4433
#define HSW_PWR_WELL_KVMR			0x45408 /* CTL3 */
4444
#define HSW_PWR_WELL_CTL4		0x4540C		/* Debug */
4434
#define HSW_PWR_WELL_DEBUG			0x4540C /* CTL4 */
4445
#define   HSW_PWR_WELL_ENABLE				(1<<31)
4435
#define   HSW_PWR_WELL_ENABLE				(1<<31)
4446
#define   HSW_PWR_WELL_STATE				(1<<30)
4436
#define   HSW_PWR_WELL_STATE				(1<<30)
4447
#define HSW_PWR_WELL_CTL5		0x45410
4437
#define HSW_PWR_WELL_CTL5		0x45410
4448
#define   HSW_PWR_WELL_ENABLE_SINGLE_STEP	(1<<31)
4438
#define   HSW_PWR_WELL_ENABLE_SINGLE_STEP	(1<<31)
Line 4522... Line 4512...
4522
#define  DDI_BUF_EMP_600MV_3_5DB_HSW	(5<<24)   /* Sel5 */
4512
#define  DDI_BUF_EMP_600MV_3_5DB_HSW	(5<<24)   /* Sel5 */
4523
#define  DDI_BUF_EMP_600MV_6DB_HSW		(6<<24)   /* Sel6 */
4513
#define  DDI_BUF_EMP_600MV_6DB_HSW		(6<<24)   /* Sel6 */
4524
#define  DDI_BUF_EMP_800MV_0DB_HSW		(7<<24)   /* Sel7 */
4514
#define  DDI_BUF_EMP_800MV_0DB_HSW		(7<<24)   /* Sel7 */
4525
#define  DDI_BUF_EMP_800MV_3_5DB_HSW	(8<<24)   /* Sel8 */
4515
#define  DDI_BUF_EMP_800MV_3_5DB_HSW	(8<<24)   /* Sel8 */
4526
#define  DDI_BUF_EMP_MASK				(0xf<<24)
4516
#define  DDI_BUF_EMP_MASK				(0xf<<24)
-
 
4517
#define  DDI_BUF_PORT_REVERSAL			(1<<16)
4527
#define  DDI_BUF_IS_IDLE				(1<<7)
4518
#define  DDI_BUF_IS_IDLE				(1<<7)
4528
#define  DDI_A_4_LANES				(1<<4)
4519
#define  DDI_A_4_LANES				(1<<4)
4529
#define  DDI_PORT_WIDTH_X1				(0<<1)
4520
#define  DDI_PORT_WIDTH_X1				(0<<1)
4530
#define  DDI_PORT_WIDTH_X2				(1<<1)
4521
#define  DDI_PORT_WIDTH_X2				(1<<1)
4531
#define  DDI_PORT_WIDTH_X4				(3<<1)
4522
#define  DDI_PORT_WIDTH_X4				(3<<1)
Line 4655... Line 4646...
4655
#define WM_DBG				0x45280
4646
#define WM_DBG				0x45280
4656
#define  WM_DBG_DISALLOW_MULTIPLE_LP	(1<<0)
4647
#define  WM_DBG_DISALLOW_MULTIPLE_LP	(1<<0)
4657
#define  WM_DBG_DISALLOW_MAXFIFO	(1<<1)
4648
#define  WM_DBG_DISALLOW_MAXFIFO	(1<<1)
4658
#define  WM_DBG_DISALLOW_SPRITE		(1<<2)
4649
#define  WM_DBG_DISALLOW_SPRITE		(1<<2)
Line -... Line 4650...
-
 
4650
 
-
 
4651
/* pipe CSC */
-
 
4652
#define _PIPE_A_CSC_COEFF_RY_GY	0x49010
-
 
4653
#define _PIPE_A_CSC_COEFF_BY	0x49014
-
 
4654
#define _PIPE_A_CSC_COEFF_RU_GU	0x49018
-
 
4655
#define _PIPE_A_CSC_COEFF_BU	0x4901c
-
 
4656
#define _PIPE_A_CSC_COEFF_RV_GV	0x49020
-
 
4657
#define _PIPE_A_CSC_COEFF_BV	0x49024
-
 
4658
#define _PIPE_A_CSC_MODE	0x49028
-
 
4659
#define _PIPE_A_CSC_PREOFF_HI	0x49030
-
 
4660
#define _PIPE_A_CSC_PREOFF_ME	0x49034
-
 
4661
#define _PIPE_A_CSC_PREOFF_LO	0x49038
-
 
4662
#define _PIPE_A_CSC_POSTOFF_HI	0x49040
-
 
4663
#define _PIPE_A_CSC_POSTOFF_ME	0x49044
-
 
4664
#define _PIPE_A_CSC_POSTOFF_LO	0x49048
-
 
4665
 
-
 
4666
#define _PIPE_B_CSC_COEFF_RY_GY	0x49110
-
 
4667
#define _PIPE_B_CSC_COEFF_BY	0x49114
-
 
4668
#define _PIPE_B_CSC_COEFF_RU_GU	0x49118
-
 
4669
#define _PIPE_B_CSC_COEFF_BU	0x4911c
-
 
4670
#define _PIPE_B_CSC_COEFF_RV_GV	0x49120
-
 
4671
#define _PIPE_B_CSC_COEFF_BV	0x49124
-
 
4672
#define _PIPE_B_CSC_MODE	0x49128
-
 
4673
#define _PIPE_B_CSC_PREOFF_HI	0x49130
-
 
4674
#define _PIPE_B_CSC_PREOFF_ME	0x49134
-
 
4675
#define _PIPE_B_CSC_PREOFF_LO	0x49138
-
 
4676
#define _PIPE_B_CSC_POSTOFF_HI	0x49140
-
 
4677
#define _PIPE_B_CSC_POSTOFF_ME	0x49144
-
 
4678
#define _PIPE_B_CSC_POSTOFF_LO	0x49148
-
 
4679
 
-
 
4680
#define CSC_BLACK_SCREEN_OFFSET (1 << 2)
-
 
4681
#define CSC_POSITION_BEFORE_GAMMA (1 << 1)
-
 
4682
#define CSC_MODE_YUV_TO_RGB (1 << 0)
-
 
4683
 
-
 
4684
#define PIPE_CSC_COEFF_RY_GY(pipe) _PIPE(pipe, _PIPE_A_CSC_COEFF_RY_GY, _PIPE_B_CSC_COEFF_RY_GY)
-
 
4685
#define PIPE_CSC_COEFF_BY(pipe) _PIPE(pipe, _PIPE_A_CSC_COEFF_BY, _PIPE_B_CSC_COEFF_BY)
-
 
4686
#define PIPE_CSC_COEFF_RU_GU(pipe) _PIPE(pipe, _PIPE_A_CSC_COEFF_RU_GU, _PIPE_B_CSC_COEFF_RU_GU)
-
 
4687
#define PIPE_CSC_COEFF_BU(pipe) _PIPE(pipe, _PIPE_A_CSC_COEFF_BU, _PIPE_B_CSC_COEFF_BU)
-
 
4688
#define PIPE_CSC_COEFF_RV_GV(pipe) _PIPE(pipe, _PIPE_A_CSC_COEFF_RV_GV, _PIPE_B_CSC_COEFF_RV_GV)
-
 
4689
#define PIPE_CSC_COEFF_BV(pipe) _PIPE(pipe, _PIPE_A_CSC_COEFF_BV, _PIPE_B_CSC_COEFF_BV)
-
 
4690
#define PIPE_CSC_MODE(pipe) _PIPE(pipe, _PIPE_A_CSC_MODE, _PIPE_B_CSC_MODE)
-
 
4691
#define PIPE_CSC_PREOFF_HI(pipe) _PIPE(pipe, _PIPE_A_CSC_PREOFF_HI, _PIPE_B_CSC_PREOFF_HI)
-
 
4692
#define PIPE_CSC_PREOFF_ME(pipe) _PIPE(pipe, _PIPE_A_CSC_PREOFF_ME, _PIPE_B_CSC_PREOFF_ME)
-
 
4693
#define PIPE_CSC_PREOFF_LO(pipe) _PIPE(pipe, _PIPE_A_CSC_PREOFF_LO, _PIPE_B_CSC_PREOFF_LO)
-
 
4694
#define PIPE_CSC_POSTOFF_HI(pipe) _PIPE(pipe, _PIPE_A_CSC_POSTOFF_HI, _PIPE_B_CSC_POSTOFF_HI)
-
 
4695
#define PIPE_CSC_POSTOFF_ME(pipe) _PIPE(pipe, _PIPE_A_CSC_POSTOFF_ME, _PIPE_B_CSC_POSTOFF_ME)
-
 
4696
#define PIPE_CSC_POSTOFF_LO(pipe) _PIPE(pipe, _PIPE_A_CSC_POSTOFF_LO, _PIPE_B_CSC_POSTOFF_LO)
4659
 
4697