From a00957efee9643c3b025b9d20d6ab4fc6536eb89 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Wed, 2 Mar 2022 10:26:36 +0000 Subject: [PATCH] igfx: maintain single/double-channel LVDS mode from BIOS --- sys/src/cmd/aux/vga/igfx.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/src/cmd/aux/vga/igfx.c b/sys/src/cmd/aux/vga/igfx.c index 58919bea4..bacfb493c 100644 --- a/sys/src/cmd/aux/vga/igfx.c +++ b/sys/src/cmd/aux/vga/igfx.c @@ -850,7 +850,12 @@ initdpll(Igfx *igfx, int x, int freq, int port) dpll->ctrl.v &= ~(3<<24); if(port == PortLCD){ p2 = 14; - if(freq > 112*MHz){ + /* + * Use dual-channel LVDS if the display clock is + * outside the range of single-channel, or it was + * preconfigured by the BIOS. + */ + if(freq > 112*MHz || (igfx->lvds.v>>4 & 3) == 3){ p2 >>= 1; dpll->ctrl.v |= (1<<24); }