From d8c71f47c36fb69ce2578ccb221b36f4f97b453b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Thu, 14 Jul 2011 21:22:53 +0000 Subject: [PATCH] * Only add the VESA modes if there is no EDID available. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42427 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/accelerants/vesa/mode.cpp | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/add-ons/accelerants/vesa/mode.cpp b/src/add-ons/accelerants/vesa/mode.cpp index c269d2f1f8..68cc6dab6b 100644 --- a/src/add-ons/accelerants/vesa/mode.cpp +++ b/src/add-ons/accelerants/vesa/mode.cpp @@ -76,17 +76,20 @@ 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 - // 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]); + } } }