From d8e072f49f76b771094a2fb1df5e26f9fa2f4dff Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Tue, 31 Dec 2019 21:29:53 +0100 Subject: [PATCH] intel_extreme: enable LVDS if a VESA panel information is found This is useful for example on the eeePC 701, where the EDID/DDC lines from the LCD display are not wired to the video card as expected (I confirmed this by downloading the eeePC schematics, the LCD is somehow wired to what would normally be a PS/2 port on the embedded controller). In this case, there is no way we can get the EDID data from the usual means, however, we still know the panel resolution by looking it up in the VESA BIOS, and if we found it there, there has to be an LVDS panel, so we can configure it. Should fix #14066. --- src/add-ons/accelerants/intel_extreme/Ports.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/add-ons/accelerants/intel_extreme/Ports.cpp b/src/add-ons/accelerants/intel_extreme/Ports.cpp index be75ff8e92..89452fef11 100644 --- a/src/add-ons/accelerants/intel_extreme/Ports.cpp +++ b/src/add-ons/accelerants/intel_extreme/Ports.cpp @@ -406,18 +406,15 @@ LVDSPort::IsConnected() // Linux seems to look at lid status for LVDS port detection // If we don't get EDID, we can use vbios native mode or vesa? if (!HasEDID()) { - #if 0 - if (gInfo->shared_info->got_vbt) { - // TODO: Fake EDID from vbios native mode? - // I feel like this would be more accurate - } else if... - #endif if (gInfo->shared_info->has_vesa_edid_info) { TRACE("LVDS: Using VESA edid info\n"); memcpy(&fEDIDInfo, &gInfo->shared_info->vesa_edid_info, sizeof(edid1_info)); fEDIDState = B_OK; // HasEDID now true + } else if (gInfo->shared_info->got_vbt) { + TRACE("LVDS: No EDID, but force enabled as we have a VBT\n"); + return true; } else { TRACE("LVDS: Couldn't find any valid EDID!\n"); return false; @@ -503,6 +500,7 @@ LVDSPort::SetDisplayMode(display_mode* target, uint32 colorMode) bool needsScaling = false; // Try to get the panel preferred screen mode from EDID info +#if 0 if (gInfo->shared_info->got_vbt) { // Set vbios hardware panel mode as base memcpy(&hardwareTarget, &gInfo->shared_info->panel_mode, @@ -521,6 +519,8 @@ LVDSPort::SetDisplayMode(display_mode* target, uint32 colorMode) hardwareTarget.virtual_width, hardwareTarget.virtual_height, needsScaling ? "scaled" : "unscaled"); } else { +#endif + { // We don't have EDID data, try to set the requested mode directly hardwareTarget = *target; }