summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_texture.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/r600_texture.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/r600_texture.c')
-rw-r--r--src/gallium/drivers/r600/r600_texture.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c
index 96c3729bc08..1d04cc06014 100644
--- a/src/gallium/drivers/r600/r600_texture.c
+++ b/src/gallium/drivers/r600/r600_texture.c
@@ -851,7 +851,9 @@ static void *r600_texture_transfer_map(struct pipe_context *ctx,
if (usage & PIPE_TRANSFER_READ) {
r600_copy_to_staging_texture(ctx, trans);
/* flush gfx & dma ring, order does not matter as only one can be live */
- rctx->rings.dma.flush(rctx, 0);
+ if (rctx->rings.dma.cs) {
+ rctx->rings.dma.flush(rctx, 0);
+ }
rctx->rings.gfx.flush(rctx, 0);
}
} else {