intel_extreme: use VESA EDID info as fallback.

* Only in case retrieving EDID info failed on head A and C.
* Should help with detecting the native resolution for ticket #10878.
This commit is contained in:
Axel Dörfler
2014-06-04 01:02:40 +02:00
parent 5336a8d11e
commit c1400fb617
4 changed files with 29 additions and 6 deletions
@@ -1,5 +1,5 @@
/* /*
* Copyright 2006-2009, Haiku, Inc. All Rights Reserved. * Copyright 2006-2014, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
* *
* Authors: * Authors:
@@ -15,6 +15,8 @@
#include <Drivers.h> #include <Drivers.h>
#include <PCI.h> #include <PCI.h>
#include <edid.h>
#define VENDOR_ID_INTEL 0x8086 #define VENDOR_ID_INTEL 0x8086
@@ -201,6 +203,9 @@ struct intel_shared_info {
DeviceType device_type; DeviceType device_type;
char device_identifier[32]; char device_identifier[32];
struct pll_info pll_info; struct pll_info pll_info;
edid1_info vesa_edid_info;
bool has_vesa_edid_info;
}; };
//----------------- ioctl() interface ---------------- //----------------- ioctl() interface ----------------
@@ -1,5 +1,5 @@
/* /*
* Copyright 2006-2013, Haiku, Inc. All Rights Reserved. * Copyright 2006-2014, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
* *
* Support for i915 chipset and up based on the X driver, * Support for i915 chipset and up based on the X driver,
@@ -599,6 +599,12 @@ create_mode_list(void)
if (error == B_OK) { if (error == B_OK) {
edid_dump(&gInfo->edid_info); edid_dump(&gInfo->edid_info);
gInfo->has_edid = true; gInfo->has_edid = true;
} else if (gInfo->shared_info->has_vesa_edid_info) {
TRACE("getting EDID on port C failed: %s. Use VESA EDID info\n",
strerror(error));
memcpy(&gInfo->edid_info, &gInfo->shared_info->vesa_edid_info,
sizeof(edid1_info));
gInfo->has_edid = true;
} else { } else {
TRACE("getting EDID on port C failed: %s\n", TRACE("getting EDID on port C failed: %s\n",
strerror(error)); strerror(error));
@@ -3,6 +3,7 @@ SubDir HAIKU_TOP src add-ons kernel drivers graphics intel_extreme ;
SetSubDirSupportedPlatformsBeOSCompatible ; SetSubDirSupportedPlatformsBeOSCompatible ;
UsePrivateHeaders [ FDirName graphics intel_extreme ] ; UsePrivateHeaders [ FDirName graphics intel_extreme ] ;
UsePrivateHeaders [ FDirName graphics vesa ] ;
UsePrivateHeaders [ FDirName graphics common ] ; UsePrivateHeaders [ FDirName graphics common ] ;
UsePrivateHeaders graphics ; UsePrivateHeaders graphics ;
UsePrivateKernelHeaders ; UsePrivateKernelHeaders ;
@@ -1,5 +1,5 @@
/* /*
* Copyright 2006-2010, Haiku, Inc. All Rights Reserved. * Copyright 2006-2014, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
* *
* Authors: * Authors:
@@ -14,12 +14,16 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <boot_item.h>
#include <driver_settings.h> #include <driver_settings.h>
#include <util/kernel_cpp.h> #include <util/kernel_cpp.h>
#include "utility.h"
#include <vesa_info.h>
#include "driver.h" #include "driver.h"
#include "power.h" #include "power.h"
#include "utility.h"
#define TRACE_INTELEXTREME #define TRACE_INTELEXTREME
@@ -395,6 +399,13 @@ intel_extreme_init(intel_info &info)
&info.shared_info->physical_cursor_memory); &info.shared_info->physical_cursor_memory);
} }
edid1_info* edidInfo = (edid1_info*)get_boot_item(VESA_EDID_BOOT_INFO,
NULL);
if (edidInfo != NULL) {
info.shared_info->has_vesa_edid_info = true;
memcpy(&info.shared_info->vesa_edid_info, edidInfo, sizeof(edid1_info));
}
init_interrupt_handler(info); init_interrupt_handler(info);
TRACE("%s: completed successfully!\n", __func__); TRACE("%s: completed successfully!\n", __func__);