summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/smi_crtc.c9
-rw-r--r--src/smi_driver.c8
2 files changed, 13 insertions, 4 deletions
diff --git a/src/smi_crtc.c b/src/smi_crtc.c
index 49354ea..0ff4390 100644
--- a/src/smi_crtc.c
+++ b/src/smi_crtc.c
@@ -209,12 +209,13 @@ SMI_CrtcConfigResize(ScrnInfoPtr pScrn,
pSmi->FBOffset = fbArea->offset;
pScrn->fbOffset = pSmi->FBOffset + pSmi->fbMapOffset;
+ pScrn->pScreen->ModifyPixmapHeader(pScrn->pScreen->GetScreenPixmap(pScrn->pScreen),
+ -1,-1,-1,-1,-1, pSmi->FBBase + pSmi->FBOffset);
+
if(pScrn->pixmapPrivate.ptr)
- /* Framebuffer access is disabled */
+ /* The pixmap devPrivate just set may be overwritten by
+ xf86EnableDisableFBAccess */
pScrn->pixmapPrivate.ptr = pSmi->FBBase + pSmi->FBOffset;
- else
- pScrn->pScreen->ModifyPixmapHeader(pScrn->pScreen->GetScreenPixmap(pScrn->pScreen),
- -1,-1,-1,-1,-1, pSmi->FBBase + pSmi->FBOffset);
/* Modify the screen pitch */
pScrn->displayWidth = aligned_pitch / pSmi->Bpp;
diff --git a/src/smi_driver.c b/src/smi_driver.c
index b23b291..a3b0589 100644
--- a/src/smi_driver.c
+++ b/src/smi_driver.c
@@ -1016,7 +1016,10 @@ SMI_EnterVT(int scrnIndex, int flags)
pSmi->Save(pScrn);
/* FBBase may have changed after remapping the memory */
+ pScrn->pScreen->ModifyPixmapHeader(pScrn->pScreen->GetScreenPixmap(pScrn->pScreen),
+ -1,-1,-1,-1,-1, pSmi->FBBase + pSmi->FBOffset);
pScrn->pixmapPrivate.ptr=pSmi->FBBase + pSmi->FBOffset;
+
if(pSmi->useEXA)
pSmi->EXADriverPtr->memoryBase=pSmi->FBBase;
@@ -1060,6 +1063,11 @@ SMI_LeaveVT(int scrnIndex, int flags)
unmapped. */
xf86RotateCloseScreen(pScrn->pScreen);
+ /* Pixmaps that by chance get allocated near the former aperture
+ address shouldn't be considered offscreen. */
+ if(pSmi->useEXA)
+ pSmi->EXADriverPtr->memoryBase=NULL;
+
/* Clear frame buffer */
memset(pSmi->FBBase, 0, pSmi->videoRAMBytes);