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 <kei...@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


------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to