summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/evergreen_compute.c
diff options
context:
space:
mode:
authorJerome Glisse <[email protected]>2013-01-28 14:48:46 -0500
committerJerome Glisse <[email protected]>2013-01-28 14:51:40 -0500
commit72916698b056d0559263e84372bb45cd83a1c2c2 (patch)
tree923631099fde92a5b6ce5cd114de8435dd20d720 /src/gallium/drivers/r600/evergreen_compute.c
parentdbb2d192de33064ae6cdb799d71c5ac89a6ea8ff (diff)
r600g: fix segfault with old kernel9.1-branchpoint
Old kernel do not have dma support, patch pushed were missing some of the check needed to not use dma. Signed-off-by: Jerome Glisse <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/evergreen_compute.c')
-rw-r--r--src/gallium/drivers/r600/evergreen_compute.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/evergreen_compute.c b/src/gallium/drivers/r600/evergreen_compute.c
index f4a790585b1..128464e101a 100644
--- a/src/gallium/drivers/r600/evergreen_compute.c
+++ b/src/gallium/drivers/r600/evergreen_compute.c
@@ -321,7 +321,9 @@ static void compute_emit_cs(struct r600_context *ctx, const uint *block_layout,
ctx->cs_shader_state.shader->resources;
/* make sure that the gfx ring is only one active */
- ctx->rings.dma.flush(ctx, RADEON_FLUSH_ASYNC);
+ if (ctx->rings.dma.cs) {
+ ctx->rings.dma.flush(ctx, RADEON_FLUSH_ASYNC);
+ }
/* Initialize all the compute-related registers.
*