xf86-video-intel: src/sna/sna_dri2.c
Chris Wilson
ickle at kemper.freedesktop.org
Fri Jun 19 07:33:11 PDT 2015
src/sna/sna_dri2.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
New commits:
commit fa1b4058985783f2a2f2d59a6f0d76266bba22d1
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Fri Jun 19 15:31:44 2015 +0100
sna/dri2: Add a bit of paranoia required for a wedged GPU
We can fail to submit the batch if the GPU is wedged (or the driver
upset), in which case the bo will be NULL and we should not blindly
dereference it.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c
index 52a64f0..e8c7a09 100644
--- a/src/sna/sna_dri2.c
+++ b/src/sna/sna_dri2.c
@@ -1294,10 +1294,11 @@ __sna_dri2_copy_region(struct sna *sna, DrawablePtr draw, RegionPtr region,
if (rq != (void *)&sna->kgem) {
if (rq->bo == NULL)
kgem_submit(&sna->kgem);
- assert(rq->bo);
- bo = ref(rq->bo);
- DBG(("%s: recording sync fence handle=%d\n",
- __FUNCTION__, bo->handle));
+ if (rq->bo) { /* Becareful in case the gpu is wedged */
+ bo = ref(rq->bo);
+ DBG(("%s: recording sync fence handle=%d\n",
+ __FUNCTION__, bo->handle));
+ }
}
}
More information about the xorg-commit
mailing list