intel_extreme: always assume panel on eDP on laptops.

This commit is contained in:
Rudolf Cornelissen
2021-11-27 18:15:07 +00:00
parent 03ed104900
commit 6ed123e532
2 changed files with 25 additions and 17 deletions
@@ -1245,7 +1245,6 @@ EmbeddedDisplayPort::IsConnected()
TRACE("%s: %s PortRegister: 0x%" B_PRIxADDR "\n", __func__, PortName(), TRACE("%s: %s PortRegister: 0x%" B_PRIxADDR "\n", __func__, PortName(),
portRegister); portRegister);
// fixme: Skylake and up use eDP for a seperate active VGA converter chip sometimes.
if (!gInfo->shared_info->device_type.IsMobile()) { if (!gInfo->shared_info->device_type.IsMobile()) {
TRACE("%s: skipping eDP on non-mobile GPU\n", __func__); TRACE("%s: skipping eDP on non-mobile GPU\n", __func__);
return false; return false;
@@ -1351,7 +1350,8 @@ DigitalDisplayInterface::IsConnected()
TRACE("%s: %s PortRegister: 0x%" B_PRIxADDR "\n", __func__, PortName(), TRACE("%s: %s PortRegister: 0x%" B_PRIxADDR "\n", __func__, PortName(),
portRegister); portRegister);
if (portRegister == 0) // Please note: Skylake and up (Desktop) use eDP for a seperate active VGA converter chip.
if ((portRegister == 0) && (PortIndex() != INTEL_PORT_E)) //DP protocol has no register
return false; return false;
// Probe a little port info. // Probe a little port info.
@@ -1405,11 +1405,18 @@ DigitalDisplayInterface::IsConnected()
break; break;
} }
if (((((pipeState & PIPE_DDI_SELECT_MASK) >> PIPE_DDI_SELECT_SHIFT) + 1) == (uint32)PortIndex()) if ((((pipeState & PIPE_DDI_SELECT_MASK) >> PIPE_DDI_SELECT_SHIFT) + 1) == (uint32)PortIndex()) {
&& (pipeState & PIPE_DDI_FUNC_CTL_ENABLE)) { // See if the BIOS enabled our output as it indicates it's in use
if (pipeState & PIPE_DDI_FUNC_CTL_ENABLE) {
TRACE("%s: Connected\n", __func__); TRACE("%s: Connected\n", __func__);
return true; return true;
} }
// On laptops we always have an internal panel.. (this is on the eDP port)
if ((gInfo->shared_info->device_type.IsMobile()) && (PortIndex() == INTEL_PORT_E)) {
TRACE("%s: Laptop. Assuming internal panel is connected here\n", __func__);
return true;
}
}
} }
TRACE("%s: Not connected\n", __func__); TRACE("%s: Not connected\n", __func__);
@@ -287,7 +287,7 @@ probe_ports()
} }
} }
// Digital Display Interface (for DP, HDMI and DVI) // Digital Display Interface (for DP, HDMI, DVI and eDP)
if (gInfo->shared_info->device_type.HasDDI()) { if (gInfo->shared_info->device_type.HasDDI()) {
for (int i = INTEL_PORT_B; i <= INTEL_PORT_E; i++) { for (int i = INTEL_PORT_B; i <= INTEL_PORT_E; i++) {
TRACE("Probing DDI %d\n", i); TRACE("Probing DDI %d\n", i);
@@ -306,8 +306,8 @@ probe_ports()
} }
} }
// Ensure DP_A isn't already taken (or DDI) if (!gInfo->shared_info->device_type.HasDDI()) {
// Please note that Skylake and up use eDP for a seperate active VGA converter chip. // Ensure DP_A isn't already taken
TRACE("Probing eDP\n"); TRACE("Probing eDP\n");
if (!has_connected_port((port_index)INTEL_PORT_A, INTEL_PORT_TYPE_ANY)) { if (!has_connected_port((port_index)INTEL_PORT_A, INTEL_PORT_TYPE_ANY)) {
// also always try eDP, it'll also just fail if not applicable // also always try eDP, it'll also just fail if not applicable
@@ -319,6 +319,7 @@ probe_ports()
else else
delete eDPPort; delete eDPPort;
} }
}
if (!gInfo->shared_info->device_type.HasDDI()) { if (!gInfo->shared_info->device_type.HasDDI()) {
for (int i = INTEL_PORT_B; i <= INTEL_PORT_D; i++) { for (int i = INTEL_PORT_B; i <= INTEL_PORT_D; i++) {