cecfb0f
From ff21ec16fc05cc5fd0d60e466b7175fb2a33f8d2 Mon Sep 17 00:00:00 2001
cecfb0f
From: Soren Sandmann <sandmann@redhat.com>
cecfb0f
Date: Thu, 11 Sep 2008 10:47:03 -0400
cecfb0f
Subject: [PATCH] Make room for an external monitor if we have enough video ram
d14431c
d14431c
---
cecfb0f
 hw/xfree86/modes/xf86Crtc.c |    9 +++++++++
cecfb0f
 1 files changed, 9 insertions(+), 0 deletions(-)
d14431c
d14431c
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
cecfb0f
index 4de7e05..afb70a7 100644
d14431c
--- a/hw/xfree86/modes/xf86Crtc.c
d14431c
+++ b/hw/xfree86/modes/xf86Crtc.c
cecfb0f
@@ -987,6 +987,15 @@ xf86DefaultScreenLimits (ScrnInfoPtr scrn, int *widthp, int *heightp,
d14431c
 	if (crtc_height > height)
d14431c
 	    height = crtc_height;
d14431c
     }
cecfb0f
+
cecfb0f
+    /* Make room for an external monitor if we have enough video ram */
cecfb0f
+    if (scrn->VideoRam >= 65536)
cecfb0f
+        width += 1920;
cecfb0f
+    else if (scrn->VideoRam >= 32768)
cecfb0f
+        width += 1280;
cecfb0f
+    else if (scrn->VideoRam >= 16384)
cecfb0f
+        width += 1024;
cecfb0f
+    
d14431c
     if (config->maxWidth && width > config->maxWidth) width = config->maxWidth;
d14431c
     if (config->maxHeight && height > config->maxHeight) height = config->maxHeight;
d14431c
     if (config->minWidth && width < config->minWidth) width = config->minWidth;
d14431c
-- 
d14431c
1.6.0.1
d14431c