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:
@@ -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.
|
||||
*
|
||||
* Authors:
|
||||
@@ -15,6 +15,8 @@
|
||||
#include <Drivers.h>
|
||||
#include <PCI.h>
|
||||
|
||||
#include <edid.h>
|
||||
|
||||
|
||||
#define VENDOR_ID_INTEL 0x8086
|
||||
|
||||
@@ -201,6 +203,9 @@ struct intel_shared_info {
|
||||
DeviceType device_type;
|
||||
char device_identifier[32];
|
||||
struct pll_info pll_info;
|
||||
|
||||
edid1_info vesa_edid_info;
|
||||
bool has_vesa_edid_info;
|
||||
};
|
||||
|
||||
//----------------- 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.
|
||||
*
|
||||
* Support for i915 chipset and up based on the X driver,
|
||||
@@ -592,15 +592,21 @@ create_mode_list(void)
|
||||
if (gInfo->shared_info->single_head_locked)
|
||||
gInfo->head_mode = HEAD_MODE_A_ANALOG;
|
||||
} else {
|
||||
TRACE("getting EDID on port A (analog) failed : %s. "
|
||||
TRACE("getting EDID on port A (analog) failed: %s. "
|
||||
"Trying on port C (lvds)\n", strerror(error));
|
||||
bus.cookie = (void*)INTEL_I2C_IO_C;
|
||||
error = ddc2_read_edid1(&bus, &gInfo->edid_info, NULL, NULL);
|
||||
if (error == B_OK) {
|
||||
edid_dump(&gInfo->edid_info);
|
||||
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 {
|
||||
TRACE("getting EDID on port C failed : %s\n",
|
||||
TRACE("getting EDID on port C failed: %s\n",
|
||||
strerror(error));
|
||||
|
||||
// We could not read any EDID info. Fallback to creating a list with
|
||||
|
||||
@@ -3,6 +3,7 @@ SubDir HAIKU_TOP src add-ons kernel drivers graphics intel_extreme ;
|
||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||
|
||||
UsePrivateHeaders [ FDirName graphics intel_extreme ] ;
|
||||
UsePrivateHeaders [ FDirName graphics vesa ] ;
|
||||
UsePrivateHeaders [ FDirName graphics common ] ;
|
||||
UsePrivateHeaders graphics ;
|
||||
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.
|
||||
*
|
||||
* Authors:
|
||||
@@ -14,12 +14,16 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <boot_item.h>
|
||||
#include <driver_settings.h>
|
||||
#include <util/kernel_cpp.h>
|
||||
#include "utility.h"
|
||||
|
||||
#include <vesa_info.h>
|
||||
|
||||
#include "driver.h"
|
||||
#include "power.h"
|
||||
#include "utility.h"
|
||||
|
||||
|
||||
#define TRACE_INTELEXTREME
|
||||
@@ -395,6 +399,13 @@ intel_extreme_init(intel_info &info)
|
||||
&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);
|
||||
|
||||
TRACE("%s: completed successfully!\n", __func__);
|
||||
|
||||
Reference in New Issue
Block a user