75b1879
From dc5cedd61e00afec33cbfaa7fdfbb6c357074dbd Mon Sep 17 00:00:00 2001
75b1879
From: =?utf-8?q?S=C3=B8ren=20Sandmann=20Pedersen?= <sandmann@redhat.com>
75b1879
Date: Thu, 11 Sep 2008 12:51:31 -0400
75b1879
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
75b1879
index 4de7e05..9bcf81b 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 */
75b1879
+    if (scrn->videoRam >= 65536)
cecfb0f
+        width += 1920;
75b1879
+    else if (scrn->videoRam >= 32768)
cecfb0f
+        width += 1280;
75b1879
+    else if (scrn->videoRam >= 16384)
cecfb0f
+        width += 1024;
75b1879
+
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