diff options
author | Francisco Jerez <currojerez@gmail.com> | 2008-12-16 02:39:49 +0100 |
---|---|---|
committer | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-12-17 17:16:02 -0200 |
commit | 5a07709ae41600bc02205753c64d764f11838240 (patch) | |
tree | cbe02d712f6b8a388d7eb20842607c28c1e70bf4 /src/smi_crtc.c | |
parent | 47bcfb505886d16ff864f26a9cfa5f43b5da710e (diff) |
Fix crashes when switching VTs with EXA enabled.
Call ModifyPixmapHeader on SMI_EnterVT to update the screen pixmap
address tracked by EXA.
Set memoryBase in the ExaDriverRec to NULL when switching out: some
pixmap could get allocated near the former aperture address and it
could be erroneously considered as being in offscreen memory.
Diffstat (limited to 'src/smi_crtc.c')
-rw-r--r-- | src/smi_crtc.c | 9 |
1 files changed, 5 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; |