From 0767bd3a8be1401dd72a01f3fae0020d81952fbd Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Tue, 24 Aug 2010 11:06:50 +0000 Subject: [PATCH] Use the EDID info from LVDS panels : * Read the EDID info on both port A (analog VGA monitor) and C (LVDS panel) * If an LVDS panel is detected, report the EDID resolutions instead of the BIOs settings This fixes #6326, likely #5096, and possibly some others intel_extreme problems. Please test. On the other hand, this make the screen preflet show the full list of more reported by the LVDS panel. As we don't support scaling, some of these modes are unuseable and lead to a garbled screen. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38329 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/accelerants/intel_extreme/mode.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/add-ons/accelerants/intel_extreme/mode.cpp b/src/add-ons/accelerants/intel_extreme/mode.cpp index a3885346f0..5c646066d4 100644 --- a/src/add-ons/accelerants/intel_extreme/mode.cpp +++ b/src/add-ons/accelerants/intel_extreme/mode.cpp @@ -158,13 +158,25 @@ create_mode_list(void) bus.get_signals = &get_i2c_signals; ddc2_init_timing(&bus); - if (ddc2_read_edid1(&bus, &gInfo->edid_info, NULL, NULL) == B_OK) { + status_t error = ddc2_read_edid1(&bus, &gInfo->edid_info, NULL, NULL); + if (error == B_OK) { edid_dump(&gInfo->edid_info); gInfo->has_edid = true; } else { - TRACE(("intel_extreme: getting EDID failed!\n")); + TRACE(("intel_extreme: getting EDID on port A (analog) failed : %s. " + "Trying on port C (lvds)\n", strerror(error))); + bus.cookie = (void*)INTEL_I2C_IO_C; + error = ddc2_read_edid1(&bus, &gInfo->edid_info, NULL, NULL); + if (error == B_OK) { + edid_dump(&gInfo->edid_info); + gInfo->has_edid = true; + } else { + TRACE(("intel_extreme: getting EDID on port C failed : %s\n", + strerror(error))); + } } +#if 0 // TODO: support lower modes via scaling and windowing if (gInfo->head_mode & HEAD_MODE_LVDS_PANEL && ((gInfo->head_mode & HEAD_MODE_A_ANALOG) == 0)) { @@ -185,6 +197,7 @@ create_mode_list(void) gInfo->shared_info->mode_count = 1; return B_OK; } +#endif // Otherwise return the 'real' list of modes display_mode *list;