summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2022-03-02 10:26:36 +0000
committercinap_lenrek <cinap_lenrek@felloff.net>2022-03-02 10:26:36 +0000
commita00957efee9643c3b025b9d20d6ab4fc6536eb89 (patch)
treee3bc39463924bcef98b5ca694f655f734aa6e9ad /sys
parent79c7e4514d90b4d8584c7e3be8a05f89b538c7b7 (diff)
igfx: maintain single/double-channel LVDS mode from BIOS
Diffstat (limited to 'sys')
-rw-r--r--sys/src/cmd/aux/vga/igfx.c7
1 files changed, 6 insertions, 1 deletions
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);
}