hrev50262 adds 1 changeset to branch 'master'
old head: 42b76781985b73c3094bb3d6c0d5f83c5c491e90
new head: dee0f365e10e0173a03dd05b93048f765e24e2d8
overview:
http://cgit.haiku-os.org/haiku/log/?qt=range&q=dee0f365e10e+%5E42b76781985b
----------------------------------------------------------------------------
dee0f365e10e: intel_extreme: Improve LVDS panel detection robustness
* If older generation, check for mobile. If mobile GPU
is found, make an assumption that a LVDS panel exists
and attempt to leverage the vbios or VESA EDID.
[ Alexander von Gluck IV <kallisti5@xxxxxxxxxxx> ]
----------------------------------------------------------------------------
Revision: hrev50262
Commit: dee0f365e10e0173a03dd05b93048f765e24e2d8
URL: http://cgit.haiku-os.org/haiku/commit/?id=dee0f365e10e
Author: Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
Date: Thu Apr 28 15:45:31 2016 UTC
----------------------------------------------------------------------------
2 files changed, 33 insertions(+), 14 deletions(-)
src/add-ons/accelerants/intel_extreme/Ports.cpp | 41 +++++++++++++++------
src/add-ons/accelerants/intel_extreme/Ports.h | 6 +--
----------------------------------------------------------------------------
diff --git a/src/add-ons/accelerants/intel_extreme/Ports.cpp
b/src/add-ons/accelerants/intel_extreme/Ports.cpp
index c259133..7b09800 100644
--- a/src/add-ons/accelerants/intel_extreme/Ports.cpp
+++ b/src/add-ons/accelerants/intel_extreme/Ports.cpp
@@ -68,9 +68,9 @@ wait_for_clear(addr_t address, uint32 mask, uint32 timeout)
Port::Port(port_index index, const char* baseName)
:
fPipe(NULL),
+ fEDIDState(B_NO_INIT),
fPortIndex(index),
- fPortName(NULL),
- fEDIDState(B_NO_INIT)
+ fPortName(NULL)
{
char portID[2];
portID[0] = 'A' + index - INTEL_PORT_A;
@@ -360,22 +360,41 @@ LVDSPort::IsConnected()
TRACE("%s: %s PortRegister: 0x%" B_PRIxADDR "\n", __func__, PortName(),
_PortRegister());
- // Older generations don't have LVDS detection. If not mobile skip.
- if (gInfo->shared_info->device_type.Generation() <= 4) {
- if (!gInfo->shared_info->device_type.IsMobile()) {
- TRACE("LVDS: Skipping LVDS detection due to gen and not
mobile\n");
- return false;
- }
- }
-
- uint32 registerValue = read32(_PortRegister());
if (gInfo->shared_info->device_type.HasPlatformControlHub()) {
+ uint32 registerValue = read32(_PortRegister());
// there's a detection bit we can use
if ((registerValue & PCH_LVDS_DETECTED) == 0) {
TRACE("LVDS: Not detected\n");
return false;
}
// TODO: Skip if eDP support
+ } else if (gInfo->shared_info->device_type.Generation() <= 4) {
+ // Older generations don't have LVDS detection. If not mobile
skip.
+ if (!gInfo->shared_info->device_type.IsMobile()) {
+ TRACE("LVDS: Skipping LVDS detection due to gen and not
mobile\n");
+ return false;
+ }
+ // If mobile, try to grab EDID
+ // 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 {
+ TRACE("LVDS: Couldn't find any valid EDID!\n");
+ return false;
+ }
+ }
}
// Try getting EDID, as the LVDS port doesn't overlap with anything
else,
diff --git a/src/add-ons/accelerants/intel_extreme/Ports.h
b/src/add-ons/accelerants/intel_extreme/Ports.h
index dc2883f..7bc9683 100644
--- a/src/add-ons/accelerants/intel_extreme/Ports.h
+++ b/src/add-ons/accelerants/intel_extreme/Ports.h
@@ -85,15 +85,15 @@ static status_t
_SetI2CSignals(void* cookie, int clock,
display_mode fCurrentMode;
Pipe* fPipe;
+ status_t fEDIDState;
+ edid1_info fEDIDInfo;
+
private:
virtual addr_t _DDCRegister()
= 0;
virtual addr_t _PortRegister() = 0;
port_index fPortIndex;
char* fPortName;
-
- status_t fEDIDState;
- edid1_info fEDIDInfo;
};