[PATCH] i810: Add workaround for bad BIOS mode on Fujitsu laptops

Tony Lindgren tony at atomide.com
Sun Jan 28 22:48:56 PST 2007


Hi all,

Just hacking a bit to get the i810 modesetting driver to work on my
laptop :) Here are few patches.

Regards,

Tony

At least T4215 BIOS provides incorrect fixed mode that
makes the LVDS stretched. This same problem probably
also appears on at least T4210.

This patch fixes this by rewriting the BIOS provided value:

(II) I810(0): Found panel mode in BIOS VBT tables:
(II) I810(0): Modeline "1400x1050"x0.0  108.00  1400 1416 1528 1694  \
1050 1051 1054 1062 (63.8 kHz)
(II) I810(0): Found BDB block type 42
(II) I810(0): Found BDB block type 43
(II) I810(0): Found BDB block type 44
(II) I810(0): Replaced bad Fujitsu panel mode with:
(II) I810(0): Modeline "1400x1050"x0.0  122.00  1400 1488 1640 1880  \
1050 1052 1064 1082 +hsync +vsync (64.9 kHz)
...

--- a/src/i830_lvds.c
+++ b/src/i830_lvds.c
@@ -441,6 +449,27 @@ i830_lvds_init(ScrnInfoPtr pScrn)
 		return;
 	    }
 	}
+
+        /* Fujitsu T4215 models with 1400x1050 panels report wrong timings.
+         * This is probably true for T4210 too, maybe also other models.
+         */
+	if ((pI830->PciInfo->subsysVendor == 0x10cf) &&
+	    (pI830->PciInfo->subsysCard == 0x1380) &&
+            (pI830->panel_fixed_mode->HDisplay == 1400) &&
+            (pI830->panel_fixed_mode->VDisplay == 1050) &&
+            (pI830->panel_fixed_mode->Clock == 108000)) {
+            pI830->panel_fixed_mode->Clock      = 122000;
+            pI830->panel_fixed_mode->HSyncStart = 1488;
+            pI830->panel_fixed_mode->HSyncEnd   = 1640;
+            pI830->panel_fixed_mode->HTotal     = 1880;
+            pI830->panel_fixed_mode->VSyncStart = 1052;
+            pI830->panel_fixed_mode->VSyncEnd   = 1064;
+            pI830->panel_fixed_mode->VTotal     = 1082;
+            pI830->panel_fixed_mode->Flags      = V_PHSYNC | V_PVSYNC;
+            xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+                       "Replaced bad Fujitsu panel mode with:\n");
+            xf86PrintModeline(pScrn->scrnIndex, pI830->panel_fixed_mode);
+        }
    }
 
     output = xf86OutputCreate (pScrn, &i830_lvds_output_funcs, "LVDS");



More information about the xorg mailing list