[patch] fix driver hang when vt switch with rotation
Hong Liu
hong.liu at intel.com
Tue Mar 11 01:56:44 PDT 2008
The rotate memory buffer is allocated by TTM now, the mem->offset may be changed
after rebinding during VT switch.
This causes driver hang after switching back to X server.
Thanks,
Hong
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 854e377..5976ed8 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -3205,6 +3205,17 @@ I830EnterVT(int scrnIndex, int flags)
output->funcs->dpms(output, DPMSModeOff);
}
+ for (o = 0; o < config->num_crtc; o++) {
+ xf86CrtcPtr crtc = config->crtc[o];
+
+ if (crtc->rotatedPixmap || crtc->rotatedData) {
+ crtc->funcs->shadow_destroy(crtc, crtc->rotatedPixmap,
+ crtc->rotatedData);
+ crtc->rotatedPixmap = NULL;
+ crtc->rotatedData = NULL;
+ }
+ }
+
if (!xf86SetDesiredModes (pScrn))
return FALSE;
More information about the xorg
mailing list