[haiku-commits] r38329 - haiku/trunk/src/add-ons/accelerants/intel_extreme

  • From: pulkomandy@xxxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 24 Aug 2010 13:06:50 +0200 (CEST)

Author: pulkomandy
Date: 2010-08-24 13:06:50 +0200 (Tue, 24 Aug 2010)
New Revision: 38329
Changeset: http://dev.haiku-os.org/changeset/38329
Ticket: http://dev.haiku-os.org/ticket/6326
Ticket: http://dev.haiku-os.org/ticket/5096

Modified:
   haiku/trunk/src/add-ons/accelerants/intel_extreme/mode.cpp
Log:
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.


Modified: haiku/trunk/src/add-ons/accelerants/intel_extreme/mode.cpp
===================================================================
--- haiku/trunk/src/add-ons/accelerants/intel_extreme/mode.cpp  2010-08-24 
09:46:55 UTC (rev 38328)
+++ haiku/trunk/src/add-ons/accelerants/intel_extreme/mode.cpp  2010-08-24 
11:06:50 UTC (rev 38329)
@@ -158,13 +158,25 @@
        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 @@
                gInfo->shared_info->mode_count = 1;
                return B_OK;
        }
+#endif
 
        // Otherwise return the 'real' list of modes
        display_mode *list;


Other related posts:

  • » [haiku-commits] r38329 - haiku/trunk/src/add-ons/accelerants/intel_extreme - pulkomandy