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.
This commit is contained in:
Adrien Destugues 2019-12-31 21:29:53 +01:00
parent 1a221bf3d3
commit d8e072f49f

View File

@ -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;
}