[Intel-gfx] [PATCH] Fallback when VT inactive

Keith Packard keithp at keithp.com
Fri May 8 01:35:19 CEST 2009


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.

Signed-off-by: Keith Packard <keithp at keithp.com>
---
 src/i830_exa.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/i830_exa.c b/src/i830_exa.c
index 0a15de8..62022c9 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -126,6 +126,11 @@ 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");
+	return FALSE;
+    }
+
     bo_table[0] = pI830->batch_bo;
     if (drm_intel_bufmgr_check_aperture_space(bo_table, num_bos) != 0) {
 	intel_batch_flush(pScrn, FALSE);
-- 
1.6.2.4




More information about the Intel-gfx mailing list