From 59531ba31aa479497cb76b67ea972d1cfa6aec79 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 30 Oct 2013 09:55:57 +0000 Subject: sna: Check for wedged after submitting If we submit prior to an operation, check that we didn't just wedge the GPU. Signed-off-by: Chris Wilson --- src/sna/gen2_render.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/sna/gen2_render.c') diff --git a/src/sna/gen2_render.c b/src/sna/gen2_render.c index a0ba8ca8..1a4c36aa 100644 --- a/src/sna/gen2_render.c +++ b/src/sna/gen2_render.c @@ -2809,7 +2809,8 @@ gen2_render_fill_boxes(struct sna *sna, if (!kgem_check_bo(&sna->kgem, dst_bo, NULL)) { kgem_submit(&sna->kgem); - assert(kgem_check_bo(&sna->kgem, dst_bo, NULL)); + if (!kgem_check_bo(&sna->kgem, dst_bo, NULL)) + return false; } gen2_emit_fill_composite_state(sna, &tmp, pixel); @@ -3040,10 +3041,13 @@ gen2_render_fill_one(struct sna *sna, PixmapPtr dst, struct kgem_bo *bo, if (!kgem_check_bo(&sna->kgem, bo, NULL)) { kgem_submit(&sna->kgem); + if (gen2_render_fill_one_try_blt(sna, dst, bo, color, x1, y1, x2, y2, alu)) return true; - assert(kgem_check_bo(&sna->kgem, bo, NULL)); + + if (!kgem_check_bo(&sna->kgem, bo, NULL)) + return false; } tmp.op = alu; -- cgit v1.2.3