From 03ee42a8eb8788177b7af67ca0f7284c98362811 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Thu, 23 Jan 2020 22:24:22 +0100 Subject: [PATCH] intel_extreme: Keep LVDS on its assigned pipe also for SandyBridge We don't manage to change the transcoder there, either, so just keep using the selected one (A if no other display is connected, and B if there is one, it seems). We were configuring pipe B but the LVDS panel would still display pipe A. And, we were not configuring pipe B properly, even. The whole modesetting only worked by occasionally setting some registers for pipe A ("just in case", said comments). Now we actually configure the pipe we are using, which makes more sense and brings us a step closer to multi monitor support. --- src/add-ons/accelerants/intel_extreme/Ports.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/add-ons/accelerants/intel_extreme/Ports.cpp b/src/add-ons/accelerants/intel_extreme/Ports.cpp index 9037c3414c..e3f82dede3 100644 --- a/src/add-ons/accelerants/intel_extreme/Ports.cpp +++ b/src/add-ons/accelerants/intel_extreme/Ports.cpp @@ -381,7 +381,8 @@ LVDSPort::PipePreference() // 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) { + if (gInfo->shared_info->pch_info == INTEL_PCH_IBX + || gInfo->shared_info->pch_info == INTEL_PCH_CPT) { uint32 portState = read32(_PortRegister()); if (portState & DISPLAY_MONITOR_PIPE_B) return INTEL_PIPE_B; @@ -389,9 +390,9 @@ LVDSPort::PipePreference() return INTEL_PIPE_A; } - // For later PCH versions, assume pipe B for now. Note that Cougar Point - // and probably later devices add a pipe C, so we'd need to handle that - // and the port register has a different format because of it. + // 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. return INTEL_PIPE_B; }