9495e5
diff -up xf86-video-ati-6.12.2/src/drmmode_display.c.lvds xf86-video-ati-6.12.2/src/drmmode_display.c
9495e5
--- xf86-video-ati-6.12.2/src/drmmode_display.c.lvds	2009-05-07 13:13:43.000000000 -0400
9495e5
+++ xf86-video-ati-6.12.2/src/drmmode_display.c	2009-05-07 13:39:10.000000000 -0400
9495e5
@@ -568,6 +568,49 @@ drmmode_output_get_modes(xf86OutputPtr o
9495e5
 		Modes = xf86ModesAdd(Modes, Mode);
9495e5
 
9495e5
 	}
9495e5
+
9495e5
+        /*
9495e5
+         * LVDS can scale.  If there's no EDID, or if it claims not to be
9495e5
+         * continuous-freq, then add the default modes so we get 800x600
9495e5
+         * and friends.
9495e5
+         */
9495e5
+	if (strstr(output->name, "LVDS")) {
9495e5
+                xf86MonPtr mon = output->MonInfo;
9495e5
+                if (!mon || !GTF_SUPPORTED(mon->features.msc)) {
9495e5
+                        DisplayModePtr m, i, p = NULL;
9495e5
+                        int max_x = 0, max_y = 0;
9495e5
+                        float max_vrefresh = 0.0;
9495e5
+ 
9495e5
+                        for (m = Modes; m; m = m->next) {
9495e5
+				if (m->type & M_T_PREFERRED)
9495e5
+				    p = m;
9495e5
+                                max_x = max(max_x, m->HDisplay);
9495e5
+                                max_y = max(max_y, m->VDisplay);
9495e5
+                                max_vrefresh = max(max_vrefresh,
9495e5
+                                                   xf86ModeVRefresh(m));
9495e5
+                        }
9495e5
+
9495e5
+			max_vrefresh = max(max_vrefresh, 60.0);
9495e5
+                        max_vrefresh *= (1 + SYNC_TOLERANCE);
9495e5
+ 
9495e5
+                        m = xf86GetDefaultModes(FALSE, FALSE);
9495e5
+ 
9495e5
+                        xf86ValidateModesSize(output->scrn, m, max_x, max_y, 0);
9495e5
+                        for (i = m; i; i = i->next) {
9495e5
+                                if (xf86ModeVRefresh(i) > max_vrefresh)
9495e5
+                                        i->status = MODE_VSYNC;
9495e5
+				if (p && i->HDisplay >= p->HDisplay &&
9495e5
+				    i->VDisplay >= p->VDisplay &&
9495e5
+				    xf86ModeVRefresh(i) >= xf86ModeVRefresh(p))
9495e5
+					i->status = MODE_VSYNC;
9495e5
+			}
9495e5
+ 
9495e5
+                        xf86PruneInvalidModes(output->scrn, &m, FALSE);
9495e5
+ 
9495e5
+                        Modes = xf86ModesAdd(Modes, m);
9495e5
+                }
9495e5
+        }
9495e5
+
9495e5
 	return Modes;
9495e5
 }
9495e5