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