a8d7673
From dc5cedd61e00afec33cbfaa7fdfbb6c357074dbd Mon Sep 17 00:00:00 2001
a8d7673
From: =?utf-8?q?S=C3=B8ren=20Sandmann=20Pedersen?= <sandmann@redhat.com>
a8d7673
Date: Thu, 11 Sep 2008 12:51:31 -0400
a8d7673
Subject: [PATCH] Make room for an external monitor if we have enough video RAM
b38b008
b38b008
---
a1dac6f
 hw/xfree86/modes/xf86Crtc.c |    9 +++++++++
a1dac6f
 1 files changed, 9 insertions(+), 0 deletions(-)
b38b008
b38b008
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
a8d7673
index 4de7e05..9bcf81b 100644
b38b008
--- a/hw/xfree86/modes/xf86Crtc.c
b38b008
+++ b/hw/xfree86/modes/xf86Crtc.c
a1dac6f
@@ -987,6 +987,15 @@ xf86DefaultScreenLimits (ScrnInfoPtr scrn, int *widthp, int *heightp,
b38b008
 	if (crtc_height > height)
b38b008
 	    height = crtc_height;
b38b008
     }
a1dac6f
+
a1dac6f
+    /* Make room for an external monitor if we have enough video ram */
a8d7673
+    if (scrn->videoRam >= 65536)
a1dac6f
+        width += 1920;
a8d7673
+    else if (scrn->videoRam >= 32768)
a1dac6f
+        width += 1280;
a8d7673
+    else if (scrn->videoRam >= 16384)
a1dac6f
+        width += 1024;
a8d7673
+
b38b008
     if (config->maxWidth && width > config->maxWidth) width = config->maxWidth;
b38b008
     if (config->maxHeight && height > config->maxHeight) height = config->maxHeight;
b38b008
     if (config->minWidth && width < config->minWidth) width = config->minWidth;
b38b008
-- 
b38b008
1.6.0.1
b38b008