From 015fbeab9c084fa053160f8c993ffe61eea9b91b Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Sun, 9 Feb 2020 15:37:33 +0100 Subject: [PATCH] intel_extreme: fix pipe selection for Ivy Bridge and later Should fix #15661 and #15662. --- src/add-ons/accelerants/intel_extreme/Pipes.cpp | 2 +- src/add-ons/accelerants/intel_extreme/Ports.cpp | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/add-ons/accelerants/intel_extreme/Pipes.cpp b/src/add-ons/accelerants/intel_extreme/Pipes.cpp index 683cb5ab59..c94ee27ed5 100644 --- a/src/add-ons/accelerants/intel_extreme/Pipes.cpp +++ b/src/add-ons/accelerants/intel_extreme/Pipes.cpp @@ -218,7 +218,7 @@ Pipe::ConfigureTimings(display_mode* target, bool hardware) | ((uint32)target->timing.v_sync_start - 1)); } - if (gInfo->shared_info->device_type.Generation() != 6) { + if (gInfo->shared_info->device_type.Generation() < 6) { // FIXME check on which generations this register exists // (it appears it would be available only for cursor planes, not // display planes) diff --git a/src/add-ons/accelerants/intel_extreme/Ports.cpp b/src/add-ons/accelerants/intel_extreme/Ports.cpp index e3f82dede3..274e48b705 100644 --- a/src/add-ons/accelerants/intel_extreme/Ports.cpp +++ b/src/add-ons/accelerants/intel_extreme/Ports.cpp @@ -130,6 +130,8 @@ Port::SetPipe(Pipe* pipe) uint32 portState = read32(portRegister); + // FIXME is the use of PORT_TRANS_* constants correct for Sandy Bridge / + // Cougar Point? Or is it only for Ivy Bridge / Panther point onwards? if (gInfo->shared_info->pch_info == INTEL_PCH_CPT) { portState &= PORT_TRANS_SEL_MASK; if (pipe->Index() == INTEL_PIPE_A) @@ -379,10 +381,10 @@ LVDSPort::PipePreference() // Ideally we could just return INTEL_PIPE_ANY for the newer devices, but // this doesn't quite work yet. - // For Ibex Point, read the existing LVDS configuration and just reuse that - // (it seems our attempt to change it doesn't work, anyway) - if (gInfo->shared_info->pch_info == INTEL_PCH_IBX - || gInfo->shared_info->pch_info == INTEL_PCH_CPT) { + // For Ibex Point and Sandy Bridge, read the existing LVDS configuration + // and just reuse that (it seems our attempt to change it doesn't work, + // anyway) + if (gInfo->shared_info->device_type.Generation() <= 6) { uint32 portState = read32(_PortRegister()); if (portState & DISPLAY_MONITOR_PIPE_B) return INTEL_PIPE_B; @@ -393,6 +395,7 @@ LVDSPort::PipePreference() // For later PCH versions, assume pipe B for now. Note that later devices // add a pipe C (but do they add a transcoder C?), so we'd need to handle // that and the port register has a different format because of it. + // (using PORT_TRANS_*_SEL_CPT to select which transcoder to use) return INTEL_PIPE_B; }