summaryrefslogtreecommitdiff
path: root/src/sna/kgem.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-01-19 15:18:44 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2014-01-19 15:18:44 +0000
commitd41bbfc97c46b01227f193d7e938390691a8b581 (patch)
tree96cf494c352e7dcbcc451234770fb700d2fbcbc8 /src/sna/kgem.c
parentd7f753ba89c928f141f1feb750733f53130c3bfb (diff)
sna: Always emit an error message when an execbuffer fails
So that we are not left with a puzzled user with a mysteriously slow machine. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/kgem.c')
-rw-r--r--src/sna/kgem.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 0aee9586..7badee17 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -3016,16 +3016,18 @@ void _kgem_submit(struct kgem *kgem)
ret = drmIoctl(kgem->fd, DRM_IOCTL_I915_GEM_SET_DOMAIN, &set_domain);
}
if (ret == -1) {
- DBG(("%s: GPU hang detected [%d]\n",
- __FUNCTION__, errno));
+ ret = errno;
kgem_throttle(kgem);
- kgem->wedged = true;
+ if (!kgem->wedged) {
+ xf86DrvMsg(kgem_get_screen_index(kgem), X_ERROR,
+ "Failed to submit rendering commands, disabling acceleration.\n");
+ kgem->wedged = true;
+ }
#if !NDEBUG
- ret = errno;
ErrorF("batch[%d/%d]: %d %d %d, nreloc=%d, nexec=%d, nfence=%d, aperture=%d, fenced=%d, high=%d,%d: errno=%d\n",
kgem->mode, kgem->ring, batch_end, kgem->nbatch, kgem->surface,
- kgem->nreloc, kgem->nexec, kgem->nfence, kgem->aperture, kgem->aperture_fenced, kgem->aperture_high, kgem->aperture_total, errno);
+ kgem->nreloc, kgem->nexec, kgem->nfence, kgem->aperture, kgem->aperture_fenced, kgem->aperture_high, kgem->aperture_total, ret);
for (i = 0; i < kgem->nexec; i++) {
struct kgem_bo *bo, *found = NULL;