Module Name: xsrc Committed By: macallan Date: Thu Dec 2 22:53:43 UTC 2021
Modified Files: xsrc/external/mit/xf86-video-suncg14/dist/src: cg14_driver.c Log Message: fix shadow fb geometry calculations ... not that a shadow fb helps much on this hardware. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 \ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c diff -u xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c:1.18 xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c:1.19 --- xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c:1.18 Thu Dec 2 22:32:35 2021 +++ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c Thu Dec 2 22:53:43 2021 @@ -797,9 +797,10 @@ CG14WindowLinear(ScreenPtr pScreen, CARD { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; Cg14Ptr pCg14 = GET_CG14_FROM_SCRN(pScrn); + int shift = (pScrn->bitsPerPixel > 8) ? 2 : 0; - *size = pCg14->width << 2; - return (CARD8 *)pCg14->fb + row * (pCg14->width << 2) + offset; + *size = pCg14->width << shift; + return (CARD8 *)pCg14->fb + row * (pCg14->width << shift) + offset; } /* Free up any per-generation data structures */