diff options
author | Alan Coopersmith <alan.coopersmith@sun.com> | 2007-01-26 14:38:26 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2007-01-26 14:38:26 -0800 |
commit | ea7029410336675de8fecc7c6ebe62c8504ae988 (patch) | |
tree | 101f5a2c5984cd6f68d2eefd4d0a395c1e28c765 | |
parent | 09d7df64c837c819c7feb88891b8845ab660c150 (diff) |
If using shadowfb, allocate shadow area before fbScreenInit
(Copied from xf86-video-fbdev)
-rw-r--r-- | src/wsfb_driver.c | 11 |
1 files changed, 11 insertions, 0 deletions
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, |