xserver: Branch 'master' - 2 commits

Adam Jackson ajax at kemper.freedesktop.org
Sun Nov 18 08:57:14 PST 2007


 hw/xfree86/common/xf86Priv.h   |    2 +-
 hw/xfree86/modes/xf86Crtc.c    |    6 +++---
 hw/xfree86/modes/xf86RandR12.c |    6 +++---
 3 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit db9ae863536fff80b5463d99e71dc47ae587980d
Author: Adam Jackson <ajax at aspartame.nwnk.net>
Date:   Sun Nov 18 11:57:01 2007 -0500

    Bump DEFAULT_DPI to 96.
    
    75 is just nonsense.

diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h
index 3da102f..4723f5a 100644
--- a/hw/xfree86/common/xf86Priv.h
+++ b/hw/xfree86/common/xf86Priv.h
@@ -120,7 +120,7 @@ extern RootWinPropPtr *xf86RegisteredPropertiesTable;
 #define DEFAULT_LOG_VERBOSE	3
 #endif
 #ifndef DEFAULT_DPI
-#define DEFAULT_DPI		75
+#define DEFAULT_DPI		96
 #endif
 
 #define DEFAULT_UNRESOLVED	TRUE
commit ee2d4626dca6e0d4fc6f524e5de4bdefa2ed43df
Author: Tormod Volden <bugzi06.fdo.tormod at xoxy.net>
Date:   Sun Nov 18 11:56:31 2007 -0500

    Bug #12932: Use DEFAULT_DPI in randr1.2 instead of hardcoded 96.

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index bb416fd..dc49861 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -704,9 +704,9 @@ xf86DefaultMode (xf86OutputPtr output, int width, int height)
     
     mm_height = output->mm_height;
     if (!mm_height)
-	mm_height = 203;	/* 768 pixels at 96dpi */
+	mm_height = (768 * 25.4) / DEFAULT_DPI;
     /*
-     * Pick a mode closest to 96dpi 
+     * Pick a mode closest to DEFAULT_DPI
      */
     for (mode = output->probed_modes; mode; mode = mode->next)
     {
@@ -721,7 +721,7 @@ xf86DefaultMode (xf86OutputPtr output, int width, int height)
 	
 	/* yes, use VDisplay here, not xf86ModeHeight */
 	dpi = (mode->VDisplay * 254) / (mm_height * 10);
-	diff = dpi - 96;
+	diff = dpi - DEFAULT_DPI;
 	diff = diff < 0 ? -diff : diff;
 	if (target_mode == NULL || (preferred > target_preferred) ||
 	    (preferred == target_preferred && diff < target_diff))
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index fe21717..c1a06b2 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -450,10 +450,10 @@ xf86RandR12CreateScreenResources (ScreenPtr pScreen)
 	    else
 	    {
 		/*
-		 * Otherwise, just set the screen to 96dpi
+		 * Otherwise, just set the screen to DEFAULT_DPI
 		 */
-		mmWidth = width * 25.4 / 96;
-		mmHeight = height * 25.4 / 96;
+		mmWidth = width * 25.4 / DEFAULT_DPI;
+		mmHeight = height * 25.4 / DEFAULT_DPI;
 	    }
 	}
 	xf86DrvMsg(pScrn->scrnIndex, X_INFO,


More information about the xorg-commit mailing list