From 353832ce83be8c342ff9e284855cd543bcaae163 Mon Sep 17 00:00:00 2001 From: Hong Liu Date: Thu, 24 Apr 2008 17:03:31 +0800 Subject: [PATCH] intel-kernelmode: fix VT switch crash X server ring buffer registers can only be accessed when not using drm kernel modesetting. --- src/i830_driver.c | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/i830_driver.c b/src/i830_driver.c index 953762b..bf9ad9f 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -3388,9 +3388,11 @@ I830EnterVT(int scrnIndex, int flags) if (!pI830->starting) { I830DRIResume(screenInfo.screens[scrnIndex]); - i830_refresh_ring(pScrn); - I830Sync(pScrn); - DO_RING_IDLE(); + if (!pI830->use_drm_mode) { + i830_refresh_ring(pScrn); + I830Sync(pScrn); + DO_RING_IDLE(); + } DPRINTF(PFX, "calling dri unlock\n"); I830DRIUnlock(pScrn); @@ -3431,9 +3433,11 @@ I830EnterVT(int scrnIndex, int flags) I830DRIResume(screenInfo.screens[scrnIndex]); - i830_refresh_ring(pScrn); - I830Sync(pScrn); - DO_RING_IDLE(); + if (!pI830->use_drm_mode) { + i830_refresh_ring(pScrn); + I830Sync(pScrn); + DO_RING_IDLE(); + } sarea->texAge++; for(i = 0; i < I830_NR_TEX_REGIONS+1 ; i++) -- 1.5.0.5