Module Name: xsrc
Committed By: macallan
Date: Thu Jun 28 01:16:50 UTC 2012
Modified Files:
xsrc/external/mit/xf86-video-suncg6/dist/src: cg6_driver.c
Log Message:
actually unmap what we mapped in CloseScreen(). While there nuke a spurious
return.
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
xsrc/external/mit/xf86-video-suncg6/dist/src/cg6_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-suncg6/dist/src/cg6_driver.c
diff -u xsrc/external/mit/xf86-video-suncg6/dist/src/cg6_driver.c:1.6 xsrc/external/mit/xf86-video-suncg6/dist/src/cg6_driver.c:1.7
--- xsrc/external/mit/xf86-video-suncg6/dist/src/cg6_driver.c:1.6 Fri Jun 10 01:38:31 2011
+++ xsrc/external/mit/xf86-video-suncg6/dist/src/cg6_driver.c Thu Jun 28 01:16:49 2012
@@ -688,19 +688,31 @@ CG6CloseScreen(int scrnIndex, ScreenPtr
{
ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
Cg6Ptr pCg6 = GET_CG6_FROM_SCRN(pScrn);
+ sbusDevicePtr psdp = pCg6->psdp;
pScrn->vtSema = FALSE;
- xf86UnmapSbusMem(pCg6->psdp, pCg6->fbc,
- CG6_RAM_VOFF - CG6_FBC_VOFF +
- (pCg6->psdp->width * pCg6->psdp->height));
+ if (pCg6->fbc) {
+ xf86UnmapSbusMem(psdp, pCg6->fbc, sizeof(*pCg6->fbc));
+ pCg6->fbc = NULL;
+ }
+
+ if (pCg6->thc) {
+ xf86UnmapSbusMem(psdp, pCg6->thc, sizeof(*pCg6->thc));
+ pCg6->thc = NULL;
+ }
+
+ if (pCg6->fb) {
+ xf86UnmapSbusMem(psdp, pCg6->fb, pCg6->vidmem);
+ pCg6->fb = NULL;
+ }
if (pCg6->HWCursor)
xf86SbusHideOsHwCursor(pCg6->psdp);
pScreen->CloseScreen = pCg6->CloseScreen;
+
return (*pScreen->CloseScreen)(scrnIndex, pScreen);
- return FALSE;
}