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