From ea7029410336675de8fecc7c6ebe62c8504ae988 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Fri, 26 Jan 2007 14:38:26 -0800 Subject: If using shadowfb, allocate shadow area before fbScreenInit (Copied from xf86-video-fbdev) --- src/wsfb_driver.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/wsfb_driver.c b/src/wsfb_driver.c index dcaa3c4..c6ad4d4 100644 --- a/src/wsfb_driver.c +++ b/src/wsfb_driver.c @@ -820,6 +820,17 @@ WsfbScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) fPtr->fbstart = fPtr->fbmem; + if (fPtr->shadowFB) { + fPtr->shadow = xcalloc(1, pScrn->virtualX * pScrn->virtualY * + pScrn->bitsPerPixel); + + if (!fPtr->shadow) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Failed to allocate shadow framebuffer\n"); + return FALSE; + } + } + switch (pScrn->bitsPerPixel) { case 1: ret = xf1bppScreenInit(pScreen, fPtr->fbstart, -- cgit v1.2.3