diff options
Diffstat (limited to 'drivers/gpu/drm/i915/i915_reg.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_reg.h | 616 |
1 files changed, 613 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 375569d01d01..f6237a0b1133 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h | |||
@@ -450,6 +450,13 @@ | |||
450 | #define PLLB_REF_INPUT_SPREADSPECTRUMIN (3 << 13) | 450 | #define PLLB_REF_INPUT_SPREADSPECTRUMIN (3 << 13) |
451 | #define PLL_REF_INPUT_MASK (3 << 13) | 451 | #define PLL_REF_INPUT_MASK (3 << 13) |
452 | #define PLL_LOAD_PULSE_PHASE_SHIFT 9 | 452 | #define PLL_LOAD_PULSE_PHASE_SHIFT 9 |
453 | /* IGDNG */ | ||
454 | # define PLL_REF_SDVO_HDMI_MULTIPLIER_SHIFT 9 | ||
455 | # define PLL_REF_SDVO_HDMI_MULTIPLIER_MASK (7 << 9) | ||
456 | # define PLL_REF_SDVO_HDMI_MULTIPLIER(x) (((x)-1) << 9) | ||
457 | # define DPLL_FPA1_P1_POST_DIV_SHIFT 0 | ||
458 | # define DPLL_FPA1_P1_POST_DIV_MASK 0xff | ||
459 | |||
453 | /* | 460 | /* |
454 | * Parallel to Serial Load Pulse phase selection. | 461 | * Parallel to Serial Load Pulse phase selection. |
455 | * Selects the phase for the 10X DPLL clock for the PCIe | 462 | * Selects the phase for the 10X DPLL clock for the PCIe |
@@ -631,8 +638,11 @@ | |||
631 | /* Hotplug control (945+ only) */ | 638 | /* Hotplug control (945+ only) */ |
632 | #define PORT_HOTPLUG_EN 0x61110 | 639 | #define PORT_HOTPLUG_EN 0x61110 |
633 | #define HDMIB_HOTPLUG_INT_EN (1 << 29) | 640 | #define HDMIB_HOTPLUG_INT_EN (1 << 29) |
641 | #define DPB_HOTPLUG_INT_EN (1 << 29) | ||
634 | #define HDMIC_HOTPLUG_INT_EN (1 << 28) | 642 | #define HDMIC_HOTPLUG_INT_EN (1 << 28) |
643 | #define DPC_HOTPLUG_INT_EN (1 << 28) | ||
635 | #define HDMID_HOTPLUG_INT_EN (1 << 27) | 644 | #define HDMID_HOTPLUG_INT_EN (1 << 27) |
645 | #define DPD_HOTPLUG_INT_EN (1 << 27) | ||
636 | #define SDVOB_HOTPLUG_INT_EN (1 << 26) | 646 | #define SDVOB_HOTPLUG_INT_EN (1 << 26) |
637 | #define SDVOC_HOTPLUG_INT_EN (1 << 25) | 647 | #define SDVOC_HOTPLUG_INT_EN (1 << 25) |
638 | #define TV_HOTPLUG_INT_EN (1 << 18) | 648 | #define TV_HOTPLUG_INT_EN (1 << 18) |
@@ -665,8 +675,11 @@ | |||
665 | 675 | ||
666 | #define PORT_HOTPLUG_STAT 0x61114 | 676 | #define PORT_HOTPLUG_STAT 0x61114 |
667 | #define HDMIB_HOTPLUG_INT_STATUS (1 << 29) | 677 | #define HDMIB_HOTPLUG_INT_STATUS (1 << 29) |
678 | #define DPB_HOTPLUG_INT_STATUS (1 << 29) | ||
668 | #define HDMIC_HOTPLUG_INT_STATUS (1 << 28) | 679 | #define HDMIC_HOTPLUG_INT_STATUS (1 << 28) |
680 | #define DPC_HOTPLUG_INT_STATUS (1 << 28) | ||
669 | #define HDMID_HOTPLUG_INT_STATUS (1 << 27) | 681 | #define HDMID_HOTPLUG_INT_STATUS (1 << 27) |
682 | #define DPD_HOTPLUG_INT_STATUS (1 << 27) | ||
670 | #define CRT_HOTPLUG_INT_STATUS (1 << 11) | 683 | #define CRT_HOTPLUG_INT_STATUS (1 << 11) |
671 | #define TV_HOTPLUG_INT_STATUS (1 << 10) | 684 | #define TV_HOTPLUG_INT_STATUS (1 << 10) |
672 | #define CRT_HOTPLUG_MONITOR_MASK (3 << 8) | 685 | #define CRT_HOTPLUG_MONITOR_MASK (3 << 8) |
@@ -951,15 +964,15 @@ | |||
951 | # define DAC_A_1_3_V (0 << 4) | 964 | # define DAC_A_1_3_V (0 << 4) |
952 | # define DAC_A_1_1_V (1 << 4) | 965 | # define DAC_A_1_1_V (1 << 4) |
953 | # define DAC_A_0_7_V (2 << 4) | 966 | # define DAC_A_0_7_V (2 << 4) |
954 | # define DAC_A_OFF (3 << 4) | 967 | # define DAC_A_MASK (3 << 4) |
955 | # define DAC_B_1_3_V (0 << 2) | 968 | # define DAC_B_1_3_V (0 << 2) |
956 | # define DAC_B_1_1_V (1 << 2) | 969 | # define DAC_B_1_1_V (1 << 2) |
957 | # define DAC_B_0_7_V (2 << 2) | 970 | # define DAC_B_0_7_V (2 << 2) |
958 | # define DAC_B_OFF (3 << 2) | 971 | # define DAC_B_MASK (3 << 2) |
959 | # define DAC_C_1_3_V (0 << 0) | 972 | # define DAC_C_1_3_V (0 << 0) |
960 | # define DAC_C_1_1_V (1 << 0) | 973 | # define DAC_C_1_1_V (1 << 0) |
961 | # define DAC_C_0_7_V (2 << 0) | 974 | # define DAC_C_0_7_V (2 << 0) |
962 | # define DAC_C_OFF (3 << 0) | 975 | # define DAC_C_MASK (3 << 0) |
963 | 976 | ||
964 | /** | 977 | /** |
965 | * CSC coefficients are stored in a floating point format with 9 bits of | 978 | * CSC coefficients are stored in a floating point format with 9 bits of |
@@ -1328,6 +1341,163 @@ | |||
1328 | #define TV_V_CHROMA_0 0x68400 | 1341 | #define TV_V_CHROMA_0 0x68400 |
1329 | #define TV_V_CHROMA_42 0x684a8 | 1342 | #define TV_V_CHROMA_42 0x684a8 |
1330 | 1343 | ||
1344 | /* Display Port */ | ||
1345 | #define DP_B 0x64100 | ||
1346 | #define DP_C 0x64200 | ||
1347 | #define DP_D 0x64300 | ||
1348 | |||
1349 | #define DP_PORT_EN (1 << 31) | ||
1350 | #define DP_PIPEB_SELECT (1 << 30) | ||
1351 | |||
1352 | /* Link training mode - select a suitable mode for each stage */ | ||
1353 | #define DP_LINK_TRAIN_PAT_1 (0 << 28) | ||
1354 | #define DP_LINK_TRAIN_PAT_2 (1 << 28) | ||
1355 | #define DP_LINK_TRAIN_PAT_IDLE (2 << 28) | ||
1356 | #define DP_LINK_TRAIN_OFF (3 << 28) | ||
1357 | #define DP_LINK_TRAIN_MASK (3 << 28) | ||
1358 | #define DP_LINK_TRAIN_SHIFT 28 | ||
1359 | |||
1360 | /* Signal voltages. These are mostly controlled by the other end */ | ||
1361 | #define DP_VOLTAGE_0_4 (0 << 25) | ||
1362 | #define DP_VOLTAGE_0_6 (1 << 25) | ||
1363 | #define DP_VOLTAGE_0_8 (2 << 25) | ||
1364 | #define DP_VOLTAGE_1_2 (3 << 25) | ||
1365 | #define DP_VOLTAGE_MASK (7 << 25) | ||
1366 | #define DP_VOLTAGE_SHIFT 25 | ||
1367 | |||
1368 | /* Signal pre-emphasis levels, like voltages, the other end tells us what | ||
1369 | * they want | ||
1370 | */ | ||
1371 | #define DP_PRE_EMPHASIS_0 (0 << 22) | ||
1372 | #define DP_PRE_EMPHASIS_3_5 (1 << 22) | ||
1373 | #define DP_PRE_EMPHASIS_6 (2 << 22) | ||
1374 | #define DP_PRE_EMPHASIS_9_5 (3 << 22) | ||
1375 | #define DP_PRE_EMPHASIS_MASK (7 << 22) | ||
1376 | #define DP_PRE_EMPHASIS_SHIFT 22 | ||
1377 | |||
1378 | /* How many wires to use. I guess 3 was too hard */ | ||
1379 | #define DP_PORT_WIDTH_1 (0 << 19) | ||
1380 | #define DP_PORT_WIDTH_2 (1 << 19) | ||
1381 | #define DP_PORT_WIDTH_4 (3 << 19) | ||
1382 | #define DP_PORT_WIDTH_MASK (7 << 19) | ||
1383 | |||
1384 | /* Mystic DPCD version 1.1 special mode */ | ||
1385 | #define DP_ENHANCED_FRAMING (1 << 18) | ||
1386 | |||
1387 | /** locked once port is enabled */ | ||
1388 | #define DP_PORT_REVERSAL (1 << 15) | ||
1389 | |||
1390 | /** sends the clock on lane 15 of the PEG for debug */ | ||
1391 | #define DP_CLOCK_OUTPUT_ENABLE (1 << 13) | ||
1392 | |||
1393 | #define DP_SCRAMBLING_DISABLE (1 << 12) | ||
1394 | |||
1395 | /** limit RGB values to avoid confusing TVs */ | ||
1396 | #define DP_COLOR_RANGE_16_235 (1 << 8) | ||
1397 | |||
1398 | /** Turn on the audio link */ | ||
1399 | #define DP_AUDIO_OUTPUT_ENABLE (1 << 6) | ||
1400 | |||
1401 | /** vs and hs sync polarity */ | ||
1402 | #define DP_SYNC_VS_HIGH (1 << 4) | ||
1403 | #define DP_SYNC_HS_HIGH (1 << 3) | ||
1404 | |||
1405 | /** A fantasy */ | ||
1406 | #define DP_DETECTED (1 << 2) | ||
1407 | |||
1408 | /** The aux channel provides a way to talk to the | ||
1409 | * signal sink for DDC etc. Max packet size supported | ||
1410 | * is 20 bytes in each direction, hence the 5 fixed | ||
1411 | * data registers | ||
1412 | */ | ||
1413 | #define DPB_AUX_CH_CTL 0x64110 | ||
1414 | #define DPB_AUX_CH_DATA1 0x64114 | ||
1415 | #define DPB_AUX_CH_DATA2 0x64118 | ||
1416 | #define DPB_AUX_CH_DATA3 0x6411c | ||
1417 | #define DPB_AUX_CH_DATA4 0x64120 | ||
1418 | #define DPB_AUX_CH_DATA5 0x64124 | ||
1419 | |||
1420 | #define DPC_AUX_CH_CTL 0x64210 | ||
1421 | #define DPC_AUX_CH_DATA1 0x64214 | ||
1422 | #define DPC_AUX_CH_DATA2 0x64218 | ||
1423 | #define DPC_AUX_CH_DATA3 0x6421c | ||
1424 | #define DPC_AUX_CH_DATA4 0x64220 | ||
1425 | #define DPC_AUX_CH_DATA5 0x64224 | ||
1426 | |||
1427 | #define DPD_AUX_CH_CTL 0x64310 | ||
1428 | #define DPD_AUX_CH_DATA1 0x64314 | ||
1429 | #define DPD_AUX_CH_DATA2 0x64318 | ||
1430 | #define DPD_AUX_CH_DATA3 0x6431c | ||
1431 | #define DPD_AUX_CH_DATA4 0x64320 | ||
1432 | #define DPD_AUX_CH_DATA5 0x64324 | ||
1433 | |||
1434 | #define DP_AUX_CH_CTL_SEND_BUSY (1 << 31) | ||
1435 | #define DP_AUX_CH_CTL_DONE (1 << 30) | ||
1436 | #define DP_AUX_CH_CTL_INTERRUPT (1 << 29) | ||
1437 | #define DP_AUX_CH_CTL_TIME_OUT_ERROR (1 << 28) | ||
1438 | #define DP_AUX_CH_CTL_TIME_OUT_400us (0 << 26) | ||
1439 | #define DP_AUX_CH_CTL_TIME_OUT_600us (1 << 26) | ||
1440 | #define DP_AUX_CH_CTL_TIME_OUT_800us (2 << 26) | ||
1441 | #define DP_AUX_CH_CTL_TIME_OUT_1600us (3 << 26) | ||
1442 | #define DP_AUX_CH_CTL_TIME_OUT_MASK (3 << 26) | ||
1443 | #define DP_AUX_CH_CTL_RECEIVE_ERROR (1 << 25) | ||
1444 | #define DP_AUX_CH_CTL_MESSAGE_SIZE_MASK (0x1f << 20) | ||
1445 | #define DP_AUX_CH_CTL_MESSAGE_SIZE_SHIFT 20 | ||
1446 | #define DP_AUX_CH_CTL_PRECHARGE_2US_MASK (0xf << 16) | ||
1447 | #define DP_AUX_CH_CTL_PRECHARGE_2US_SHIFT 16 | ||
1448 | #define DP_AUX_CH_CTL_AUX_AKSV_SELECT (1 << 15) | ||
1449 | #define DP_AUX_CH_CTL_MANCHESTER_TEST (1 << 14) | ||
1450 | #define DP_AUX_CH_CTL_SYNC_TEST (1 << 13) | ||
1451 | #define DP_AUX_CH_CTL_DEGLITCH_TEST (1 << 12) | ||
1452 | #define DP_AUX_CH_CTL_PRECHARGE_TEST (1 << 11) | ||
1453 | #define DP_AUX_CH_CTL_BIT_CLOCK_2X_MASK (0x7ff) | ||
1454 | #define DP_AUX_CH_CTL_BIT_CLOCK_2X_SHIFT 0 | ||
1455 | |||
1456 | /* | ||
1457 | * Computing GMCH M and N values for the Display Port link | ||
1458 | * | ||
1459 | * GMCH M/N = dot clock * bytes per pixel / ls_clk * # of lanes | ||
1460 | * | ||
1461 | * ls_clk (we assume) is the DP link clock (1.62 or 2.7 GHz) | ||
1462 | * | ||
1463 | * The GMCH value is used internally | ||
1464 | * | ||
1465 | * bytes_per_pixel is the number of bytes coming out of the plane, | ||
1466 | * which is after the LUTs, so we want the bytes for our color format. | ||
1467 | * For our current usage, this is always 3, one byte for R, G and B. | ||
1468 | */ | ||
1469 | #define PIPEA_GMCH_DATA_M 0x70050 | ||
1470 | #define PIPEB_GMCH_DATA_M 0x71050 | ||
1471 | |||
1472 | /* Transfer unit size for display port - 1, default is 0x3f (for TU size 64) */ | ||
1473 | #define PIPE_GMCH_DATA_M_TU_SIZE_MASK (0x3f << 25) | ||
1474 | #define PIPE_GMCH_DATA_M_TU_SIZE_SHIFT 25 | ||
1475 | |||
1476 | #define PIPE_GMCH_DATA_M_MASK (0xffffff) | ||
1477 | |||
1478 | #define PIPEA_GMCH_DATA_N 0x70054 | ||
1479 | #define PIPEB_GMCH_DATA_N 0x71054 | ||
1480 | #define PIPE_GMCH_DATA_N_MASK (0xffffff) | ||
1481 | |||
1482 | /* | ||
1483 | * Computing Link M and N values for the Display Port link | ||
1484 | * | ||
1485 | * Link M / N = pixel_clock / ls_clk | ||
1486 | * | ||
1487 | * (the DP spec calls pixel_clock the 'strm_clk') | ||
1488 | * | ||
1489 | * The Link value is transmitted in the Main Stream | ||
1490 | * Attributes and VB-ID. | ||
1491 | */ | ||
1492 | |||
1493 | #define PIPEA_DP_LINK_M 0x70060 | ||
1494 | #define PIPEB_DP_LINK_M 0x71060 | ||
1495 | #define PIPEA_DP_LINK_M_MASK (0xffffff) | ||
1496 | |||
1497 | #define PIPEA_DP_LINK_N 0x70064 | ||
1498 | #define PIPEB_DP_LINK_N 0x71064 | ||
1499 | #define PIPEA_DP_LINK_N_MASK (0xffffff) | ||
1500 | |||
1331 | /* Display & cursor control */ | 1501 | /* Display & cursor control */ |
1332 | 1502 | ||
1333 | /* Pipe A */ | 1503 | /* Pipe A */ |
@@ -1517,4 +1687,444 @@ | |||
1517 | # define VGA_2X_MODE (1 << 30) | 1687 | # define VGA_2X_MODE (1 << 30) |
1518 | # define VGA_PIPE_B_SELECT (1 << 29) | 1688 | # define VGA_PIPE_B_SELECT (1 << 29) |
1519 | 1689 | ||
1690 | /* IGDNG */ | ||
1691 | |||
1692 | #define CPU_VGACNTRL 0x41000 | ||
1693 | |||
1694 | #define DIGITAL_PORT_HOTPLUG_CNTRL 0x44030 | ||
1695 | #define DIGITAL_PORTA_HOTPLUG_ENABLE (1 << 4) | ||
1696 | #define DIGITAL_PORTA_SHORT_PULSE_2MS (0 << 2) | ||
1697 | #define DIGITAL_PORTA_SHORT_PULSE_4_5MS (1 << 2) | ||
1698 | #define DIGITAL_PORTA_SHORT_PULSE_6MS (2 << 2) | ||
1699 | #define DIGITAL_PORTA_SHORT_PULSE_100MS (3 << 2) | ||
1700 | #define DIGITAL_PORTA_NO_DETECT (0 << 0) | ||
1701 | #define DIGITAL_PORTA_LONG_PULSE_DETECT_MASK (1 << 1) | ||
1702 | #define DIGITAL_PORTA_SHORT_PULSE_DETECT_MASK (1 << 0) | ||
1703 | |||
1704 | /* refresh rate hardware control */ | ||
1705 | #define RR_HW_CTL 0x45300 | ||
1706 | #define RR_HW_LOW_POWER_FRAMES_MASK 0xff | ||
1707 | #define RR_HW_HIGH_POWER_FRAMES_MASK 0xff00 | ||
1708 | |||
1709 | #define FDI_PLL_BIOS_0 0x46000 | ||
1710 | #define FDI_PLL_BIOS_1 0x46004 | ||
1711 | #define FDI_PLL_BIOS_2 0x46008 | ||
1712 | #define DISPLAY_PORT_PLL_BIOS_0 0x4600c | ||
1713 | #define DISPLAY_PORT_PLL_BIOS_1 0x46010 | ||
1714 | #define DISPLAY_PORT_PLL_BIOS_2 0x46014 | ||
1715 | |||
1716 | #define FDI_PLL_FREQ_CTL 0x46030 | ||
1717 | #define FDI_PLL_FREQ_CHANGE_REQUEST (1<<24) | ||
1718 | #define FDI_PLL_FREQ_LOCK_LIMIT_MASK 0xfff00 | ||
1719 | #define FDI_PLL_FREQ_DISABLE_COUNT_LIMIT_MASK 0xff | ||
1720 | |||
1721 | |||
1722 | #define PIPEA_DATA_M1 0x60030 | ||
1723 | #define TU_SIZE(x) (((x)-1) << 25) /* default size 64 */ | ||
1724 | #define TU_SIZE_MASK 0x7e000000 | ||
1725 | #define PIPEA_DATA_M1_OFFSET 0 | ||
1726 | #define PIPEA_DATA_N1 0x60034 | ||
1727 | #define PIPEA_DATA_N1_OFFSET 0 | ||
1728 | |||
1729 | #define PIPEA_DATA_M2 0x60038 | ||
1730 | #define PIPEA_DATA_M2_OFFSET 0 | ||
1731 | #define PIPEA_DATA_N2 0x6003c | ||
1732 | #define PIPEA_DATA_N2_OFFSET 0 | ||
1733 | |||
1734 | #define PIPEA_LINK_M1 0x60040 | ||
1735 | #define PIPEA_LINK_M1_OFFSET 0 | ||
1736 | #define PIPEA_LINK_N1 0x60044 | ||
1737 | #define PIPEA_LINK_N1_OFFSET 0 | ||
1738 | |||
1739 | #define PIPEA_LINK_M2 0x60048 | ||
1740 | #define PIPEA_LINK_M2_OFFSET 0 | ||
1741 | #define PIPEA_LINK_N2 0x6004c | ||
1742 | #define PIPEA_LINK_N2_OFFSET 0 | ||
1743 | |||
1744 | /* PIPEB timing regs are same start from 0x61000 */ | ||
1745 | |||
1746 | #define PIPEB_DATA_M1 0x61030 | ||
1747 | #define PIPEB_DATA_M1_OFFSET 0 | ||
1748 | #define PIPEB_DATA_N1 0x61034 | ||
1749 | #define PIPEB_DATA_N1_OFFSET 0 | ||
1750 | |||
1751 | #define PIPEB_DATA_M2 0x61038 | ||
1752 | #define PIPEB_DATA_M2_OFFSET 0 | ||
1753 | #define PIPEB_DATA_N2 0x6103c | ||
1754 | #define PIPEB_DATA_N2_OFFSET 0 | ||
1755 | |||
1756 | #define PIPEB_LINK_M1 0x61040 | ||
1757 | #define PIPEB_LINK_M1_OFFSET 0 | ||
1758 | #define PIPEB_LINK_N1 0x61044 | ||
1759 | #define PIPEB_LINK_N1_OFFSET 0 | ||
1760 | |||
1761 | #define PIPEB_LINK_M2 0x61048 | ||
1762 | #define PIPEB_LINK_M2_OFFSET 0 | ||
1763 | #define PIPEB_LINK_N2 0x6104c | ||
1764 | #define PIPEB_LINK_N2_OFFSET 0 | ||
1765 | |||
1766 | /* CPU panel fitter */ | ||
1767 | #define PFA_CTL_1 0x68080 | ||
1768 | #define PFB_CTL_1 0x68880 | ||
1769 | #define PF_ENABLE (1<<31) | ||
1770 | |||
1771 | /* legacy palette */ | ||
1772 | #define LGC_PALETTE_A 0x4a000 | ||
1773 | #define LGC_PALETTE_B 0x4a800 | ||
1774 | |||
1775 | /* interrupts */ | ||
1776 | #define DE_MASTER_IRQ_CONTROL (1 << 31) | ||
1777 | #define DE_SPRITEB_FLIP_DONE (1 << 29) | ||
1778 | #define DE_SPRITEA_FLIP_DONE (1 << 28) | ||
1779 | #define DE_PLANEB_FLIP_DONE (1 << 27) | ||
1780 | #define DE_PLANEA_FLIP_DONE (1 << 26) | ||
1781 | #define DE_PCU_EVENT (1 << 25) | ||
1782 | #define DE_GTT_FAULT (1 << 24) | ||
1783 | #define DE_POISON (1 << 23) | ||
1784 | #define DE_PERFORM_COUNTER (1 << 22) | ||
1785 | #define DE_PCH_EVENT (1 << 21) | ||
1786 | #define DE_AUX_CHANNEL_A (1 << 20) | ||
1787 | #define DE_DP_A_HOTPLUG (1 << 19) | ||
1788 | #define DE_GSE (1 << 18) | ||
1789 | #define DE_PIPEB_VBLANK (1 << 15) | ||
1790 | #define DE_PIPEB_EVEN_FIELD (1 << 14) | ||
1791 | #define DE_PIPEB_ODD_FIELD (1 << 13) | ||
1792 | #define DE_PIPEB_LINE_COMPARE (1 << 12) | ||
1793 | #define DE_PIPEB_VSYNC (1 << 11) | ||
1794 | #define DE_PIPEB_FIFO_UNDERRUN (1 << 8) | ||
1795 | #define DE_PIPEA_VBLANK (1 << 7) | ||
1796 | #define DE_PIPEA_EVEN_FIELD (1 << 6) | ||
1797 | #define DE_PIPEA_ODD_FIELD (1 << 5) | ||
1798 | #define DE_PIPEA_LINE_COMPARE (1 << 4) | ||
1799 | #define DE_PIPEA_VSYNC (1 << 3) | ||
1800 | #define DE_PIPEA_FIFO_UNDERRUN (1 << 0) | ||
1801 | |||
1802 | #define DEISR 0x44000 | ||
1803 | #define DEIMR 0x44004 | ||
1804 | #define DEIIR 0x44008 | ||
1805 | #define DEIER 0x4400c | ||
1806 | |||
1807 | /* GT interrupt */ | ||
1808 | #define GT_SYNC_STATUS (1 << 2) | ||
1809 | #define GT_USER_INTERRUPT (1 << 0) | ||
1810 | |||
1811 | #define GTISR 0x44010 | ||
1812 | #define GTIMR 0x44014 | ||
1813 | #define GTIIR 0x44018 | ||
1814 | #define GTIER 0x4401c | ||
1815 | |||
1816 | /* PCH */ | ||
1817 | |||
1818 | /* south display engine interrupt */ | ||
1819 | #define SDE_CRT_HOTPLUG (1 << 11) | ||
1820 | #define SDE_PORTD_HOTPLUG (1 << 10) | ||
1821 | #define SDE_PORTC_HOTPLUG (1 << 9) | ||
1822 | #define SDE_PORTB_HOTPLUG (1 << 8) | ||
1823 | #define SDE_SDVOB_HOTPLUG (1 << 6) | ||
1824 | |||
1825 | #define SDEISR 0xc4000 | ||
1826 | #define SDEIMR 0xc4004 | ||
1827 | #define SDEIIR 0xc4008 | ||
1828 | #define SDEIER 0xc400c | ||
1829 | |||
1830 | /* digital port hotplug */ | ||
1831 | #define PCH_PORT_HOTPLUG 0xc4030 | ||
1832 | #define PORTD_HOTPLUG_ENABLE (1 << 20) | ||
1833 | #define PORTD_PULSE_DURATION_2ms (0) | ||
1834 | #define PORTD_PULSE_DURATION_4_5ms (1 << 18) | ||
1835 | #define PORTD_PULSE_DURATION_6ms (2 << 18) | ||
1836 | #define PORTD_PULSE_DURATION_100ms (3 << 18) | ||
1837 | #define PORTD_HOTPLUG_NO_DETECT (0) | ||
1838 | #define PORTD_HOTPLUG_SHORT_DETECT (1 << 16) | ||
1839 | #define PORTD_HOTPLUG_LONG_DETECT (1 << 17) | ||
1840 | #define PORTC_HOTPLUG_ENABLE (1 << 12) | ||
1841 | #define PORTC_PULSE_DURATION_2ms (0) | ||
1842 | #define PORTC_PULSE_DURATION_4_5ms (1 << 10) | ||
1843 | #define PORTC_PULSE_DURATION_6ms (2 << 10) | ||
1844 | #define PORTC_PULSE_DURATION_100ms (3 << 10) | ||
1845 | #define PORTC_HOTPLUG_NO_DETECT (0) | ||
1846 | #define PORTC_HOTPLUG_SHORT_DETECT (1 << 8) | ||
1847 | #define PORTC_HOTPLUG_LONG_DETECT (1 << 9) | ||
1848 | #define PORTB_HOTPLUG_ENABLE (1 << 4) | ||
1849 | #define PORTB_PULSE_DURATION_2ms (0) | ||
1850 | #define PORTB_PULSE_DURATION_4_5ms (1 << 2) | ||
1851 | #define PORTB_PULSE_DURATION_6ms (2 << 2) | ||
1852 | #define PORTB_PULSE_DURATION_100ms (3 << 2) | ||
1853 | #define PORTB_HOTPLUG_NO_DETECT (0) | ||
1854 | #define PORTB_HOTPLUG_SHORT_DETECT (1 << 0) | ||
1855 | #define PORTB_HOTPLUG_LONG_DETECT (1 << 1) | ||
1856 | |||
1857 | #define PCH_GPIOA 0xc5010 | ||
1858 | #define PCH_GPIOB 0xc5014 | ||
1859 | #define PCH_GPIOC 0xc5018 | ||
1860 | #define PCH_GPIOD 0xc501c | ||
1861 | #define PCH_GPIOE 0xc5020 | ||
1862 | #define PCH_GPIOF 0xc5024 | ||
1863 | |||
1864 | #define PCH_DPLL_A 0xc6014 | ||
1865 | #define PCH_DPLL_B 0xc6018 | ||
1866 | |||
1867 | #define PCH_FPA0 0xc6040 | ||
1868 | #define PCH_FPA1 0xc6044 | ||
1869 | #define PCH_FPB0 0xc6048 | ||
1870 | #define PCH_FPB1 0xc604c | ||
1871 | |||
1872 | #define PCH_DPLL_TEST 0xc606c | ||
1873 | |||
1874 | #define PCH_DREF_CONTROL 0xC6200 | ||
1875 | #define DREF_CONTROL_MASK 0x7fc3 | ||
1876 | #define DREF_CPU_SOURCE_OUTPUT_DISABLE (0<<13) | ||
1877 | #define DREF_CPU_SOURCE_OUTPUT_DOWNSPREAD (2<<13) | ||
1878 | #define DREF_CPU_SOURCE_OUTPUT_NONSPREAD (3<<13) | ||
1879 | #define DREF_CPU_SOURCE_OUTPUT_MASK (3<<13) | ||
1880 | #define DREF_SSC_SOURCE_DISABLE (0<<11) | ||
1881 | #define DREF_SSC_SOURCE_ENABLE (2<<11) | ||
1882 | #define DREF_SSC_SOURCE_MASK (2<<11) | ||
1883 | #define DREF_NONSPREAD_SOURCE_DISABLE (0<<9) | ||
1884 | #define DREF_NONSPREAD_CK505_ENABLE (1<<9) | ||
1885 | #define DREF_NONSPREAD_SOURCE_ENABLE (2<<9) | ||
1886 | #define DREF_NONSPREAD_SOURCE_MASK (2<<9) | ||
1887 | #define DREF_SUPERSPREAD_SOURCE_DISABLE (0<<7) | ||
1888 | #define DREF_SUPERSPREAD_SOURCE_ENABLE (2<<7) | ||
1889 | #define DREF_SSC4_DOWNSPREAD (0<<6) | ||
1890 | #define DREF_SSC4_CENTERSPREAD (1<<6) | ||
1891 | #define DREF_SSC1_DISABLE (0<<1) | ||
1892 | #define DREF_SSC1_ENABLE (1<<1) | ||
1893 | #define DREF_SSC4_DISABLE (0) | ||
1894 | #define DREF_SSC4_ENABLE (1) | ||
1895 | |||
1896 | #define PCH_RAWCLK_FREQ 0xc6204 | ||
1897 | #define FDL_TP1_TIMER_SHIFT 12 | ||
1898 | #define FDL_TP1_TIMER_MASK (3<<12) | ||
1899 | #define FDL_TP2_TIMER_SHIFT 10 | ||
1900 | #define FDL_TP2_TIMER_MASK (3<<10) | ||
1901 | #define RAWCLK_FREQ_MASK 0x3ff | ||
1902 | |||
1903 | #define PCH_DPLL_TMR_CFG 0xc6208 | ||
1904 | |||
1905 | #define PCH_SSC4_PARMS 0xc6210 | ||
1906 | #define PCH_SSC4_AUX_PARMS 0xc6214 | ||
1907 | |||
1908 | /* transcoder */ | ||
1909 | |||
1910 | #define TRANS_HTOTAL_A 0xe0000 | ||
1911 | #define TRANS_HTOTAL_SHIFT 16 | ||
1912 | #define TRANS_HACTIVE_SHIFT 0 | ||
1913 | #define TRANS_HBLANK_A 0xe0004 | ||
1914 | #define TRANS_HBLANK_END_SHIFT 16 | ||
1915 | #define TRANS_HBLANK_START_SHIFT 0 | ||
1916 | #define TRANS_HSYNC_A 0xe0008 | ||
1917 | #define TRANS_HSYNC_END_SHIFT 16 | ||
1918 | #define TRANS_HSYNC_START_SHIFT 0 | ||
1919 | #define TRANS_VTOTAL_A 0xe000c | ||
1920 | #define TRANS_VTOTAL_SHIFT 16 | ||
1921 | #define TRANS_VACTIVE_SHIFT 0 | ||
1922 | #define TRANS_VBLANK_A 0xe0010 | ||
1923 | #define TRANS_VBLANK_END_SHIFT 16 | ||
1924 | #define TRANS_VBLANK_START_SHIFT 0 | ||
1925 | #define TRANS_VSYNC_A 0xe0014 | ||
1926 | #define TRANS_VSYNC_END_SHIFT 16 | ||
1927 | #define TRANS_VSYNC_START_SHIFT 0 | ||
1928 | |||
1929 | #define TRANSA_DATA_M1 0xe0030 | ||
1930 | #define TRANSA_DATA_N1 0xe0034 | ||
1931 | #define TRANSA_DATA_M2 0xe0038 | ||
1932 | #define TRANSA_DATA_N2 0xe003c | ||
1933 | #define TRANSA_DP_LINK_M1 0xe0040 | ||
1934 | #define TRANSA_DP_LINK_N1 0xe0044 | ||
1935 | #define TRANSA_DP_LINK_M2 0xe0048 | ||
1936 | #define TRANSA_DP_LINK_N2 0xe004c | ||
1937 | |||
1938 | #define TRANS_HTOTAL_B 0xe1000 | ||
1939 | #define TRANS_HBLANK_B 0xe1004 | ||
1940 | #define TRANS_HSYNC_B 0xe1008 | ||
1941 | #define TRANS_VTOTAL_B 0xe100c | ||
1942 | #define TRANS_VBLANK_B 0xe1010 | ||
1943 | #define TRANS_VSYNC_B 0xe1014 | ||
1944 | |||
1945 | #define TRANSB_DATA_M1 0xe1030 | ||
1946 | #define TRANSB_DATA_N1 0xe1034 | ||
1947 | #define TRANSB_DATA_M2 0xe1038 | ||
1948 | #define TRANSB_DATA_N2 0xe103c | ||
1949 | #define TRANSB_DP_LINK_M1 0xe1040 | ||
1950 | #define TRANSB_DP_LINK_N1 0xe1044 | ||
1951 | #define TRANSB_DP_LINK_M2 0xe1048 | ||
1952 | #define TRANSB_DP_LINK_N2 0xe104c | ||
1953 | |||
1954 | #define TRANSACONF 0xf0008 | ||
1955 | #define TRANSBCONF 0xf1008 | ||
1956 | #define TRANS_DISABLE (0<<31) | ||
1957 | #define TRANS_ENABLE (1<<31) | ||
1958 | #define TRANS_STATE_MASK (1<<30) | ||
1959 | #define TRANS_STATE_DISABLE (0<<30) | ||
1960 | #define TRANS_STATE_ENABLE (1<<30) | ||
1961 | #define TRANS_FSYNC_DELAY_HB1 (0<<27) | ||
1962 | #define TRANS_FSYNC_DELAY_HB2 (1<<27) | ||
1963 | #define TRANS_FSYNC_DELAY_HB3 (2<<27) | ||
1964 | #define TRANS_FSYNC_DELAY_HB4 (3<<27) | ||
1965 | #define TRANS_DP_AUDIO_ONLY (1<<26) | ||
1966 | #define TRANS_DP_VIDEO_AUDIO (0<<26) | ||
1967 | #define TRANS_PROGRESSIVE (0<<21) | ||
1968 | #define TRANS_8BPC (0<<5) | ||
1969 | #define TRANS_10BPC (1<<5) | ||
1970 | #define TRANS_6BPC (2<<5) | ||
1971 | #define TRANS_12BPC (3<<5) | ||
1972 | |||
1973 | #define FDI_RXA_CHICKEN 0xc200c | ||
1974 | #define FDI_RXB_CHICKEN 0xc2010 | ||
1975 | #define FDI_RX_PHASE_SYNC_POINTER_ENABLE (1) | ||
1976 | |||
1977 | /* CPU: FDI_TX */ | ||
1978 | #define FDI_TXA_CTL 0x60100 | ||
1979 | #define FDI_TXB_CTL 0x61100 | ||
1980 | #define FDI_TX_DISABLE (0<<31) | ||
1981 | #define FDI_TX_ENABLE (1<<31) | ||
1982 | #define FDI_LINK_TRAIN_PATTERN_1 (0<<28) | ||
1983 | #define FDI_LINK_TRAIN_PATTERN_2 (1<<28) | ||
1984 | #define FDI_LINK_TRAIN_PATTERN_IDLE (2<<28) | ||
1985 | #define FDI_LINK_TRAIN_NONE (3<<28) | ||
1986 | #define FDI_LINK_TRAIN_VOLTAGE_0_4V (0<<25) | ||
1987 | #define FDI_LINK_TRAIN_VOLTAGE_0_6V (1<<25) | ||
1988 | #define FDI_LINK_TRAIN_VOLTAGE_0_8V (2<<25) | ||
1989 | #define FDI_LINK_TRAIN_VOLTAGE_1_2V (3<<25) | ||
1990 | #define FDI_LINK_TRAIN_PRE_EMPHASIS_NONE (0<<22) | ||
1991 | #define FDI_LINK_TRAIN_PRE_EMPHASIS_1_5X (1<<22) | ||
1992 | #define FDI_LINK_TRAIN_PRE_EMPHASIS_2X (2<<22) | ||
1993 | #define FDI_LINK_TRAIN_PRE_EMPHASIS_3X (3<<22) | ||
1994 | #define FDI_DP_PORT_WIDTH_X1 (0<<19) | ||
1995 | #define FDI_DP_PORT_WIDTH_X2 (1<<19) | ||
1996 | #define FDI_DP_PORT_WIDTH_X3 (2<<19) | ||
1997 | #define FDI_DP_PORT_WIDTH_X4 (3<<19) | ||
1998 | #define FDI_TX_ENHANCE_FRAME_ENABLE (1<<18) | ||
1999 | /* IGDNG: hardwired to 1 */ | ||
2000 | #define FDI_TX_PLL_ENABLE (1<<14) | ||
2001 | /* both Tx and Rx */ | ||
2002 | #define FDI_SCRAMBLING_ENABLE (0<<7) | ||
2003 | #define FDI_SCRAMBLING_DISABLE (1<<7) | ||
2004 | |||
2005 | /* FDI_RX, FDI_X is hard-wired to Transcoder_X */ | ||
2006 | #define FDI_RXA_CTL 0xf000c | ||
2007 | #define FDI_RXB_CTL 0xf100c | ||
2008 | #define FDI_RX_ENABLE (1<<31) | ||
2009 | #define FDI_RX_DISABLE (0<<31) | ||
2010 | /* train, dp width same as FDI_TX */ | ||
2011 | #define FDI_DP_PORT_WIDTH_X8 (7<<19) | ||
2012 | #define FDI_8BPC (0<<16) | ||
2013 | #define FDI_10BPC (1<<16) | ||
2014 | #define FDI_6BPC (2<<16) | ||
2015 | #define FDI_12BPC (3<<16) | ||
2016 | #define FDI_LINK_REVERSE_OVERWRITE (1<<15) | ||
2017 | #define FDI_DMI_LINK_REVERSE_MASK (1<<14) | ||
2018 | #define FDI_RX_PLL_ENABLE (1<<13) | ||
2019 | #define FDI_FS_ERR_CORRECT_ENABLE (1<<11) | ||
2020 | #define FDI_FE_ERR_CORRECT_ENABLE (1<<10) | ||
2021 | #define FDI_FS_ERR_REPORT_ENABLE (1<<9) | ||
2022 | #define FDI_FE_ERR_REPORT_ENABLE (1<<8) | ||
2023 | #define FDI_RX_ENHANCE_FRAME_ENABLE (1<<6) | ||
2024 | #define FDI_SEL_RAWCLK (0<<4) | ||
2025 | #define FDI_SEL_PCDCLK (1<<4) | ||
2026 | |||
2027 | #define FDI_RXA_MISC 0xf0010 | ||
2028 | #define FDI_RXB_MISC 0xf1010 | ||
2029 | #define FDI_RXA_TUSIZE1 0xf0030 | ||
2030 | #define FDI_RXA_TUSIZE2 0xf0038 | ||
2031 | #define FDI_RXB_TUSIZE1 0xf1030 | ||
2032 | #define FDI_RXB_TUSIZE2 0xf1038 | ||
2033 | |||
2034 | /* FDI_RX interrupt register format */ | ||
2035 | #define FDI_RX_INTER_LANE_ALIGN (1<<10) | ||
2036 | #define FDI_RX_SYMBOL_LOCK (1<<9) /* train 2 */ | ||
2037 | #define FDI_RX_BIT_LOCK (1<<8) /* train 1 */ | ||
2038 | #define FDI_RX_TRAIN_PATTERN_2_FAIL (1<<7) | ||
2039 | #define FDI_RX_FS_CODE_ERR (1<<6) | ||
2040 | #define FDI_RX_FE_CODE_ERR (1<<5) | ||
2041 | #define FDI_RX_SYMBOL_ERR_RATE_ABOVE (1<<4) | ||
2042 | #define FDI_RX_HDCP_LINK_FAIL (1<<3) | ||
2043 | #define FDI_RX_PIXEL_FIFO_OVERFLOW (1<<2) | ||
2044 | #define FDI_RX_CROSS_CLOCK_OVERFLOW (1<<1) | ||
2045 | #define FDI_RX_SYMBOL_QUEUE_OVERFLOW (1<<0) | ||
2046 | |||
2047 | #define FDI_RXA_IIR 0xf0014 | ||
2048 | #define FDI_RXA_IMR 0xf0018 | ||
2049 | #define FDI_RXB_IIR 0xf1014 | ||
2050 | #define FDI_RXB_IMR 0xf1018 | ||
2051 | |||
2052 | #define FDI_PLL_CTL_1 0xfe000 | ||
2053 | #define FDI_PLL_CTL_2 0xfe004 | ||
2054 | |||
2055 | /* CRT */ | ||
2056 | #define PCH_ADPA 0xe1100 | ||
2057 | #define ADPA_TRANS_SELECT_MASK (1<<30) | ||
2058 | #define ADPA_TRANS_A_SELECT 0 | ||
2059 | #define ADPA_TRANS_B_SELECT (1<<30) | ||
2060 | #define ADPA_CRT_HOTPLUG_MASK 0x03ff0000 /* bit 25-16 */ | ||
2061 | #define ADPA_CRT_HOTPLUG_MONITOR_NONE (0<<24) | ||
2062 | #define ADPA_CRT_HOTPLUG_MONITOR_MASK (3<<24) | ||
2063 | #define ADPA_CRT_HOTPLUG_MONITOR_COLOR (3<<24) | ||
2064 | #define ADPA_CRT_HOTPLUG_MONITOR_MONO (2<<24) | ||
2065 | #define ADPA_CRT_HOTPLUG_ENABLE (1<<23) | ||
2066 | #define ADPA_CRT_HOTPLUG_PERIOD_64 (0<<22) | ||
2067 | #define ADPA_CRT_HOTPLUG_PERIOD_128 (1<<22) | ||
2068 | #define ADPA_CRT_HOTPLUG_WARMUP_5MS (0<<21) | ||
2069 | #define ADPA_CRT_HOTPLUG_WARMUP_10MS (1<<21) | ||
2070 | #define ADPA_CRT_HOTPLUG_SAMPLE_2S (0<<20) | ||
2071 | #define ADPA_CRT_HOTPLUG_SAMPLE_4S (1<<20) | ||
2072 | #define ADPA_CRT_HOTPLUG_VOLTAGE_40 (0<<18) | ||
2073 | #define ADPA_CRT_HOTPLUG_VOLTAGE_50 (1<<18) | ||
2074 | #define ADPA_CRT_HOTPLUG_VOLTAGE_60 (2<<18) | ||
2075 | #define ADPA_CRT_HOTPLUG_VOLTAGE_70 (3<<18) | ||
2076 | #define ADPA_CRT_HOTPLUG_VOLREF_325MV (0<<17) | ||
2077 | #define ADPA_CRT_HOTPLUG_VOLREF_475MV (1<<17) | ||
2078 | #define ADPA_CRT_HOTPLUG_FORCE_TRIGGER (1<<16) | ||
2079 | |||
2080 | /* or SDVOB */ | ||
2081 | #define HDMIB 0xe1140 | ||
2082 | #define PORT_ENABLE (1 << 31) | ||
2083 | #define TRANSCODER_A (0) | ||
2084 | #define TRANSCODER_B (1 << 30) | ||
2085 | #define COLOR_FORMAT_8bpc (0) | ||
2086 | #define COLOR_FORMAT_12bpc (3 << 26) | ||
2087 | #define SDVOB_HOTPLUG_ENABLE (1 << 23) | ||
2088 | #define SDVO_ENCODING (0) | ||
2089 | #define TMDS_ENCODING (2 << 10) | ||
2090 | #define NULL_PACKET_VSYNC_ENABLE (1 << 9) | ||
2091 | #define SDVOB_BORDER_ENABLE (1 << 7) | ||
2092 | #define AUDIO_ENABLE (1 << 6) | ||
2093 | #define VSYNC_ACTIVE_HIGH (1 << 4) | ||
2094 | #define HSYNC_ACTIVE_HIGH (1 << 3) | ||
2095 | #define PORT_DETECTED (1 << 2) | ||
2096 | |||
2097 | #define HDMIC 0xe1150 | ||
2098 | #define HDMID 0xe1160 | ||
2099 | |||
2100 | #define PCH_LVDS 0xe1180 | ||
2101 | #define LVDS_DETECTED (1 << 1) | ||
2102 | |||
2103 | #define BLC_PWM_CPU_CTL2 0x48250 | ||
2104 | #define PWM_ENABLE (1 << 31) | ||
2105 | #define PWM_PIPE_A (0 << 29) | ||
2106 | #define PWM_PIPE_B (1 << 29) | ||
2107 | #define BLC_PWM_CPU_CTL 0x48254 | ||
2108 | |||
2109 | #define BLC_PWM_PCH_CTL1 0xc8250 | ||
2110 | #define PWM_PCH_ENABLE (1 << 31) | ||
2111 | #define PWM_POLARITY_ACTIVE_LOW (1 << 29) | ||
2112 | #define PWM_POLARITY_ACTIVE_HIGH (0 << 29) | ||
2113 | #define PWM_POLARITY_ACTIVE_LOW2 (1 << 28) | ||
2114 | #define PWM_POLARITY_ACTIVE_HIGH2 (0 << 28) | ||
2115 | |||
2116 | #define BLC_PWM_PCH_CTL2 0xc8254 | ||
2117 | |||
2118 | #define PCH_PP_STATUS 0xc7200 | ||
2119 | #define PCH_PP_CONTROL 0xc7204 | ||
2120 | #define EDP_FORCE_VDD (1 << 3) | ||
2121 | #define EDP_BLC_ENABLE (1 << 2) | ||
2122 | #define PANEL_POWER_RESET (1 << 1) | ||
2123 | #define PANEL_POWER_OFF (0 << 0) | ||
2124 | #define PANEL_POWER_ON (1 << 0) | ||
2125 | #define PCH_PP_ON_DELAYS 0xc7208 | ||
2126 | #define EDP_PANEL (1 << 30) | ||
2127 | #define PCH_PP_OFF_DELAYS 0xc720c | ||
2128 | #define PCH_PP_DIVISOR 0xc7210 | ||
2129 | |||
1520 | #endif /* _I915_REG_H_ */ | 2130 | #endif /* _I915_REG_H_ */ |