shithub: riscv

Download patch

ref: 174d7e52a3fd4b48bece311415fbdd9e1bb85ccc
parent: c6359c3090bf0ca958aab17693567e1b00825213
author: qwx <devnull@localhost>
date: Tue Aug 22 20:25:39 EDT 2017

igfx: fix cdclk and dpll settings for dual channel lvds on sandybridge

--- a/sys/src/cmd/aux/vga/igfx.c
+++ b/sys/src/cmd/aux/vga/igfx.c
@@ -456,7 +456,7 @@
 
 	case TypeSNB:
 		igfx->npipe = 2;	/* A,B */
-		igfx->cdclk = 300;	/* MHz */
+		igfx->cdclk = 400;	/* MHz */
 		goto IVBcommon;
 
 	case TypeIVB:
@@ -843,6 +843,10 @@
 	dpll->ctrl.v &= ~(3<<24);
 	if(port == PortLCD){
 		p2 = 14;
+		if(freq > 112*MHz){
+			p2 >>= 1;
+			dpll->ctrl.v |= (1<<24);
+		}
 		if(genpll(freq, cref, p2, &m1, &m2, &n, &p1) < 0)
 			return -1;
 	} else {