diff --git a/src/add-ons/accelerants/radeon_hd/display.cpp b/src/add-ons/accelerants/radeon_hd/display.cpp index 7baeedf17c..3a2238c005 100644 --- a/src/add-ons/accelerants/radeon_hd/display.cpp +++ b/src/add-ons/accelerants/radeon_hd/display.cpp @@ -291,14 +291,36 @@ detect_displays() } #endif + if (gConnector[id]->type == VIDEO_CONNECTOR_LVDS) { + display_mode preferredMode; + bool lvdsInfoFound = connector_read_mode_lvds(id, + &preferredMode); + TRACE("%s: connector(%" B_PRIu32 "): bit-banging LVDS for EDID.\n", + __func__, id); + + gDisplay[displayIndex]->attached = connector_read_edid(id, + &gDisplay[displayIndex]->edidData); + + if (!gDisplay[displayIndex]->attached && lvdsInfoFound) { + // If we didn't find ddc edid data, fallback to lvdsInfo + // We have to call connector_read_mode_lvds first to + // collect SS data for the lvds connector + TRACE("%s: connector(%" B_PRIu32 "): using AtomBIOS LVDS_Info " + "preferred mode\n", __func__, id); + gDisplay[displayIndex]->attached = true; + memcpy(&gDisplay[displayIndex]->preferredMode, + &preferredMode, sizeof(display_mode)); + } + } + // If no display found yet, try more standard detection methods if (gDisplay[displayIndex]->attached == false) { TRACE("%s: connector(%" B_PRIu32 "): bit-banging ddc for EDID.\n", __func__, id); - // Lets try bit-banging edid from connector - gDisplay[displayIndex]->attached - = connector_read_edid(id, &gDisplay[displayIndex]->edidData); + // Bit-bang edid from connector + gDisplay[displayIndex]->attached = connector_read_edid(id, + &gDisplay[displayIndex]->edidData); // Found EDID data? if (gDisplay[displayIndex]->attached) { @@ -334,17 +356,6 @@ 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) { // Nothing interesting here, move along continue;