From e54a23bff068416ccbdb75d538dc7dcd40a6c95c Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 7 May 2009 16:35:19 -0700 Subject: [PATCH] Fallback when VT inactive While the VT is inactive, pI830->batch_bo will be NULL, so use that as a simple check for when to not use the accelerator. The alternative is to ignore VT switch and just keep drawing, which would also be fine. Bug #21468. Signed-off-by: Keith Packard [anholt: Removed extra return FALSE -- I830FALLBACK does that.] Signed-off-by: Eric Anholt --- src/i830_exa.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/i830_exa.c b/src/i830_exa.c index 0a15de83..c1f512d3 100644 --- a/src/i830_exa.c +++ b/src/i830_exa.c @@ -126,6 +126,9 @@ i830_get_aperture_space(ScrnInfoPtr pScrn, drm_intel_bo **bo_table, int num_bos) { I830Ptr pI830 = I830PTR(pScrn); + if (pI830->batch_bo == NULL) + I830FALLBACK("VT inactive\n"); + bo_table[0] = pI830->batch_bo; if (drm_intel_bufmgr_check_aperture_space(bo_table, num_bos) != 0) { intel_batch_flush(pScrn, FALSE);