xserver: Branch 'master'

Maarten Maathuis madman2003 at kemper.freedesktop.org
Sat Nov 29 05:32:49 PST 2008


 hw/xfree86/modes/xf86Crtc.c   |   13 +++++++++++--
 hw/xfree86/modes/xf86Rotate.c |    2 +-
 2 files changed, 12 insertions(+), 3 deletions(-)

New commits:
commit ffb484f7ef84099019b196ef97bfb2355eb6d52a
Author: Maarten Maathuis <madman2003 at gmail.com>
Date:   Sat Nov 29 14:30:55 2008 +0100

    randr: Avoid needlessly creating a shadow framebuffer.
    
    - pScreen->width and height were zero, so it didn't "fit" the screen.

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index e9652e1..6a3731c 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -112,6 +112,8 @@ xf86CrtcCreate (ScrnInfoPtr		scrn,
     crtc->filter_width = 0;
     crtc->filter_height = 0;
     crtc->transform_in_use = FALSE;
+    crtc->transformPresent = FALSE;
+    crtc->desiredTransformPresent = FALSE;
     memset (&crtc->bounds, '\0', sizeof (crtc->bounds));
 
     if (xf86_config->crtc)
@@ -241,6 +243,8 @@ xf86CrtcSetModeTransform (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotati
 			  RRTransformPtr transform, int x, int y)
 {
     ScrnInfoPtr		scrn = crtc->scrn;
+    /* During ScreenInit() scrn->pScreen is still NULL */
+    ScreenPtr		pScreen = screenInfo.screens[scrn->scrnIndex];
     xf86CrtcConfigPtr   xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
     int			i;
     Bool		ret = FALSE;
@@ -254,9 +258,9 @@ xf86CrtcSetModeTransform (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotati
 
     if (crtc->funcs->set_mode_major)
 	return crtc->funcs->set_mode_major(crtc, mode, rotation, x, y);
-	
+
     crtc->enabled = xf86CrtcInUse (crtc);
-    
+
     if (!crtc->enabled)
     {
 	/* XXX disable crtc? */
@@ -290,6 +294,11 @@ xf86CrtcSetModeTransform (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotati
     } else
 	crtc->transformPresent = FALSE;
 
+    /* xf86CrtcFitsScreen() relies on these values being correct. */
+    /* This should ensure the values are always set at modeset time. */
+    pScreen->width = scrn->virtualX;
+    pScreen->height = scrn->virtualY;
+
     /* Shift offsets that move us out of virtual size */
     if (x + mode->HDisplay > xf86_config->maxWidth ||
 	y + mode->VDisplay > xf86_config->maxHeight)
diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c
index 07189a5..d7f7b3b 100644
--- a/hw/xfree86/modes/xf86Rotate.c
+++ b/hw/xfree86/modes/xf86Rotate.c
@@ -464,7 +464,7 @@ xf86CrtcRotate (xf86CrtcPtr crtc)
 	    /* mark shadowed area as damaged so it will be repainted */
 	    xf86CrtcDamageShadow (crtc);
 	}
-	
+
 	if (!xf86_config->rotation_damage)
 	{
 	    /* Create damage structure */


More information about the xorg-commit mailing list