xf86-video-intel: Branch 'modesetting' - 2 commits - src/i830_driver.c src/i830_randr.c

Keith Packard keithp at kemper.freedesktop.org
Fri Oct 6 09:17:44 EEST 2006


 src/i830_driver.c |    7 -------
 src/i830_randr.c  |   19 ++++++++++++++++---
 2 files changed, 16 insertions(+), 10 deletions(-)

New commits:
diff-tree d649fb0d964a9b40b8e04314b5fc14bbbfd41bc3 (from 0a5504e59f90abecedd81a8435b88a60fe098f29)
Author: Keith Packard <keithp at guitar.keithp.com>
Date:   Thu Oct 5 22:46:07 2006 -0700

    Don't require MonitorLayout when two monitors are plugged in.
    
    With randr12 working, we can just leave the second monitor off for now.

diff --git a/src/i830_driver.c b/src/i830_driver.c
index d46fc1b..07a9d59 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1771,13 +1771,6 @@ I830PreInit(ScrnInfoPtr pScrn, int flags
    }
 
    if ((pI830->entityPrivate && I830IsPrimary(pScrn)) || pI830->Clone) {
-      if ((!xf86GetOptValString(pI830->Options, OPTION_MONITOR_LAYOUT))) {
-	 xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "You must have a MonitorLayout "
-	 		"defined for use in a DualHead, Clone or MergedFB setup.\n");
-         PreInitCleanup(pScrn);
-         return FALSE;
-      }
-
       if (pI830->MonType1 == PIPE_NONE || pI830->MonType2 == PIPE_NONE) {
          xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Monitor 1 or Monitor 2 "
 	 		"cannot be type NONE in DualHead or Clone setup.\n");
diff-tree 0a5504e59f90abecedd81a8435b88a60fe098f29 (from 4ac81d58b7e0fbffbb4981deffe6a576be821a9b)
Author: Keith Packard <keithp at neko.keithp.com>
Date:   Thu Oct 5 09:11:29 2006 -0700

    Fix DPI at startup in RandR 1.2 code.
    
    Use requested monitor resolution to compute the appropriate screen size when
    resizing the screen during RandR initialization.

diff --git a/src/i830_randr.c b/src/i830_randr.c
index 3c594d8..e4075f2 100644
--- a/src/i830_randr.c
+++ b/src/i830_randr.c
@@ -832,12 +832,25 @@ I830RandRCreateScreenResources12 (Screen
     mode = pScrn->currentMode;
     if (mode)
     {
+	int mmWidth, mmHeight;
+
+	if (mode->HDisplay == pScreen->width &&
+	    mode->VDisplay == pScreen->height)
+	{
+	    mmWidth = pScrn->widthmm;
+	    mmHeight = pScrn->heightmm;
+	}
+	else
+	{
+#define MMPERINCH 25.4
+	    mmWidth = (double) mode->HDisplay / pScrn->xDpi * MMPERINCH;
+	    mmHeight = (double) mode->VDisplay / pScrn->yDpi * MMPERINCH;
+	}
 	I830RandRScreenSetSize (pScreen,
 				mode->HDisplay,
 				mode->VDisplay,
-				pScreen->mmWidth,
-				pScreen->mmHeight);
-	
+				mmWidth,
+				mmHeight);
     }
 			    
     for (i = 0; i < MAX_DISPLAY_PIPES; i++)



More information about the xorg-commit mailing list