git: 9front

Download patch

ref: dfa1176b9c16e83e4bb024e2d260fb92c38cebb0
parent: e496e9c75b64eb8b13fe720703f1f913a2fc99ed
author: Michael Forney <mforney@mforney.org>
date: Wed Mar 2 05:26:36 EST 2022

igfx: maintain single/double-channel LVDS mode from BIOS

--- a/sys/src/cmd/aux/vga/igfx.c
+++ b/sys/src/cmd/aux/vga/igfx.c
@@ -850,7 +850,12 @@
 	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);
 		}
--