diff options
author | Kevin Brace <kevinbrace@gmx.com> | 2020-03-06 15:37:07 -0800 |
---|---|---|
committer | Kevin Brace <kevinbrace@gmx.com> | 2020-03-06 15:38:34 -0800 |
commit | 90f1c9d2fcc8d8a60999884f76be4d97387f4b91 (patch) | |
tree | bc75c889c9cfb99043d4bc91a2925befc298cd19 /src | |
parent | b698576623cb2996578a4e296808926df59b5f8f (diff) |
Unmap MMIO and FB when tearing down the DDX
Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/via_driver.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/via_driver.c b/src/via_driver.c index 4733c04..152e9b6 100644 --- a/src/via_driver.c +++ b/src/via_driver.c @@ -396,6 +396,7 @@ static void VIAFreeScreen(FREE_SCREEN_ARGS_DECL) { SCRN_INFO_PTR(arg); + VIAPtr pVia = VIAPTR(pScrn); DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "VIAFreeScreen\n")); @@ -403,6 +404,10 @@ VIAFreeScreen(FREE_SCREEN_ARGS_DECL) vgaHWFreeHWRec(pScrn); } + if (!pVia->KMS) { + viaUnmapMMIO(pScrn); + } + VIAFreeRec(pScrn); } @@ -1397,6 +1402,10 @@ VIACloseScreen(CLOSE_SCREEN_ARGS_DECL) } #endif + if (!pVia->KMS) { + viaUnmapMMIO(pScrn); + } + pScrn->vtSema = FALSE; pScreen->CloseScreen = pVia->CloseScreen; return (*pScreen->CloseScreen) (CLOSE_SCREEN_ARGS); |