diff options
author | Dave Airlie <airlied@linux.ie> | 2006-04-21 00:34:43 +0000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2006-04-21 00:34:43 +0000 |
commit | f1f057df9aaba42986d9e20afe6f609a90318333 (patch) | |
tree | 00c3abd8198b0ae0570f9f3025c354d51f6937ac /src/radeon_dri.c | |
parent | 31396df3b0101571bb85a4a66b67f5a8b0c992a9 (diff) |
Add support for backing up the PCIE GART table on VT switch. This makes
suspend/resume work a lot better on PCIE cards.
Diffstat (limited to 'src/radeon_dri.c')
-rw-r--r-- | src/radeon_dri.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/radeon_dri.c b/src/radeon_dri.c index 47b03bad..55eb2972 100644 --- a/src/radeon_dri.c +++ b/src/radeon_dri.c @@ -1765,6 +1765,11 @@ void RADEONDRICloseScreen(ScreenPtr pScreen) info->pciMemHandle = 0; } + if (info->pciGartBackup) { + xfree(info->pciGartBackup); + info->pciGartBackup = NULL; + } + /* De-allocate all DRI resources */ DRICloseScreen(pScreen); @@ -2040,5 +2045,13 @@ void RADEONDRIAllocatePCIGARTTable(ScreenPtr pScreen) return; info->pciGartSize = RADEON_PCIGART_TABLE_SIZE; + + /* allocate space to back up PCIEGART table */ + info->pciGartBackup = xnfcalloc(1, info->pciGartSize); + if (info->pciGartBackup == NULL) + return; + info->pciGartOffset = (info->FbMapSize - info->FbSecureSize); + + } |