xserver: Branch 'master' - 2 commits

Michel Daenzer daenzer at kemper.freedesktop.org
Sun Dec 31 18:24:56 EET 2006


 hw/xfree86/fbdevhw/fbdevhw.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

New commits:
diff-tree d077c0da470ab7291e8d838eaace57b066477d6f (from c385bcf0bde38dd869f7065f859dd4b4126f5690)
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Sun Dec 31 17:23:31 2006 +0100

    fbdevhw: Use displayWidth for fbdev virtual width when appropriate.
    
    The fbdev API doesn't allow setting the pitch explicitly, so we have to set
    the virtual width to the pitch we're using for drawing. This fixes corruption
    after changing the virtual width with RandR.

diff --git a/hw/xfree86/fbdevhw/fbdevhw.c b/hw/xfree86/fbdevhw/fbdevhw.c
index 83b0dc1..a9288a7 100644
--- a/hw/xfree86/fbdevhw/fbdevhw.c
+++ b/hw/xfree86/fbdevhw/fbdevhw.c
@@ -183,7 +183,8 @@ print_xfree_mode(char *txt, DisplayModeP
 static void
 xfree2fbdev_fblayout(ScrnInfoPtr pScrn, struct fb_var_screeninfo *var)
 {
-	var->xres_virtual   = pScrn->virtualX;
+	var->xres_virtual   = pScrn->displayWidth ? pScrn->displayWidth :
+			      pScrn->virtualX;
 	var->yres_virtual   = pScrn->virtualY;
 	var->bits_per_pixel = pScrn->bitsPerPixel;
 	var->red.length     = pScrn->weight.red;
diff-tree c385bcf0bde38dd869f7065f859dd4b4126f5690 (from f6815cb68b0f6698497348fc6e4214dacef33b95)
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Sat Dec 30 16:44:31 2006 +0100

    fbdevhw: Fix some issues with the previous commit.
    
    Fix a TRACE_ENTER typo and only update the internal fbdev mode state cache
    after actually setting a mode.

diff --git a/hw/xfree86/fbdevhw/fbdevhw.c b/hw/xfree86/fbdevhw/fbdevhw.c
index 303ad14..83b0dc1 100644
--- a/hw/xfree86/fbdevhw/fbdevhw.c
+++ b/hw/xfree86/fbdevhw/fbdevhw.c
@@ -496,7 +496,7 @@ fbdevHWSetMode(ScrnInfoPtr pScrn, Displa
 	fbdevHWPtr fPtr = FBDEVHWPTR(pScrn);
 	struct fb_var_screeninfo req_var = fPtr->var, set_var;
 	
-	TRACE_ENTER("ModeInit");
+	TRACE_ENTER("SetMode");
 
 	xfree2fbdev_fblayout(pScrn, &req_var);
 	xfree2fbdev_timing(mode, &req_var);
@@ -528,7 +528,8 @@ fbdevHWSetMode(ScrnInfoPtr pScrn, Displa
 		return FALSE;
 	}
 
-	fPtr->var = set_var;
+	if (!check)
+		fPtr->var = set_var;
 
 	return TRUE;
 }



More information about the xorg-commit mailing list