[haiku-commits] r42427 - haiku/trunk/src/add-ons/accelerants/vesa

  • From: axeld@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 14 Jul 2011 23:22:53 +0200 (CEST)

Author: axeld
Date: 2011-07-14 23:22:53 +0200 (Thu, 14 Jul 2011)
New Revision: 42427
Changeset: https://dev.haiku-os.org/changeset/42427

Modified:
   haiku/trunk/src/add-ons/accelerants/vesa/mode.cpp
Log:
* Only add the VESA modes if there is no EDID available.


Modified: haiku/trunk/src/add-ons/accelerants/vesa/mode.cpp
===================================================================
--- haiku/trunk/src/add-ons/accelerants/vesa/mode.cpp   2011-07-14 20:31:12 UTC 
(rev 42426)
+++ haiku/trunk/src/add-ons/accelerants/vesa/mode.cpp   2011-07-14 21:22:53 UTC 
(rev 42427)
@@ -76,17 +76,20 @@
        const color_space kVesaSpaces[] = {B_RGB32_LITTLE, B_RGB24_LITTLE,
                B_RGB16_LITTLE, B_RGB15_LITTLE, B_CMAP8};
 
-       // Create the initial list from the support mode list
-       // TODO: filter by monitor timing constraints!
-       display_mode* initialModes = (display_mode*)malloc(
-               sizeof(display_mode) * gInfo->shared_info->vesa_mode_count);
-       if (initialModes != NULL) {
-               vesa_mode* vesaModes = gInfo->vesa_modes;
+       // Create the initial list from the support mode list - but only if we 
don't
+       // have EDID info available, as that should be good enough.
+       display_mode* initialModes = NULL;
+       if (!gInfo->shared_info->has_edid) {
+               initialModes = (display_mode*)malloc(
+                       sizeof(display_mode) * 
gInfo->shared_info->vesa_mode_count);
+               if (initialModes != NULL) {
+                       vesa_mode* vesaModes = gInfo->vesa_modes;
 
-               for (uint32 i = gInfo->shared_info->vesa_mode_count; i-- > 0;) {
-                       compute_display_timing(vesaModes[i].width, 
vesaModes[i].height, 60,
-                               false, &initialModes[i].timing);
-                       fill_display_mode(&initialModes[i]);
+                       for (uint32 i = gInfo->shared_info->vesa_mode_count; 
i-- > 0;) {
+                               compute_display_timing(vesaModes[i].width, 
vesaModes[i].height, 60,
+                                       false, &initialModes[i].timing);
+                               fill_display_mode(&initialModes[i]);
+                       }
                }
        }
 


Other related posts: