summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/radeon
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2011-08-03 21:01:31 +0200
committerMarek Olšák <[email protected]>2011-08-05 07:08:18 +0200
commit5b005ecc2b624a0ffb577ab760abacf069694f8d (patch)
treec64d6b8159456b1e358309e47e7e68e264da2dbb /src/gallium/winsys/radeon
parent64ab39b035f755510a644643b96451431bbe5f27 (diff)
winsys/radeon: do the CS cleanup in the CS ioctl thread
Diffstat (limited to 'src/gallium/winsys/radeon')
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_cs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c
index fec660d4cc8..1b30b95a318 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c
@@ -380,6 +380,8 @@ static PIPE_THREAD_ROUTINE(radeon_drm_cs_emit_ioctl, param)
for (i = 0; i < csc->crelocs; i++)
p_atomic_dec(&csc->relocs_bo[i]->num_active_ioctls);
+
+ radeon_cs_context_cleanup(csc);
return NULL;
}
@@ -424,6 +426,8 @@ static void radeon_drm_cs_flush(struct radeon_winsys_cs *rcs, unsigned flags)
} else {
radeon_drm_cs_emit_ioctl(cs->csc);
}
+ } else {
+ radeon_cs_context_cleanup(cs->csc);
}
/* Flip command streams. */
@@ -432,8 +436,6 @@ static void radeon_drm_cs_flush(struct radeon_winsys_cs *rcs, unsigned flags)
cs->cst = tmp;
/* Prepare a new CS. */
- radeon_cs_context_cleanup(cs->csc);
-
cs->base.buf = cs->csc->buf;
cs->base.cdw = 0;
}