summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2010-01-07 07:12:00 (GMT)
committerAlex Deucher <alexdeucher@gmail.com>2010-01-07 07:12:00 (GMT)
commit958d073869404f60e56dc0cc70b3e7de85904694 (patch)
tree881b649107a61ab9411af93fdf1ab006c24e2f77
parent944ae73f7cd5f9a1622b38e06a58565812cb102f (diff)
radeon: add initial support for eDP (embedded DisplayPort)
Should fix fdo bug 25931
-rw-r--r--src/atombios_output.c5
-rw-r--r--src/radeon_atombios.c2
-rw-r--r--src/radeon_output.c24
-rw-r--r--src/radeon_probe.h1
4 files changed, 29 insertions, 3 deletions
diff --git a/src/atombios_output.c b/src/atombios_output.c
index 8047b53..024fa4c 100644
--- a/src/atombios_output.c
+++ b/src/atombios_output.c
@@ -446,6 +446,7 @@ atombios_get_encoder_mode(xf86OutputPtr output)
return ATOM_ENCODER_MODE_LVDS;
break;
case CONNECTOR_DISPLAY_PORT:
+ case CONNECTOR_EDP:
if (radeon_output->MonType == MT_DP)
return ATOM_ENCODER_MODE_DP;
else
@@ -1347,7 +1348,9 @@ atombios_output_dpms(xf86OutputPtr output, int mode)
radeon_encoder->devices |= radeon_output->active_device;
if (is_dig) {
atombios_output_dig_transmitter_setup(output, ATOM_TRANSMITTER_ACTION_ENABLE_OUTPUT, 0, 0);
- if (radeon_output->ConnectorType == CONNECTOR_DISPLAY_PORT && radeon_output->MonType == MT_DP) {
+ if (((radeon_output->ConnectorType == CONNECTOR_DISPLAY_PORT) ||
+ (radeon_output->ConnectorType == CONNECTOR_EDP)) &&
+ (radeon_output->MonType == MT_DP)) {
do_displayport_link_train(output);
}
}
diff --git a/src/radeon_atombios.c b/src/radeon_atombios.c
index c272c9a..b19e653 100644
--- a/src/radeon_atombios.c
+++ b/src/radeon_atombios.c
@@ -1453,6 +1453,8 @@ const int object_connector_convert[] =
CONNECTOR_NONE,
CONNECTOR_NONE,
CONNECTOR_DISPLAY_PORT,
+ CONNECTOR_EDP,
+ CONNECTOR_NONE,
};
xf86MonPtr radeon_atom_get_edid(xf86OutputPtr output)
diff --git a/src/radeon_output.c b/src/radeon_output.c
index 107955d..722c36e 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -306,7 +306,8 @@ radeon_ddc_connected(xf86OutputPtr output)
if (radeon_output->custom_edid) {
MonInfo = xnfcalloc(sizeof(xf86Monitor), 1);
*MonInfo = *radeon_output->custom_mon;
- } else if (radeon_output->ConnectorType == CONNECTOR_DISPLAY_PORT) {
+ } else if ((radeon_output->ConnectorType == CONNECTOR_DISPLAY_PORT) ||
+ (radeon_output->ConnectorType == CONNECTOR_EDP)) {
MonInfo = xf86OutputGetEDID(output, radeon_output->dp_pI2CBus);
} else if (radeon_output->pI2CBus) {
if (info->get_hardcoded_edid_from_bios)
@@ -363,6 +364,7 @@ radeon_ddc_connected(xf86OutputPtr output)
MonType = MT_DFP;
break;
case CONNECTOR_DISPLAY_PORT:
+ case CONNECTOR_EDP:
/*
* XXX wrong. need to infer based on whether we got DDC from I2C
* or AUXCH.
@@ -540,6 +542,9 @@ radeon_mode_valid(xf86OutputPtr output, DisplayModePtr pMode)
if (radeon_output->ConnectorType == CONNECTOR_DISPLAY_PORT)
return MODE_CLOCK_HIGH;
+ if (radeon_output->ConnectorType == CONNECTOR_EDP)
+ return MODE_CLOCK_HIGH;
+
/* XXX some HDMI can do better than 165MHz on a link */
if (radeon_output->ConnectorType == CONNECTOR_HDMI_TYPE_A)
return MODE_CLOCK_HIGH;
@@ -669,7 +674,9 @@ radeon_mode_fixup(xf86OutputPtr output, DisplayModePtr mode,
}
}
- if (radeon_output->ConnectorType == CONNECTOR_DISPLAY_PORT && radeon_output->MonType == MT_DP) {
+ if (((radeon_output->ConnectorType == CONNECTOR_DISPLAY_PORT) ||
+ (radeon_output->ConnectorType == CONNECTOR_EDP)) &&
+ (radeon_output->MonType == MT_DP)) {
radeon_dp_mode_fixup(output, mode, adjusted_mode);
}
return TRUE;
@@ -1230,6 +1237,7 @@ radeon_detect(xf86OutputPtr output)
radeon_output->MonType = MT_CV;
break;
case CONNECTOR_DISPLAY_PORT:
+ case CONNECTOR_EDP:
radeon_output->MonType = MT_DP;
break;
}
@@ -2089,6 +2097,13 @@ void RADEONInitConnector(xf86OutputPtr output)
RADEON_DP_GetSinkType(output);
}
+ if (radeon_output->ConnectorType == CONNECTOR_EDP) {
+ strcpy(radeon_output->dp_bus_name, output->name);
+ strcat(radeon_output->dp_bus_name, "-eDP");
+ RADEON_DP_I2CInit(pScrn, &radeon_output->dp_pI2CBus, radeon_output->dp_bus_name, output);
+ RADEON_DP_GetSinkType(output);
+ }
+
if (radeon_output->ddc_i2c.valid)
RADEONI2CInit(pScrn, &radeon_output->pI2CBus, output->name, &radeon_output->ddc_i2c);
@@ -2754,6 +2769,7 @@ Bool RADEONSetupConnectors(ScrnInfoPtr pScrn)
int num_dvi = 0;
int num_hdmi = 0;
int num_dp = 0;
+ int num_edp = 0;
/* We first get the information about all connectors from BIOS.
* This is how the card is phyiscally wired up.
@@ -2902,6 +2918,8 @@ Bool RADEONSetupConnectors(ScrnInfoPtr pScrn)
num_hdmi++;
} else if (conntype == CONNECTOR_DISPLAY_PORT) {
num_dp++;
+ } else if (conntype == CONNECTOR_EDP) {
+ num_edp++;
}
}
}
@@ -2945,6 +2963,8 @@ Bool RADEONSetupConnectors(ScrnInfoPtr pScrn)
output = RADEONOutputCreate(pScrn, "HDMI-%d", --num_hdmi);
} else if (conntype == CONNECTOR_DISPLAY_PORT) {
output = RADEONOutputCreate(pScrn, "DisplayPort-%d", --num_dp);
+ } else if (conntype == CONNECTOR_EDP) {
+ output = RADEONOutputCreate(pScrn, "eDP-%d", --num_edp);
} else {
output = RADEONOutputCreate(pScrn,
ConnectorTypeName[conntype], 0);
diff --git a/src/radeon_probe.h b/src/radeon_probe.h
index 46bd1f5..8007a00 100644
--- a/src/radeon_probe.h
+++ b/src/radeon_probe.h
@@ -87,6 +87,7 @@ typedef enum
CONNECTOR_0XD,
CONNECTOR_DIN,
CONNECTOR_DISPLAY_PORT,
+ CONNECTOR_EDP,
CONNECTOR_UNSUPPORTED
} RADEONConnectorType;