Ticket #8457: radeon_hd_lvds_ss.diff

File radeon_hd_lvds_ss.diff, 2.3 KB (added by kallisti5, 11 years ago)

patch

  • src/add-ons/accelerants/radeon_hd/display.cpp

    diff --git a/src/add-ons/accelerants/radeon_hd/display.cpp b/src/add-ons/accelerants/radeon_hd/display.cpp
    index 7baeedf..3a2238c 100644
    a b detect_displays()  
    291291        }
    292292        #endif
    293293
     294        if (gConnector[id]->type == VIDEO_CONNECTOR_LVDS) {
     295            display_mode preferredMode;
     296            bool lvdsInfoFound = connector_read_mode_lvds(id,
     297                &preferredMode);
     298            TRACE("%s: connector(%" B_PRIu32 "): bit-banging LVDS for EDID.\n",
     299                __func__, id);
     300
     301            gDisplay[displayIndex]->attached = connector_read_edid(id,
     302                &gDisplay[displayIndex]->edidData);
     303
     304            if (!gDisplay[displayIndex]->attached && lvdsInfoFound) {
     305                // If we didn't find ddc edid data, fallback to lvdsInfo
     306                // We have to call connector_read_mode_lvds first to
     307                // collect SS data for the lvds connector
     308                TRACE("%s: connector(%" B_PRIu32 "): using AtomBIOS LVDS_Info "
     309                    "preferred mode\n", __func__, id);
     310                gDisplay[displayIndex]->attached = true;
     311                memcpy(&gDisplay[displayIndex]->preferredMode,
     312                    &preferredMode, sizeof(display_mode));
     313            }
     314        }
     315
    294316        // If no display found yet, try more standard detection methods
    295317        if (gDisplay[displayIndex]->attached == false) {
    296318            TRACE("%s: connector(%" B_PRIu32 "): bit-banging ddc for EDID.\n",
    297319                __func__, id);
    298320
    299             // Lets try bit-banging edid from connector
    300             gDisplay[displayIndex]->attached
    301                 = connector_read_edid(id, &gDisplay[displayIndex]->edidData);
     321            // Bit-bang edid from connector
     322            gDisplay[displayIndex]->attached = connector_read_edid(id,
     323                &gDisplay[displayIndex]->edidData);
    302324
    303325            // Found EDID data?
    304326            if (gDisplay[displayIndex]->attached) {
    detect_displays()  
    334356            }
    335357        }
    336358
    337         // If we haven't found EDID yet and LVDS, check LVDS_Info table
    338         if (gDisplay[displayIndex]->attached == false
    339             && gConnector[id]->type == VIDEO_CONNECTOR_LVDS) {
    340             gDisplay[displayIndex]->attached = connector_read_mode_lvds(id,
    341                 &gDisplay[displayIndex]->preferredMode);
    342             if (gDisplay[displayIndex]->attached) {
    343                 TRACE("%s: connector(%" B_PRIu32 "): using AtomBIOS LVDS_Info "
    344                     "preferred mode\n", __func__, id);
    345             }
    346         }
    347 
    348359        if (gDisplay[displayIndex]->attached != true) {
    349360            // Nothing interesting here, move along
    350361            continue;