mirror of
https://github.com/X11Libre/xf86-video-fbdev.git
synced 2026-03-24 01:24:49 +00:00
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: Adam Jackson <ajax@redhat.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -827,8 +827,8 @@ FBDevScreenInit(SCREEN_INIT_ARGS_DECL)
|
||||
fPtr->fbstart = fPtr->fbmem + fPtr->fboff;
|
||||
|
||||
if (fPtr->shadowFB) {
|
||||
fPtr->shadow = calloc(1, pScrn->virtualX * pScrn->virtualY *
|
||||
pScrn->bitsPerPixel);
|
||||
fPtr->shadow = calloc(1, pScrn->displayWidth * pScrn->virtualY *
|
||||
((pScrn->bitsPerPixel + 7) / 8));
|
||||
|
||||
if (!fPtr->shadow) {
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
|
||||
|
||||
Reference in New Issue
Block a user