From 0bb0ff0e55aaf8e64017d204e376a14f0a7384a3 Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@linux.ie>
Date: Thu, 10 Sep 2009 11:48:00 +1000
Subject: [PATCH] r6xx: fix EXA crash with gtkperf -a
unmapping was getting unbalanced.
---
src/r6xx_accel.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/r6xx_accel.c b/src/r6xx_accel.c
index 985595e..3202d51 100644
--- a/src/r6xx_accel.c
+++ b/src/r6xx_accel.c
@@ -48,7 +48,7 @@ void r600_cs_flush_indirect(ScrnInfoPtr pScrn)
if (!info->cs->cdw)
return;
- if (info->accel_state->vb_bo) {
+ if (info->accel_state->vb_ptr) {
radeon_bo_unmap(info->accel_state->vb_bo);
info->accel_state->vb_ptr = NULL;
}
@@ -106,9 +106,10 @@ void R600IBDiscard(ScrnInfoPtr pScrn, drmBufPtr ib)
int ret;
RADEONInfoPtr info = RADEONPTR(pScrn);
if (info->cs) {
- if (info->accel_state->vb_bo)
+ if (info->accel_state->vb_ptr) {
radeon_bo_unmap(info->accel_state->vb_bo);
- info->accel_state->vb_bo = NULL;
+ info->accel_state->vb_ptr = NULL;
+ }
if (CS_FULL(info->cs)) {
r600_cs_flush_indirect(pScrn);
return;
--
1.6.4.2