From 18fe0231df37b0245159db147a65f429b986220e Mon Sep 17 00:00:00 2001 From: "Bruno G. Albuquerque" Date: Mon, 8 Aug 2011 16:13:56 +0000 Subject: [PATCH] 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. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42600 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/accelerants/vesa/mode.cpp | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/add-ons/accelerants/vesa/mode.cpp b/src/add-ons/accelerants/vesa/mode.cpp index 5780015e10..064b88f8f4 100644 --- a/src/add-ons/accelerants/vesa/mode.cpp +++ b/src/add-ons/accelerants/vesa/mode.cpp @@ -76,23 +76,21 @@ create_mode_list(void) 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]); } }