RadeonHD: Prefer edid over LVDS_Info

* Some oem sbios implementations are buggy
  and don't overwrite the LVDS panel info over
  LVDS_Info in vbios as they should.
* Bit-bang EDID info from LVDS connector before
  falling back to the LVDS_Info table.
* Partially fixes #8457
This commit is contained in:
Alexander von Gluck IV
2013-07-01 22:28:35 -05:00
parent 2eb2b522bf
commit db5af29c82
+12 -10
View File
@@ -276,6 +276,7 @@ detect_displays()
__func__); __func__);
} }
} }
// TODO: Handle external DP brides - ?? // TODO: Handle external DP brides - ??
#if 0 #if 0
if (gConnector[id]->encoderExternal.isDPBridge == true) { if (gConnector[id]->encoderExternal.isDPBridge == true) {
@@ -289,16 +290,6 @@ detect_displays()
// TODO: DDC Router switching for DisplayPort (and others?) // TODO: DDC Router switching for DisplayPort (and others?)
} }
#endif #endif
if (gConnector[id]->type == VIDEO_CONNECTOR_LVDS) {
// If plain (non-DP) laptop LVDS, read mode info from AtomBIOS
//TRACE("%s: non-DP laptop LVDS detected\n", __func__);
gDisplay[displayIndex]->attached = connector_read_mode_lvds(id,
&gDisplay[displayIndex]->preferredMode);
if (gDisplay[displayIndex]->attached) {
TRACE("%s: connector(%" B_PRIu32 "): found LVDS preferred "
"mode\n", __func__, id);
}
}
// If no display found yet, try more standard detection methods // If no display found yet, try more standard detection methods
if (gDisplay[displayIndex]->attached == false) { if (gDisplay[displayIndex]->attached == false) {
@@ -343,6 +334,17 @@ detect_displays()
} }
} }
// If we haven't found EDID yet and LVDS, check LVDS_Info table
if (gDisplay[displayIndex]->attached == false
&& gConnector[id]->type == VIDEO_CONNECTOR_LVDS) {
gDisplay[displayIndex]->attached = connector_read_mode_lvds(id,
&gDisplay[displayIndex]->preferredMode);
if (gDisplay[displayIndex]->attached) {
TRACE("%s: connector(%" B_PRIu32 "): using AtomBIOS LVDS_Info "
"preferred mode\n", __func__, id);
}
}
if (gDisplay[displayIndex]->attached != true) { if (gDisplay[displayIndex]->attached != true) {
// Nothing interesting here, move along // Nothing interesting here, move along
continue; continue;