hrev53040 adds 1 changeset to branch 'master'
old head: 26723de2676731cb022dc12cc47b6d9d11ed2eeb
new head: fe3375770eb2b3b09e6a5d24aaf80d7895b5943b
overview:
https://git.haiku-os.org/haiku/log/?qt=range&q=fe3375770eb2+%5E26723de26767
----------------------------------------------------------------------------
fe3375770eb2: intel_extreme.accelerant: create display modes list from VBT
using create_display_modes()
For cases when EDID is not available but VBT information was retrieved,
previous code generated display mode list manually, potentially
incorrectly, causing the black screen during boot. This commit
fixes this by using a dedicated function, used for the
case where EDID is available (or VBT is not available).
Fixes #14280.
Change-Id: I95cfc5313260f0b9a01a98ba78e300b4383b6e32
Reviewed-on: https://review.haiku-os.org/c/1370
Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>
[ SuperPrower <dya.eshshmai@xxxxxxxxx> ]
----------------------------------------------------------------------------
Revision: hrev53040
Commit: fe3375770eb2b3b09e6a5d24aaf80d7895b5943b
URL: https://git.haiku-os.org/haiku/commit/?id=fe3375770eb2
Author: SuperPrower <dya.eshshmai@xxxxxxxxx>
Date: Thu Apr 4 20:46:15 2019 UTC
Committer: Alex von Gluck IV <kallisti5@xxxxxxxxxxx>
Commit-Date: Fri Apr 5 00:36:04 2019 UTC
Ticket: https://dev.haiku-os.org/ticket/14280
----------------------------------------------------------------------------
1 file changed, 13 insertions(+), 23 deletions(-)
src/add-ons/accelerants/intel_extreme/mode.cpp | 36 ++++++++--------------
----------------------------------------------------------------------------
diff --git a/src/add-ons/accelerants/intel_extreme/mode.cpp
b/src/add-ons/accelerants/intel_extreme/mode.cpp
index 4bf08e792a..257ce266ce 100644
--- a/src/add-ons/accelerants/intel_extreme/mode.cpp
+++ b/src/add-ons/accelerants/intel_extreme/mode.cpp
@@ -315,6 +315,8 @@ set_frame_buffer_base()
status_t
create_mode_list(void)
{
+ CALLED();
+
for (uint32 i = 0; i < gInfo->port_count; i++) {
if (gInfo->ports[i] == NULL)
continue;
@@ -324,37 +326,25 @@ create_mode_list(void)
gInfo->has_edid = true;
}
+ display_mode* list;
+ uint32 count = 0;
+
// If no EDID, but have vbt from driver, use that mode
if (!gInfo->has_edid && gInfo->shared_info->got_vbt) {
// We could not read any EDID info. Fallback to creating a list
with
// only the mode set up by the BIOS.
// TODO: support lower modes via scaling and windowing
- size_t size = (sizeof(display_mode) + B_PAGE_SIZE - 1)
- & ~(B_PAGE_SIZE - 1);
-
- display_mode* list;
- area_id area = create_area("intel extreme modes",
- (void**)&list, B_ANY_ADDRESS, size, B_NO_LOCK,
- B_READ_AREA | B_WRITE_AREA);
- if (area < 0)
- return area;
-
- memcpy(list, &gInfo->shared_info->panel_mode,
sizeof(display_mode));
-
- gInfo->mode_list_area = area;
- gInfo->mode_list = list;
- gInfo->shared_info->mode_list_area = gInfo->mode_list_area;
- gInfo->shared_info->mode_count = 1;
- return B_OK;
+ gInfo->mode_list_area = create_display_modes("intel extreme
modes",
+ NULL, &gInfo->shared_info->panel_mode, 1, NULL, 0, NULL,
+ &list, &count);
+ } else {
+ // Otherwise return the 'real' list of modes
+ gInfo->mode_list_area = create_display_modes("intel extreme
modes",
+ gInfo->has_edid ? &gInfo->edid_info : NULL, NULL, 0,
NULL, 0, NULL,
+ &list, &count);
}
- // Otherwise return the 'real' list of modes
- display_mode* list;
- uint32 count = 0;
- gInfo->mode_list_area = create_display_modes("intel extreme modes",
- gInfo->has_edid ? &gInfo->edid_info : NULL, NULL, 0, NULL, 0,
NULL,
- &list, &count);
if (gInfo->mode_list_area < B_OK)
return gInfo->mode_list_area;