c22de5d
From 4a1ad0a98f4ca1ebe21f1fe22975318cff0de8f1 Mon Sep 17 00:00:00 2001
c22de5d
From: =?UTF-8?q?S=C3=B8ren=20Sandmann=20Pedersen?= <sandmann@redhat.com>
a8d7673
Date: Thu, 11 Sep 2008 12:51:31 -0400
c22de5d
Subject: [PATCH 03/17] 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
c22de5d
index b2daec7..85d499a 100644
b38b008
--- a/hw/xfree86/modes/xf86Crtc.c
b38b008
+++ b/hw/xfree86/modes/xf86Crtc.c
c22de5d
@@ -1074,6 +1074,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
-- 
c22de5d
1.7.1
b38b008