xorg/xc/programs/Xserver/hw/xfree86/common

Saren Sandmann Pedersen sandmann at daimi.au.dk
Fri Aug 13 21:24:08 EEST 2004


CVS commit by sandmann: 

Fri Aug 13 19:53:10 2004  Soeren Sandmann  <sandmann at redhat.com>

	* programs/Xserver/hw/xfree86/drivers/mga/mga_storm.c
	(MGAStormSync): Fix for lockups on some versions of Matrox
	Mystique. #687, Patch from Mike Harris.

	* programs/Xserver/hw/xfree86/common/xf86RandR.c
	(xf86RandRSetMode): Call xf86EnableDisableFBAccess though the
	function pointer instead of directly. #1041, Patch from Aaron Plattner.

	* programs/Xserver/hw/xfree86/common/xf86RandR.c: Swap the
	phsyical size of the screen when rotiation. #1050, Patch from
	Aaron Plattner.

Fri Aug 13 19:47:12 2004  Soeren Sandmann  <sandmann at redhat.com>

	* xftint.h: Make HAVE_FT_BITMAP_SIZE_Y_PPEM conditional on the
	FreeType version instead of proping it. This way it will work
	with the monolithic version too. #1062, Patch by Owen Taylor.


  M +21 -7     xorg/xc/programs/Xserver/hw/xfree86/common/xf86RandR.c   1.5


--- xorg/xc/programs/Xserver/hw/xfree86/common/xf86RandR.c  #1.4:1.5
@@ -39,4 +39,6 @@ typedef struct _xf86RandRInfo {
     int                             virtualX;
     int                             virtualY;
+    int                             mmWidth;
+    int                             mmHeight;
     Rotation                        rotation;
 } XF86RandRInfoRec, *XF86RandRInfoPtr;
@@ -74,5 +76,5 @@ xf86RandRGetInfo (ScreenPtr pScreen, Rot
         pSize = RRRegisterSize (pScreen,
                                 mode->HDisplay, mode->VDisplay,
-                                pScreen->mmWidth, pScreen->mmHeight);
+                                randrp->mmWidth, randrp->mmHeight);
         if (!pSize)
             return FALSE;
@@ -90,6 +92,6 @@ xf86RandRGetInfo (ScreenPtr pScreen, Rot
         pSize = RRRegisterSize (pScreen,
                                 randrp->virtualX, randrp->virtualY,
-                                pScreen->mmWidth * randrp->virtualX / scrp->currentMode->HDisplay,
-                                pScreen->mmHeight * randrp->virtualY / scrp->currentMode->VDisplay);
+                                randrp->mmWidth,
+                                randrp->mmHeight);
         if (!pSize)
             return FALSE;
@@ -118,5 +120,7 @@ static Bool
 xf86RandRSetMode (ScreenPtr         pScreen,
                   DisplayModePtr    mode,
-                  Bool              useVirtual)
+                  Bool              useVirtual,
+                  int               mmWidth,
+                  int               mmHeight)
 {
     ScrnInfoPtr         scrp = XF86SCRNINFO(pScreen);
@@ -124,8 +128,10 @@ xf86RandRSetMode (ScreenPtr	    pScreen,
     int                 oldWidth = pScreen->width;
     int                 oldHeight = pScreen->height;
+    int                 oldmmWidth = pScreen->mmWidth;
+    int                 oldmmHeight = pScreen->mmHeight;
     WindowPtr           pRoot = WindowTable[pScreen->myNum];
     
     if (pRoot)
-        xf86EnableDisableFBAccess (pScreen->myNum, FALSE);
+        (*scrp->EnableDisableFBAccess) (pScreen->myNum, FALSE);
     if (useVirtual)
     {
@@ -143,4 +149,6 @@ xf86RandRSetMode (ScreenPtr	    pScreen,
         pScreen->width = scrp->virtualY;
         pScreen->height = scrp->virtualX;
+        pScreen->mmWidth = mmHeight;
+        pScreen->mmHeight = mmWidth;
     }
     else
@@ -148,4 +156,6 @@ xf86RandRSetMode (ScreenPtr	    pScreen,
         pScreen->width = scrp->virtualX;
         pScreen->height = scrp->virtualY;
+        pScreen->mmWidth = mmWidth;
+        pScreen->mmHeight = mmHeight;
     }
     if (!xf86SwitchMode (pScreen, mode))
@@ -153,4 +163,6 @@ xf86RandRSetMode (ScreenPtr	    pScreen,
         scrp->virtualX = pScreen->width = oldWidth;
         scrp->virtualY = pScreen->height = oldHeight;
+        pScreen->mmWidth = oldmmWidth;
+        pScreen->mmHeight = oldmmHeight;
         return FALSE;
     }
@@ -166,5 +178,5 @@ xf86RandRSetMode (ScreenPtr	    pScreen,
     xf86SetViewport (pScreen, 0, 0);
     if (pRoot)
-        xf86EnableDisableFBAccess (pScreen->myNum, TRUE);
+        (*scrp->EnableDisableFBAccess) (pScreen->myNum, TRUE);
     return TRUE;
 }
@@ -216,5 +228,5 @@ xf86RandRSetConfig (ScreenPtr		pScreen,
     }
 
-    if (!xf86RandRSetMode (pScreen, mode, useVirtual))
+    if (!xf86RandRSetMode (pScreen, mode, useVirtual, pSize->mmWidth, pSize->mmHeight))
         return FALSE;
     /*
@@ -308,4 +320,6 @@ xf86RandRInit (ScreenPtr    pScreen)
     randrp->virtualX = scrp->virtualX;
     randrp->virtualY = scrp->virtualY;
+    randrp->mmWidth = pScreen->mmWidth;
+    randrp->mmHeight = pScreen->mmHeight;
     
     randrp->CreateScreenResources = pScreen->CreateScreenResources;





More information about the xorg-commit mailing list