Author: bga Date: 2011-08-08 18:13:56 +0200 (Mon, 08 Aug 2011) New Revision: 42600 Changeset: https://dev.haiku-os.org/changeset/42600 Ticket: https://dev.haiku-os.org/ticket/4166 Modified: haiku/trunk/src/add-ons/accelerants/vesa/mode.cpp Log: Add initial vesa modes even if EDID information is present. EDID does not include all supported video modes. Fixes #4166. Note that this change will probably show several weird resolution is some configurations. They are all valid resolutions but are not commom so we need a way to filter those out. Modified: haiku/trunk/src/add-ons/accelerants/vesa/mode.cpp =================================================================== --- haiku/trunk/src/add-ons/accelerants/vesa/mode.cpp 2011-08-08 15:29:35 UTC (rev 42599) +++ haiku/trunk/src/add-ons/accelerants/vesa/mode.cpp 2011-08-08 16:13:56 UTC (rev 42600) @@ -76,23 +76,21 @@ 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 - but only if we don't - // have EDID info available, as that should be good enough. display_mode* initialModes = NULL; uint32 initialModesCount = 0; - if (!gInfo->shared_info->has_edid) { - initialModes = (display_mode*)malloc( - sizeof(display_mode) * gInfo->shared_info->vesa_mode_count); - if (initialModes != NULL) { - initialModesCount = gInfo->shared_info->vesa_mode_count; - 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(vesaModes[i].width, vesaModes[i].height, - &initialModes[i]); - } + // Add initial VESA modes. + initialModes = (display_mode*)malloc( + sizeof(display_mode) * gInfo->shared_info->vesa_mode_count); + if (initialModes != NULL) { + initialModesCount = gInfo->shared_info->vesa_mode_count; + 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(vesaModes[i].width, vesaModes[i].height, + &initialModes[i]); } }