diff options
| author | Keith Packard <keithp@keithp.com> | 2009-05-30 23:42:33 -0400 |
|---|---|---|
| committer | Eric Anholt <eric@anholt.net> | 2009-06-05 10:12:59 -0400 |
| commit | 040d87f15a0129242463d3ed7c48381505f596e2 (patch) | |
| tree | 96d5271abb5b8b05feb03dc8861f48da9927df35 /drivers/gpu | |
| parent | 2245fda810f870dce9b030e6aa604320abba53a5 (diff) | |
drm/i915: Add Display Port register defines
This adds the register definitions for the display port enable register
along with those for the GMCH and Link M/N ratios required to drive display
port outputs.
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu')
| -rw-r--r-- | drivers/gpu/drm/i915/i915_reg.h | 163 |
1 files changed, 163 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 79df9e9c38e4..f6237a0b1133 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h | |||
| @@ -638,8 +638,11 @@ | |||
| 638 | /* Hotplug control (945+ only) */ | 638 | /* Hotplug control (945+ only) */ |
| 639 | #define PORT_HOTPLUG_EN 0x61110 | 639 | #define PORT_HOTPLUG_EN 0x61110 |
| 640 | #define HDMIB_HOTPLUG_INT_EN (1 << 29) | 640 | #define HDMIB_HOTPLUG_INT_EN (1 << 29) |
| 641 | #define DPB_HOTPLUG_INT_EN (1 << 29) | ||
| 641 | #define HDMIC_HOTPLUG_INT_EN (1 << 28) | 642 | #define HDMIC_HOTPLUG_INT_EN (1 << 28) |
| 643 | #define DPC_HOTPLUG_INT_EN (1 << 28) | ||
| 642 | #define HDMID_HOTPLUG_INT_EN (1 << 27) | 644 | #define HDMID_HOTPLUG_INT_EN (1 << 27) |
| 645 | #define DPD_HOTPLUG_INT_EN (1 << 27) | ||
| 643 | #define SDVOB_HOTPLUG_INT_EN (1 << 26) | 646 | #define SDVOB_HOTPLUG_INT_EN (1 << 26) |
| 644 | #define SDVOC_HOTPLUG_INT_EN (1 << 25) | 647 | #define SDVOC_HOTPLUG_INT_EN (1 << 25) |
| 645 | #define TV_HOTPLUG_INT_EN (1 << 18) | 648 | #define TV_HOTPLUG_INT_EN (1 << 18) |
| @@ -672,8 +675,11 @@ | |||
| 672 | 675 | ||
| 673 | #define PORT_HOTPLUG_STAT 0x61114 | 676 | #define PORT_HOTPLUG_STAT 0x61114 |
| 674 | #define HDMIB_HOTPLUG_INT_STATUS (1 << 29) | 677 | #define HDMIB_HOTPLUG_INT_STATUS (1 << 29) |
| 678 | #define DPB_HOTPLUG_INT_STATUS (1 << 29) | ||
| 675 | #define HDMIC_HOTPLUG_INT_STATUS (1 << 28) | 679 | #define HDMIC_HOTPLUG_INT_STATUS (1 << 28) |
| 680 | #define DPC_HOTPLUG_INT_STATUS (1 << 28) | ||
| 676 | #define HDMID_HOTPLUG_INT_STATUS (1 << 27) | 681 | #define HDMID_HOTPLUG_INT_STATUS (1 << 27) |
| 682 | #define DPD_HOTPLUG_INT_STATUS (1 << 27) | ||
| 677 | #define CRT_HOTPLUG_INT_STATUS (1 << 11) | 683 | #define CRT_HOTPLUG_INT_STATUS (1 << 11) |
| 678 | #define TV_HOTPLUG_INT_STATUS (1 << 10) | 684 | #define TV_HOTPLUG_INT_STATUS (1 << 10) |
| 679 | #define CRT_HOTPLUG_MONITOR_MASK (3 << 8) | 685 | #define CRT_HOTPLUG_MONITOR_MASK (3 << 8) |
| @@ -1335,6 +1341,163 @@ | |||
| 1335 | #define TV_V_CHROMA_0 0x68400 | 1341 | #define TV_V_CHROMA_0 0x68400 |
| 1336 | #define TV_V_CHROMA_42 0x684a8 | 1342 | #define TV_V_CHROMA_42 0x684a8 |
| 1337 | 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 | |||
| 1338 | /* Display & cursor control */ | 1501 | /* Display & cursor control */ |
| 1339 | 1502 | ||
| 1340 | /* Pipe A */ | 1503 | /* Pipe A */ |
