[PATCH] i810: Remove duplicate probed mode if same as fixed mode

Tony Lindgren tony at atomide.com
Sun Jan 28 22:49:08 PST 2007


If a probed mode is same as the fixed mode from BIOS,
it will appear twice. This patch removes the duplicate
probed mode.

--- a/src/i830_lvds.c
+++ b/src/i830_lvds.c
@@ -149,6 +149,14 @@ i830_lvds_mode_valid(xf86OutputPtr output, DisplayModePtr pMode)
 
     if (pFixedMode)
     {
+        if (!(pMode->type & M_T_PREFERRED) &&
+            xf86ModesEqual(pFixedMode, pMode)) {
+            xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+                       "Not using probed mode \"%s\" (same as fixed mode)\n",
+                       pMode->name);
+            return MODE_BAD;
+        }
+
 	if (pMode->HDisplay > pFixedMode->HDisplay)
 	    return MODE_PANEL;
 	if (pMode->VDisplay > pFixedMode->VDisplay)



More information about the xorg mailing list