diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-10-30 09:55:57 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-10-30 13:42:44 +0000 |
commit | 59531ba31aa479497cb76b67ea972d1cfa6aec79 (patch) | |
tree | fcb9ea38b9b2a03137b50aa045115f551f7c7a63 /src/sna/gen3_render.c | |
parent | 87655e7df4847542db8da6c8b61006c95b936185 (diff) |
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 <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen3_render.c')
-rw-r--r-- | src/sna/gen3_render.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/sna/gen3_render.c b/src/sna/gen3_render.c index cec35f45..dc20c02f 100644 --- a/src/sna/gen3_render.c +++ b/src/sna/gen3_render.c @@ -5949,7 +5949,8 @@ gen3_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; } gen3_align_vertex(sna, &tmp); @@ -6095,7 +6096,8 @@ gen3_render_fill(struct sna *sna, uint8_t alu, 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; } tmp->blt = gen3_render_fill_op_blt; @@ -6176,9 +6178,13 @@ gen3_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 (gen3_render_fill_one_try_blt(sna, dst, bo, color, x1, y1, x2, y2, alu)) return true; + + if (!kgem_check_bo(&sna->kgem, bo, NULL)) + return false; } gen3_align_vertex(sna, &tmp); |