Commit 2c5eba85 authored by Adam Jackson's avatar Adam Jackson
Browse files

Fix shadow fb allocation size (v2)



->bitsPerPixel is rather obviously eight times too large.

v2: Use ->displayWidth - the pitch - not ->virtualX (Keith Packard)
Signed-off-by: default avatarAdam Jackson <ajax@redhat.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 66e7909b
...@@ -827,8 +827,8 @@ FBDevScreenInit(SCREEN_INIT_ARGS_DECL) ...@@ -827,8 +827,8 @@ FBDevScreenInit(SCREEN_INIT_ARGS_DECL)
fPtr->fbstart = fPtr->fbmem + fPtr->fboff; fPtr->fbstart = fPtr->fbmem + fPtr->fboff;
if (fPtr->shadowFB) { if (fPtr->shadowFB) {
fPtr->shadow = calloc(1, pScrn->virtualX * pScrn->virtualY * fPtr->shadow = calloc(1, pScrn->displayWidth * pScrn->virtualY *
pScrn->bitsPerPixel); ((pScrn->bitsPerPixel + 7) / 8));
if (!fPtr->shadow) { if (!fPtr->shadow) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR, xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment