summaryrefslogtreecommitdiff
path: root/src/sna/gen4_render.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-10-30 09:55:57 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2013-10-30 13:42:44 +0000
commit59531ba31aa479497cb76b67ea972d1cfa6aec79 (patch)
treefcb9ea38b9b2a03137b50aa045115f551f7c7a63 /src/sna/gen4_render.c
parent87655e7df4847542db8da6c8b61006c95b936185 (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/gen4_render.c')
-rw-r--r--src/sna/gen4_render.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/sna/gen4_render.c b/src/sna/gen4_render.c
index f737c339..5d959914 100644
--- a/src/sna/gen4_render.c
+++ b/src/sna/gen4_render.c
@@ -1388,7 +1388,8 @@ gen4_render_video(struct sna *sna,
if (!kgem_check_bo(&sna->kgem, tmp.dst.bo, frame->bo, NULL)) {
kgem_submit(&sna->kgem);
- assert(kgem_check_bo(&sna->kgem, tmp.dst.bo, frame->bo, NULL));
+ if (!kgem_check_bo(&sna->kgem, tmp.dst.bo, frame->bo, NULL))
+ return false;
}
gen4_align_vertex(sna, &tmp);
@@ -2656,7 +2657,8 @@ gen4_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;
}
gen4_align_vertex(sna, &tmp);
@@ -2761,7 +2763,10 @@ gen4_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)) {
+ kgem_bo_destroy(&sna->kgem, op->base.src.bo);
+ return false;
+ }
}
gen4_align_vertex(sna, &op->base);