summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-01-06 17:41:22 -0500
committerAlex Deucher <alexdeucher@gmail.com>2009-01-06 17:41:22 -0500
commitc3fb8bb279959512a4ced644a64cc660c5cd97bd (patch)
tree02c2ad370524c81fdea9fc4cfa743849831af399 /src
parent9bb6b8ceaf772e1ce63610812a12260ee3860c27 (diff)
ATOM: rework encoder/transmitter setup
Diffstat (limited to 'src')
-rw-r--r--src/atombios_output.c227
-rw-r--r--src/radeon_atombios.c81
-rw-r--r--src/radeon_bios.c1
-rw-r--r--src/radeon_output.c31
-rw-r--r--src/radeon_probe.h12
5 files changed, 186 insertions, 166 deletions
diff --git a/src/atombios_output.c b/src/atombios_output.c
index 8a84e6bb..4877beb3 100644
--- a/src/atombios_output.c
+++ b/src/atombios_output.c
@@ -265,7 +265,7 @@ atombios_output_ddia_setup(xf86OutputPtr output, DisplayModePtr mode)
}
static int
-atombios_output_digital_setup(xf86OutputPtr output, int device, DisplayModePtr mode)
+atombios_output_digital_setup(xf86OutputPtr output, DisplayModePtr mode)
{
RADEONOutputPrivatePtr radeon_output = output->driver_private;
ScrnInfoPtr pScrn = output->scrn;
@@ -277,19 +277,13 @@ atombios_output_digital_setup(xf86OutputPtr output, int device, DisplayModePtr m
int index;
int major, minor;
- switch (device) {
- case ATOM_DEVICE_DFP1_INDEX:
- index = GetIndexIntoMasterTable(COMMAND, TMDS1EncoderControl);
- break;
- case ATOM_DEVICE_LCD1_INDEX:
+ if (radeon_output->type == OUTPUT_LVDS)
index = GetIndexIntoMasterTable(COMMAND, LVDSEncoderControl);
- break;
- case ATOM_DEVICE_DFP3_INDEX:
- index = GetIndexIntoMasterTable(COMMAND, TMDS2EncoderControl);
- break;
- default:
- return ATOM_NOT_IMPLEMENTED;
- break;
+ else {
+ if (radeon_output->TMDSType == TMDS_LVTMA)
+ index = GetIndexIntoMasterTable(COMMAND, TMDS2EncoderControl);
+ else
+ index = GetIndexIntoMasterTable(COMMAND, TMDS1EncoderControl);
}
atombios_get_command_table_version(info->atomBIOS, index, &major, &minor);
@@ -306,7 +300,7 @@ atombios_output_digital_setup(xf86OutputPtr output, int device, DisplayModePtr m
if (radeon_output->type == OUTPUT_HDMI)
disp_data.ucMisc |= PANEL_ENCODER_MISC_HDMI_TYPE;
disp_data.usPixelClock = cpu_to_le16(mode->Clock / 10);
- if (device == ATOM_DEVICE_LCD1_INDEX) {
+ if (radeon_output->MonType == MT_LCD) {
if (radeon_output->lvds_misc & (1 << 0))
disp_data.ucMisc |= PANEL_ENCODER_MISC_DUAL;
if (radeon_output->lvds_misc & (1 << 1))
@@ -338,7 +332,7 @@ atombios_output_digital_setup(xf86OutputPtr output, int device, DisplayModePtr m
disp_data2.ucSpatial = 0;
disp_data2.ucTemporal = 0;
disp_data2.ucFRC = 0;
- if (device == ATOM_DEVICE_LCD1_INDEX) {
+ if (radeon_output->type == OUTPUT_LVDS) {
if (radeon_output->lvds_misc & (1 << 0))
disp_data2.ucMisc |= PANEL_ENCODER_MISC_DUAL;
if (radeon_output->lvds_misc & (1 << 5)) {
@@ -398,7 +392,7 @@ atombios_maybe_hdmi_mode(xf86OutputPtr output)
}
static int
-atombios_output_dig_encoder_setup(xf86OutputPtr output, int device, DisplayModePtr mode)
+atombios_output_dig_encoder_setup(xf86OutputPtr output, DisplayModePtr mode)
{
RADEONOutputPrivatePtr radeon_output = output->driver_private;
RADEONCrtcPrivatePtr radeon_crtc = output->crtc->driver_private;
@@ -420,24 +414,29 @@ atombios_output_dig_encoder_setup(xf86OutputPtr output, int device, DisplayModeP
disp_data.usPixelClock = cpu_to_le16(mode->Clock / 10);
if (IS_DCE32_VARIANT) {
- if (radeon_output->TMDSType == TMDS_UNIPHY)
- disp_data.ucConfig = ATOM_ENCODER_CONFIG_V2_TRANSMITTER1;
- if (radeon_output->TMDSType == TMDS_UNIPHY1)
- disp_data.ucConfig = ATOM_ENCODER_CONFIG_V2_TRANSMITTER2;
- if (radeon_output->TMDSType == TMDS_UNIPHY2)
- disp_data.ucConfig = ATOM_ENCODER_CONFIG_V2_TRANSMITTER3;
+ if (radeon_output->type == OUTPUT_LVDS) {
+ if (radeon_output->LVDSType == LVDS_UNIPHY)
+ disp_data.ucConfig = ATOM_ENCODER_CONFIG_V2_TRANSMITTER1;
+ else if (radeon_output->LVDSType == LVDS_UNIPHY1)
+ disp_data.ucConfig = ATOM_ENCODER_CONFIG_V2_TRANSMITTER2;
+ else if (radeon_output->LVDSType == LVDS_UNIPHY2)
+ disp_data.ucConfig = ATOM_ENCODER_CONFIG_V2_TRANSMITTER3;
+ } else {
+ if (radeon_output->TMDSType == TMDS_UNIPHY)
+ disp_data.ucConfig = ATOM_ENCODER_CONFIG_V2_TRANSMITTER1;
+ else if (radeon_output->TMDSType == TMDS_UNIPHY1)
+ disp_data.ucConfig = ATOM_ENCODER_CONFIG_V2_TRANSMITTER2;
+ else if (radeon_output->TMDSType == TMDS_UNIPHY2)
+ disp_data.ucConfig = ATOM_ENCODER_CONFIG_V2_TRANSMITTER3;
+ }
} else {
- switch (device) {
- case ATOM_DEVICE_DFP1_INDEX:
- disp_data.ucConfig = ATOM_ENCODER_CONFIG_TRANSMITTER1;
- break;
- case ATOM_DEVICE_LCD1_INDEX:
- case ATOM_DEVICE_DFP3_INDEX:
+ if (radeon_output->type == OUTPUT_LVDS)
disp_data.ucConfig = ATOM_ENCODER_CONFIG_TRANSMITTER2;
- break;
- default:
- return ATOM_NOT_IMPLEMENTED;
- break;
+ else {
+ if (radeon_output->TMDSType == TMDS_LVTMA)
+ disp_data.ucConfig = ATOM_ENCODER_CONFIG_TRANSMITTER2;
+ else
+ disp_data.ucConfig = ATOM_ENCODER_CONFIG_TRANSMITTER1;
}
}
@@ -481,7 +480,7 @@ union dig_transmitter_control {
};
static int
-atombios_output_dig_transmitter_setup(xf86OutputPtr output, int device, DisplayModePtr mode)
+atombios_output_dig_transmitter_setup(xf86OutputPtr output, DisplayModePtr mode)
{
RADEONOutputPrivatePtr radeon_output = output->driver_private;
RADEONCrtcPrivatePtr radeon_crtc = output->crtc->driver_private;
@@ -496,19 +495,13 @@ atombios_output_dig_transmitter_setup(xf86OutputPtr output, int device, DisplayM
if (IS_DCE32_VARIANT)
index = GetIndexIntoMasterTable(COMMAND, UNIPHYTransmitterControl);
else {
- switch (device) {
- case ATOM_DEVICE_DFP1_INDEX:
- index = GetIndexIntoMasterTable(COMMAND, DIG1TransmitterControl);
- num = 1;
- break;
- case ATOM_DEVICE_LCD1_INDEX:
- case ATOM_DEVICE_DFP3_INDEX:
+ if (radeon_output->type == OUTPUT_LVDS)
index = GetIndexIntoMasterTable(COMMAND, DIG2TransmitterControl);
- num = 2;
- break;
- default:
- return ATOM_NOT_IMPLEMENTED;
- break;
+ else {
+ if (radeon_output->TMDSType == TMDS_LVTMA)
+ index = GetIndexIntoMasterTable(COMMAND, DIG2TransmitterControl);
+ else
+ index = GetIndexIntoMasterTable(COMMAND, DIG1TransmitterControl);
}
}
@@ -525,25 +518,45 @@ atombios_output_dig_transmitter_setup(xf86OutputPtr output, int device, DisplayM
}
if (radeon_crtc->crtc_id)
disp_data.v2.acConfig.ucEncoderSel = 1;
-
- switch (radeon_output->TMDSType) {
- case TMDS_UNIPHY:
- disp_data.v2.acConfig.ucTransmitterSel = 0;
- num = 0;
- break;
- case TMDS_UNIPHY1:
- disp_data.v2.acConfig.ucTransmitterSel = 1;
- num = 1;
- break;
- case TMDS_UNIPHY2:
- disp_data.v2.acConfig.ucTransmitterSel = 2;
- num = 2;
- break;
- default:
- return ATOM_NOT_IMPLEMENTED;
- break;
+
+ if (radeon_output->type == OUTPUT_LVDS) {
+ switch (radeon_output->LVDSType) {
+ case LVDS_UNIPHY:
+ disp_data.v2.acConfig.ucTransmitterSel = 0;
+ num = 0;
+ break;
+ case LVDS_UNIPHY1:
+ disp_data.v2.acConfig.ucTransmitterSel = 1;
+ num = 1;
+ break;
+ case LVDS_UNIPHY2:
+ disp_data.v2.acConfig.ucTransmitterSel = 2;
+ num = 2;
+ break;
+ default:
+ return ATOM_NOT_IMPLEMENTED;
+ break;
+ }
+ } else {
+ switch (radeon_output->TMDSType) {
+ case TMDS_UNIPHY:
+ disp_data.v2.acConfig.ucTransmitterSel = 0;
+ num = 0;
+ break;
+ case TMDS_UNIPHY1:
+ disp_data.v2.acConfig.ucTransmitterSel = 1;
+ num = 1;
+ break;
+ case TMDS_UNIPHY2:
+ disp_data.v2.acConfig.ucTransmitterSel = 2;
+ num = 2;
+ break;
+ default:
+ return ATOM_NOT_IMPLEMENTED;
+ break;
+ }
}
-
+
if (OUTPUT_IS_DVI || (radeon_output->type == OUTPUT_HDMI)) {
if (radeon_output->coherent_mode) {
disp_data.v2.acConfig.fCoherentMode = 1;
@@ -554,12 +567,12 @@ atombios_output_dig_transmitter_setup(xf86OutputPtr output, int device, DisplayM
} else {
disp_data.v1.ucConfig = ATOM_TRANSMITTER_CONFIG_CLKSRC_PPLL;
disp_data.v1.usPixelClock = cpu_to_le16((mode->Clock) / 10);
-
+
if (radeon_crtc->crtc_id)
disp_data.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_DIG2_ENCODER;
else
disp_data.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_DIG1_ENCODER;
-
+
if (OUTPUT_IS_DVI || (radeon_output->type == OUTPUT_HDMI)) {
if (radeon_output->coherent_mode) {
disp_data.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_COHERENT;
@@ -567,7 +580,7 @@ atombios_output_dig_transmitter_setup(xf86OutputPtr output, int device, DisplayM
} else
xf86DrvMsg(output->scrn->scrnIndex, X_INFO, "DIG%d transmitter: Coherent Mode disabled\n", num);
}
-
+
if (info->IsIGP && (radeon_output->TMDSType == TMDS_UNIPHY)) {
if (mode->Clock > 165000) {
disp_data.v1.ucConfig |= (ATOM_TRANSMITTER_CONFIG_8LANE_LINK |
@@ -591,15 +604,20 @@ atombios_output_dig_transmitter_setup(xf86OutputPtr output, int device, DisplayM
} else {
if (mode->Clock > 165000)
disp_data.v1.ucConfig |= (ATOM_TRANSMITTER_CONFIG_8LANE_LINK |
- ATOM_TRANSMITTER_CONFIG_LINKA_B |
- ATOM_TRANSMITTER_CONFIG_LANE_0_7);
- else
- disp_data.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_LINKA | ATOM_TRANSMITTER_CONFIG_LANE_0_3;
+ ATOM_TRANSMITTER_CONFIG_LINKA_B |
+ ATOM_TRANSMITTER_CONFIG_LANE_0_7);
+ else {
+ /* XXX */
+ if (radeon_output->linkb)
+ disp_data.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_LINKB | ATOM_TRANSMITTER_CONFIG_LANE_0_3;
+ else
+ disp_data.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_LINKA | ATOM_TRANSMITTER_CONFIG_LANE_0_3;
+ }
}
}
radeon_output->transmitter_config = disp_data.v1.ucConfig;
-
+
data.exec.index = index;
data.exec.dataSpace = (void *)&space;
data.exec.pspace = &disp_data;
@@ -722,7 +740,7 @@ atombios_dig_dpms(xf86OutputPtr output, int mode)
memset(&disp_data, 0, sizeof(disp_data));
- if ((radeon_output->MonType == MT_LCD) ||
+ if ((radeon_output->type == OUTPUT_LVDS) ||
(radeon_output->TMDSType == TMDS_LVTMA))
block = 2;
else
@@ -993,53 +1011,10 @@ atombios_output_mode_set(xf86OutputPtr output,
atombios_set_output_crtc_source(output);
if (radeon_output->MonType == MT_CRT) {
- if (radeon_output->devices & ATOM_DEVICE_CRT1_SUPPORT ||
- radeon_output->devices & ATOM_DEVICE_CRT2_SUPPORT) {
- if (radeon_output->DACType == DAC_PRIMARY)
- atombios_output_dac1_setup(output, adjusted_mode);
- else if (radeon_output->DACType == DAC_TVDAC)
- atombios_output_dac2_setup(output, adjusted_mode);
- }
- } else if (radeon_output->MonType == MT_DFP) {
- if (radeon_output->devices & ATOM_DEVICE_DFP1_SUPPORT) {
- if (IS_DCE3_VARIANT) {
- atombios_output_dig_encoder_setup(output, ATOM_DEVICE_DFP1_INDEX, adjusted_mode);
- atombios_output_dig_transmitter_setup(output, ATOM_DEVICE_DFP1_INDEX, adjusted_mode);
- } else
- atombios_output_digital_setup(output, ATOM_DEVICE_DFP1_INDEX, adjusted_mode);
- } else if (radeon_output->devices & ATOM_DEVICE_DFP2_SUPPORT) {
- if (IS_DCE32_VARIANT) {
- atombios_output_dig_encoder_setup(output, ATOM_DEVICE_DFP2_INDEX, adjusted_mode);
- atombios_output_dig_transmitter_setup(output, ATOM_DEVICE_DFP2_INDEX, adjusted_mode);
- } else {
- if ((info->ChipFamily == CHIP_FAMILY_RS600) ||
- (info->ChipFamily == CHIP_FAMILY_RS690) ||
- (info->ChipFamily == CHIP_FAMILY_RS740))
- atombios_output_ddia_setup(output, adjusted_mode);
- else
- atombios_external_tmds_setup(output, adjusted_mode);
- }
- } else if (radeon_output->devices & ATOM_DEVICE_DFP3_SUPPORT) {
- if (IS_DCE3_VARIANT) {
- atombios_output_dig_encoder_setup(output, ATOM_DEVICE_DFP3_INDEX, adjusted_mode);
- atombios_output_dig_transmitter_setup(output, ATOM_DEVICE_DFP3_INDEX, adjusted_mode);
- } else
- atombios_output_digital_setup(output, ATOM_DEVICE_DFP3_INDEX, adjusted_mode);
- } else if (radeon_output->devices & ATOM_DEVICE_DFP4_SUPPORT) {
- atombios_output_dig_encoder_setup(output, ATOM_DEVICE_DFP4_INDEX, adjusted_mode);
- atombios_output_dig_transmitter_setup(output, ATOM_DEVICE_DFP4_INDEX, adjusted_mode);
- } else if (radeon_output->devices & ATOM_DEVICE_DFP5_SUPPORT) {
- atombios_output_dig_encoder_setup(output, ATOM_DEVICE_DFP5_INDEX, adjusted_mode);
- atombios_output_dig_transmitter_setup(output, ATOM_DEVICE_DFP5_INDEX, adjusted_mode);
- }
- } else if (radeon_output->MonType == MT_LCD) {
- if (radeon_output->devices & ATOM_DEVICE_LCD1_SUPPORT) {
- if (IS_DCE3_VARIANT) {
- atombios_output_dig_encoder_setup(output, ATOM_DEVICE_LCD1_INDEX, adjusted_mode);
- atombios_output_dig_transmitter_setup(output, ATOM_DEVICE_LCD1_INDEX, adjusted_mode);
- } else
- atombios_output_digital_setup(output, ATOM_DEVICE_LCD1_INDEX, adjusted_mode);
- }
+ if (radeon_output->DACType == DAC_PRIMARY)
+ atombios_output_dac1_setup(output, adjusted_mode);
+ else if (radeon_output->DACType == DAC_TVDAC)
+ atombios_output_dac2_setup(output, adjusted_mode);
} else if ((radeon_output->MonType == MT_CTV) ||
(radeon_output->MonType == MT_STV) ||
(radeon_output->MonType == MT_CV)) {
@@ -1048,6 +1023,20 @@ atombios_output_mode_set(xf86OutputPtr output,
else if (radeon_output->DACType == DAC_TVDAC)
atombios_output_dac2_setup(output, adjusted_mode);
atombios_output_tv1_setup(output, adjusted_mode);
+ } else {
+ if (IS_DCE3_VARIANT) {
+ atombios_output_dig_encoder_setup(output, adjusted_mode);
+ atombios_output_dig_transmitter_setup(output, adjusted_mode);
+ } else if ((info->ChipFamily < CHIP_FAMILY_R600) &&
+ (radeon_output->devices & ATOM_DEVICE_DFP2_SUPPORT)) {
+ if ((info->ChipFamily == CHIP_FAMILY_RS600) ||
+ (info->ChipFamily == CHIP_FAMILY_RS690) ||
+ (info->ChipFamily == CHIP_FAMILY_RS740))
+ atombios_output_ddia_setup(output, adjusted_mode);
+ else
+ atombios_external_tmds_setup(output, adjusted_mode);
+ } else
+ atombios_output_digital_setup(output, adjusted_mode);
}
atombios_apply_output_quirks(output);
}
diff --git a/src/radeon_atombios.c b/src/radeon_atombios.c
index 717211e4..feebdba2 100644
--- a/src/radeon_atombios.c
+++ b/src/radeon_atombios.c
@@ -1666,43 +1666,52 @@ RADEONGetATOMConnectorInfoFromBIOSObject (ScrnInfoPtr pScrn)
else
info->BiosConnector[i].linkb = FALSE;
- /* dac/tmds type */
- if (path->usDeviceTag != ATOM_DEVICE_LCD1_SUPPORT) {
- switch(enc_obj_id) {
- case ENCODER_OBJECT_ID_INTERNAL_LVDS:
- break;
- case ENCODER_OBJECT_ID_INTERNAL_TMDS1:
- case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1:
- info->BiosConnector[i].TMDSType = TMDS_INT;
- break;
- case ENCODER_OBJECT_ID_INTERNAL_UNIPHY:
+ switch(enc_obj_id) {
+ case ENCODER_OBJECT_ID_INTERNAL_LVDS:
+ info->BiosConnector[i].LVDSType = LVDS_INT;
+ break;
+ case ENCODER_OBJECT_ID_INTERNAL_TMDS1:
+ case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1:
+ info->BiosConnector[i].TMDSType = TMDS_INT;
+ break;
+ case ENCODER_OBJECT_ID_INTERNAL_UNIPHY:
+ if (info->BiosConnector[i].ConnectorType == CONNECTOR_LVDS)
+ info->BiosConnector[i].LVDSType = LVDS_UNIPHY;
+ else
info->BiosConnector[i].TMDSType = TMDS_UNIPHY;
- break;
- case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1:
+ break;
+ case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1:
+ if (info->BiosConnector[i].ConnectorType == CONNECTOR_LVDS)
+ info->BiosConnector[i].LVDSType = LVDS_UNIPHY1;
+ else
info->BiosConnector[i].TMDSType = TMDS_UNIPHY1;
- break;
- case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2:
+ break;
+ case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2:
+ if (info->BiosConnector[i].ConnectorType == CONNECTOR_LVDS)
+ info->BiosConnector[i].LVDSType = LVDS_UNIPHY2;
+ else
info->BiosConnector[i].TMDSType = TMDS_UNIPHY2;
- break;
- case ENCODER_OBJECT_ID_INTERNAL_TMDS2:
- case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1:
- info->BiosConnector[i].TMDSType = TMDS_EXT;
- break;
- case ENCODER_OBJECT_ID_INTERNAL_LVTM1:
- case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA:
+ break;
+ case ENCODER_OBJECT_ID_INTERNAL_TMDS2:
+ case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1:
+ info->BiosConnector[i].TMDSType = TMDS_EXT;
+ break;
+ case ENCODER_OBJECT_ID_INTERNAL_LVTM1:
+ case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA:
+ if (info->BiosConnector[i].ConnectorType == CONNECTOR_LVDS)
+ info->BiosConnector[i].LVDSType = LVDS_LVTMA;
+ else
info->BiosConnector[i].TMDSType = TMDS_LVTMA;
- break;
- case ENCODER_OBJECT_ID_INTERNAL_DAC1:
- case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1:
- info->BiosConnector[i].DACType = DAC_PRIMARY;
- break;
- case ENCODER_OBJECT_ID_INTERNAL_DAC2:
- case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC2:
- info->BiosConnector[i].DACType = DAC_TVDAC;
- break;
- }
+ break;
+ case ENCODER_OBJECT_ID_INTERNAL_DAC1:
+ case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1:
+ info->BiosConnector[i].DACType = DAC_PRIMARY;
+ break;
+ case ENCODER_OBJECT_ID_INTERNAL_DAC2:
+ case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC2:
+ info->BiosConnector[i].DACType = DAC_TVDAC;
+ break;
}
- break;
}
}
@@ -2063,6 +2072,14 @@ RADEONGetATOMConnectorInfoFromBIOSConnectorTable (ScrnInfoPtr pScrn)
else
info->BiosConnector[i].TMDSType = TMDS_NONE;
+ if (i == ATOM_DEVICE_LCD1_INDEX) {
+ if (IS_AVIVO_VARIANT)
+ info->BiosConnector[i].LVDSType = LVDS_LVTMA;
+ else
+ info->BiosConnector[i].LVDSType = LVDS_INT;
+ } else
+ info->BiosConnector[i].LVDSType = LVDS_NONE;
+
/* Always set the connector type to VGA for CRT1/CRT2. if they are
* shared with a DVI port, we'll pick up the DVI connector below when we
* merge the outputs
diff --git a/src/radeon_bios.c b/src/radeon_bios.c
index 37954d35..badcb018 100644
--- a/src/radeon_bios.c
+++ b/src/radeon_bios.c
@@ -632,6 +632,7 @@ static Bool RADEONGetLegacyConnectorInfoFromBIOS (ScrnInfoPtr pScrn)
info->BiosConnector[4].ConnectorType = CONNECTOR_LVDS;
info->BiosConnector[4].DACType = DAC_NONE;
info->BiosConnector[4].TMDSType = TMDS_NONE;
+ info->BiosConnector[4].LVDSType = LVDS_INT;
info->BiosConnector[4].ddc_i2c.valid = FALSE;
tmp = RADEON_BIOS16(info->ROMHeaderStart + 0x42);
diff --git a/src/radeon_output.c b/src/radeon_output.c
index 4aa99d64..c5c6f5cf 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -48,18 +48,6 @@
#include "radeon_tv.h"
#include "radeon_atombios.h"
-const char *MonTypeName[10] = {
- "AUTO",
- "NONE",
- "CRT",
- "LVDS",
- "TMDS",
- "CTV",
- "STV",
- "CV",
- "HDMI",
- "DP"
-};
const RADEONMonitorType MonTypeID[10] = {
MT_UNKNOWN, /* this is just a dummy value for AUTO DETECTION */
@@ -74,13 +62,24 @@ const RADEONMonitorType MonTypeID[10] = {
MT_DP
};
-const char *TMDSTypeName[6] = {
+const char *TMDSTypeName[8] = {
"None",
"Internal",
"External",
"LVTMA",
"DDIA",
"UNIPHY"
+ "UNIPHY1"
+ "UNIPHY2"
+};
+
+const char *LVDSTypeName[6] = {
+ "None",
+ "Internal",
+ "LVTMA",
+ "UNIPHY"
+ "UNIPHY1"
+ "UNIPHY2"
};
const char *DACTypeName[4] = {
@@ -201,12 +200,12 @@ void RADEONPrintPortMap(ScrnInfoPtr pScrn)
radeon_output = output->driver_private;
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Port%d:\n Monitor -- %s\n Connector -- %s\n DAC Type -- %s\n TMDS Type -- %s\n DDC Type -- 0x%x\n",
+ "Port%d:\n Connector -- %s\n DAC Type -- %s\n TMDS Type -- %s\n LVDS Type -- %s\n DDC Type -- 0x%x\n",
o,
- MonTypeName[radeon_output->MonType+1],
ConnectorTypeName[radeon_output->ConnectorType],
DACTypeName[radeon_output->DACType],
TMDSTypeName[radeon_output->TMDSType],
+ LVDSTypeName[radeon_output->LVDSType],
(unsigned int)radeon_output->ddc_i2c.mask_clk_reg);
}
@@ -2860,6 +2859,8 @@ Bool RADEONSetupConnectors(ScrnInfoPtr pScrn)
radeon_output->load_detection = info->BiosConnector[i].load_detection;
radeon_output->linkb = info->BiosConnector[i].linkb;
+ radeon_output->LVDSType = info->BiosConnector[i].LVDSType;
+
if (radeon_output->ConnectorType == CONNECTOR_DVI_D)
radeon_output->DACType = DAC_NONE;
else
diff --git a/src/radeon_probe.h b/src/radeon_probe.h
index 1886b4e6..9cde2741 100644
--- a/src/radeon_probe.h
+++ b/src/radeon_probe.h
@@ -109,6 +109,16 @@ typedef enum
typedef enum
{
+ LVDS_NONE = 0,
+ LVDS_INT = 1,
+ LVDS_LVTMA = 2,
+ LVDS_UNIPHY = 3,
+ LVDS_UNIPHY1 = 4,
+ LVDS_UNIPHY2 = 5
+} RADEONLvdsType;
+
+typedef enum
+{
DVI_AUTO,
DVI_DIGITAL,
DVI_ANALOG
@@ -200,6 +210,7 @@ typedef struct _RADEONCrtcPrivateRec {
typedef struct {
RADEONDacType DACType;
RADEONTmdsType TMDSType;
+ RADEONLvdsType LVDSType;
RADEONConnectorType ConnectorType;
Bool valid;
int output_id;
@@ -222,6 +233,7 @@ typedef struct _RADEONOutputPrivateRec {
RADEONDacType DACType;
RADEONDviType DVIType;
RADEONTmdsType TMDSType;
+ RADEONLvdsType LVDSType;
RADEONConnectorType ConnectorType;
RADEONMonitorType MonType;
int crtc_num;