I discovered two problems (and have attached basic fixes) with the fbdev
code.  First, rotation (portrait mode) is messed up; disabling xrandr in
the fbdev driver fixes this (though xrandr should probably only be
disabled when rotation is specified in XF86Config, as is done in the sis
driver; my patch doesn't do this).  Second, the fbdev driver doesn't
allow 24 bpp (I don't know if this was intentional, but it looked like
there was some initialization code which handled a 24 bpp depth). 
Lastly, 24-bit rotation is quite corrupt; maybe this should be disabled
completely instead of giving a warning about corruption?  The shadow
rotation code doesn't seem to handle 24 bpp rotation at all.

--Jonathan Thambidurai

--- xc/programs/Xserver/hw/xfree86/drivers/fbdev/fbdev.c	2003-09-25 07:04:53.000000000 -0400
+++ xc.dri-changed/xc/xc/programs/Xserver/hw/xfree86/drivers/fbdev/fbdev.c	2004-01-10 15:56:23.000000000 -0500
@@ -409,7 +409,7 @@
 	if (!fbdevHWInit(pScrn,NULL,xf86FindOptionValue(fPtr->pEnt->device->options,"fbdev")))
 		return FALSE;
 	default_depth = fbdevHWGetDepth(pScrn,&fbbpp);
-	if (!xf86SetDepthBpp(pScrn, default_depth, default_depth, fbbpp,0))
+	if (!xf86SetDepthBpp(pScrn, default_depth, default_depth, fbbpp,Support24bppFb))
 		return FALSE;
 	xf86PrintDepthBpp(pScrn);
@@ -835,6 +837,10 @@
 	if(!xf86HandleColormaps(pScreen, 256, 8, fbdevHWLoadPalette, NULL, flags))
 		return FALSE;
 
+	xf86DisableRandR();
+	xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+		   "Driver rotation enabled, RandR disabled\n");
+
 	xf86DPMSInit(pScreen, fbdevHWDPMSSet, 0);
 
 	pScreen->SaveScreen = fbdevHWSaveScreen;

Reply via email to