diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2010-01-07 02:12:00 -0500 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2010-01-07 02:12:00 -0500 |
commit | 958d073869404f60e56dc0cc70b3e7de85904694 (patch) | |
tree | 881b649107a61ab9411af93fdf1ab006c24e2f77 | |
parent | 944ae73f7cd5f9a1622b38e06a58565812cb102f (diff) |
radeon: add initial support for eDP (embedded DisplayPort)
Should fix fdo bug 25931
-rw-r--r-- | src/atombios_output.c | 5 | ||||
-rw-r--r-- | src/radeon_atombios.c | 2 | ||||
-rw-r--r-- | src/radeon_output.c | 24 | ||||
-rw-r--r-- | src/radeon_probe.h | 1 |
4 files changed, 29 insertions, 3 deletions
diff --git a/src/atombios_output.c b/src/atombios_output.c index 8047b534..024fa4c5 100644 --- a/src/atombios_output.c +++ b/src/atombios_output.c | |||
@@ -446,6 +446,7 @@ atombios_get_encoder_mode(xf86OutputPtr output) | |||
446 | return ATOM_ENCODER_MODE_LVDS; | 446 | return ATOM_ENCODER_MODE_LVDS; |
447 | break; | 447 | break; |
448 | case CONNECTOR_DISPLAY_PORT: | 448 | case CONNECTOR_DISPLAY_PORT: |
449 | case CONNECTOR_EDP: | ||
449 | if (radeon_output->MonType == MT_DP) | 450 | if (radeon_output->MonType == MT_DP) |
450 | return ATOM_ENCODER_MODE_DP; | 451 | return ATOM_ENCODER_MODE_DP; |
451 | else | 452 | else |
@@ -1347,7 +1348,9 @@ atombios_output_dpms(xf86OutputPtr output, int mode) | |||
1347 | radeon_encoder->devices |= radeon_output->active_device; | 1348 | radeon_encoder->devices |= radeon_output->active_device; |
1348 | if (is_dig) { | 1349 | if (is_dig) { |
1349 | atombios_output_dig_transmitter_setup(output, ATOM_TRANSMITTER_ACTION_ENABLE_OUTPUT, 0, 0); | 1350 | atombios_output_dig_transmitter_setup(output, ATOM_TRANSMITTER_ACTION_ENABLE_OUTPUT, 0, 0); |
1350 | if (radeon_output->ConnectorType == CONNECTOR_DISPLAY_PORT && radeon_output->MonType == MT_DP) { | 1351 | if (((radeon_output->ConnectorType == CONNECTOR_DISPLAY_PORT) || |
1352 | (radeon_output->ConnectorType == CONNECTOR_EDP)) && | ||
1353 | (radeon_output->MonType == MT_DP)) { | ||
1351 | do_displayport_link_train(output); | 1354 | do_displayport_link_train(output); |
1352 | } | 1355 | } |
1353 | } | 1356 | } |
diff --git a/src/radeon_atombios.c b/src/radeon_atombios.c index c272c9a5..b19e653c 100644 --- a/src/radeon_atombios.c +++ b/src/radeon_atombios.c | |||
@@ -1453,6 +1453,8 @@ const int object_connector_convert[] = | |||
1453 | CONNECTOR_NONE, | 1453 | CONNECTOR_NONE, |
1454 | CONNECTOR_NONE, | 1454 | CONNECTOR_NONE, |
1455 | CONNECTOR_DISPLAY_PORT, | 1455 | CONNECTOR_DISPLAY_PORT, |
1456 | CONNECTOR_EDP, | ||
1457 | CONNECTOR_NONE, | ||
1456 | }; | 1458 | }; |
1457 | 1459 | ||
1458 | xf86MonPtr radeon_atom_get_edid(xf86OutputPtr output) | 1460 | xf86MonPtr radeon_atom_get_edid(xf86OutputPtr output) |
diff --git a/src/radeon_output.c b/src/radeon_output.c index 107955d5..722c36e6 100644 --- a/src/radeon_output.c +++ b/src/radeon_output.c | |||
@@ -306,7 +306,8 @@ radeon_ddc_connected(xf86OutputPtr output) | |||
306 | if (radeon_output->custom_edid) { | 306 | if (radeon_output->custom_edid) { |
307 | MonInfo = xnfcalloc(sizeof(xf86Monitor), 1); | 307 | MonInfo = xnfcalloc(sizeof(xf86Monitor), 1); |
308 | *MonInfo = *radeon_output->custom_mon; | 308 | *MonInfo = *radeon_output->custom_mon; |
309 | } else if (radeon_output->ConnectorType == CONNECTOR_DISPLAY_PORT) { | 309 | } else if ((radeon_output->ConnectorType == CONNECTOR_DISPLAY_PORT) || |
310 | (radeon_output->ConnectorType == CONNECTOR_EDP)) { | ||
310 | MonInfo = xf86OutputGetEDID(output, radeon_output->dp_pI2CBus); | 311 | MonInfo = xf86OutputGetEDID(output, radeon_output->dp_pI2CBus); |
311 | } else if (radeon_output->pI2CBus) { | 312 | } else if (radeon_output->pI2CBus) { |
312 | if (info->get_hardcoded_edid_from_bios) | 313 | if (info->get_hardcoded_edid_from_bios) |
@@ -363,6 +364,7 @@ radeon_ddc_connected(xf86OutputPtr output) | |||
363 | MonType = MT_DFP; | 364 | MonType = MT_DFP; |
364 | break; | 365 | break; |
365 | case CONNECTOR_DISPLAY_PORT: | 366 | case CONNECTOR_DISPLAY_PORT: |
367 | case CONNECTOR_EDP: | ||
366 | /* | 368 | /* |
367 | * XXX wrong. need to infer based on whether we got DDC from I2C | 369 | * XXX wrong. need to infer based on whether we got DDC from I2C |
368 | * or AUXCH. | 370 | * or AUXCH. |
@@ -540,6 +542,9 @@ radeon_mode_valid(xf86OutputPtr output, DisplayModePtr pMode) | |||
540 | if (radeon_output->ConnectorType == CONNECTOR_DISPLAY_PORT) | 542 | if (radeon_output->ConnectorType == CONNECTOR_DISPLAY_PORT) |
541 | return MODE_CLOCK_HIGH; | 543 | return MODE_CLOCK_HIGH; |
542 | 544 | ||
545 | if (radeon_output->ConnectorType == CONNECTOR_EDP) | ||
546 | return MODE_CLOCK_HIGH; | ||
547 | |||
543 | /* XXX some HDMI can do better than 165MHz on a link */ | 548 | /* XXX some HDMI can do better than 165MHz on a link */ |
544 | if (radeon_output->ConnectorType == CONNECTOR_HDMI_TYPE_A) | 549 | if (radeon_output->ConnectorType == CONNECTOR_HDMI_TYPE_A) |
545 | return MODE_CLOCK_HIGH; | 550 | return MODE_CLOCK_HIGH; |
@@ -669,7 +674,9 @@ radeon_mode_fixup(xf86OutputPtr output, DisplayModePtr mode, | |||
669 | } | 674 | } |
670 | } | 675 | } |
671 | 676 | ||
672 | if (radeon_output->ConnectorType == CONNECTOR_DISPLAY_PORT && radeon_output->MonType == MT_DP) { | 677 | if (((radeon_output->ConnectorType == CONNECTOR_DISPLAY_PORT) || |
678 | (radeon_output->ConnectorType == CONNECTOR_EDP)) && | ||
679 | (radeon_output->MonType == MT_DP)) { | ||
673 | radeon_dp_mode_fixup(output, mode, adjusted_mode); | 680 | radeon_dp_mode_fixup(output, mode, adjusted_mode); |
674 | } | 681 | } |
675 | return TRUE; | 682 | return TRUE; |
@@ -1230,6 +1237,7 @@ radeon_detect(xf86OutputPtr output) | |||
1230 | radeon_output->MonType = MT_CV; | 1237 | radeon_output->MonType = MT_CV; |
1231 | break; | 1238 | break; |
1232 | case CONNECTOR_DISPLAY_PORT: | 1239 | case CONNECTOR_DISPLAY_PORT: |
1240 | case CONNECTOR_EDP: | ||
1233 | radeon_output->MonType = MT_DP; | 1241 | radeon_output->MonType = MT_DP; |
1234 | break; | 1242 | break; |
1235 | } | 1243 | } |
@@ -2089,6 +2097,13 @@ void RADEONInitConnector(xf86OutputPtr output) | |||
2089 | RADEON_DP_GetSinkType(output); | 2097 | RADEON_DP_GetSinkType(output); |
2090 | } | 2098 | } |
2091 | 2099 | ||
2100 | if (radeon_output->ConnectorType == CONNECTOR_EDP) { | ||
2101 | strcpy(radeon_output->dp_bus_name, output->name); | ||
2102 | strcat(radeon_output->dp_bus_name, "-eDP"); | ||
2103 | RADEON_DP_I2CInit(pScrn, &radeon_output->dp_pI2CBus, radeon_output->dp_bus_name, output); | ||
2104 | RADEON_DP_GetSinkType(output); | ||
2105 | } | ||
2106 | |||
2092 | if (radeon_output->ddc_i2c.valid) | 2107 | if (radeon_output->ddc_i2c.valid) |
2093 | RADEONI2CInit(pScrn, &radeon_output->pI2CBus, output->name, &radeon_output->ddc_i2c); | 2108 | RADEONI2CInit(pScrn, &radeon_output->pI2CBus, output->name, &radeon_output->ddc_i2c); |
2094 | 2109 | ||
@@ -2754,6 +2769,7 @@ Bool RADEONSetupConnectors(ScrnInfoPtr pScrn) | |||
2754 | int num_dvi = 0; | 2769 | int num_dvi = 0; |
2755 | int num_hdmi = 0; | 2770 | int num_hdmi = 0; |
2756 | int num_dp = 0; | 2771 | int num_dp = 0; |
2772 | int num_edp = 0; | ||
2757 | 2773 | ||
2758 | /* We first get the information about all connectors from BIOS. | 2774 | /* We first get the information about all connectors from BIOS. |
2759 | * This is how the card is phyiscally wired up. | 2775 | * This is how the card is phyiscally wired up. |
@@ -2902,6 +2918,8 @@ Bool RADEONSetupConnectors(ScrnInfoPtr pScrn) | |||
2902 | num_hdmi++; | 2918 | num_hdmi++; |
2903 | } else if (conntype == CONNECTOR_DISPLAY_PORT) { | 2919 | } else if (conntype == CONNECTOR_DISPLAY_PORT) { |
2904 | num_dp++; | 2920 | num_dp++; |
2921 | } else if (conntype == CONNECTOR_EDP) { | ||
2922 | num_edp++; | ||
2905 | } | 2923 | } |
2906 | } | 2924 | } |
2907 | } | 2925 | } |
@@ -2945,6 +2963,8 @@ Bool RADEONSetupConnectors(ScrnInfoPtr pScrn) | |||
2945 | output = RADEONOutputCreate(pScrn, "HDMI-%d", --num_hdmi); | 2963 | output = RADEONOutputCreate(pScrn, "HDMI-%d", --num_hdmi); |
2946 | } else if (conntype == CONNECTOR_DISPLAY_PORT) { | 2964 | } else if (conntype == CONNECTOR_DISPLAY_PORT) { |
2947 | output = RADEONOutputCreate(pScrn, "DisplayPort-%d", --num_dp); | 2965 | output = RADEONOutputCreate(pScrn, "DisplayPort-%d", --num_dp); |
2966 | } else if (conntype == CONNECTOR_EDP) { | ||
2967 | output = RADEONOutputCreate(pScrn, "eDP-%d", --num_edp); | ||
2948 | } else { | 2968 | } else { |
2949 | output = RADEONOutputCreate(pScrn, | 2969 | output = RADEONOutputCreate(pScrn, |
2950 | ConnectorTypeName[conntype], 0); | 2970 | ConnectorTypeName[conntype], 0); |
diff --git a/src/radeon_probe.h b/src/radeon_probe.h index 46bd1f59..8007a009 100644 --- a/src/radeon_probe.h +++ b/src/radeon_probe.h | |||
@@ -87,6 +87,7 @@ typedef enum | |||
87 | CONNECTOR_0XD, | 87 | CONNECTOR_0XD, |
88 | CONNECTOR_DIN, | 88 | CONNECTOR_DIN, |
89 | CONNECTOR_DISPLAY_PORT, | 89 | CONNECTOR_DISPLAY_PORT, |
90 | CONNECTOR_EDP, | ||
90 | CONNECTOR_UNSUPPORTED | 91 | CONNECTOR_UNSUPPORTED |
91 | } RADEONConnectorType; | 92 | } RADEONConnectorType; |
92 | 93 | ||