[PATCH xf86-video-wsfb 2/4] Fix allocation size of th shadow framebuffer.Use byes, not bits.

Matthieu Herrb matthieu.herrb at laas.fr
Sun Aug 29 05:55:05 PDT 2010


Since the shadowfb is only used for bitsPerPixel >= 8, bitsPerPixel/8
is always the correct amount of bytes.

Acked-by: Miod Vallat <miod at online.fr>
Signed-off-by: Matthieu Herrb <matthieu.herrb at laas.fr>
---
 src/wsfb_driver.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/wsfb_driver.c b/src/wsfb_driver.c
index c4e48a7..bd8b38d 100644
--- a/src/wsfb_driver.c
+++ b/src/wsfb_driver.c
@@ -804,7 +804,7 @@ WsfbScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
 
 	if (fPtr->shadowFB) {
 		fPtr->shadow = xcalloc(1, pScrn->virtualX * pScrn->virtualY *
-		    pScrn->bitsPerPixel);
+		    pScrn->bitsPerPixel/8);
 		
 		if (!fPtr->shadow) {
 			xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-- 
1.7.0.5



More information about the xorg-devel mailing list