diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-05-31 17:23:36 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-05-31 18:00:11 +0100 |
commit | cd38b705be84901a38380dc2a1b90889b553d565 (patch) | |
tree | 7e3f647b1cbf7e9bda7297fda95d04f6aa139cf7 /uxa/uxa-render.c | |
parent | 5fff430046db2030f89e49beb66c6476dc3fcd4c (diff) |
Disable acceleration if we detect a hardware error.
This is wildly optimistic, but it should work in a surprising number of
error situations and some output in those cases will be hopefully be
better than none...
If we submit a batchbuffer and the kernel reports the GPU is hung (which
will be caused by an earlier execbuffer, and so the kernel should have
had enough time to determine whether or not it could reset the GPU) then
disable any further attempt to accelerate gfx and force fallbacks to map
the buffers and use the CPU. We cannot normally map any more buffers if
the GPU is hung, so only those already mapped prior to the hang can be
written to, or those allocated in system memory. However, we can expect
that the framebuffer is already mapped, and so have a reasonable
expectation to continue to see the display update.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'uxa/uxa-render.c')
-rw-r--r-- | uxa/uxa-render.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c index caa36ee1..0e4fa91d 100644 --- a/uxa/uxa-render.c +++ b/uxa/uxa-render.c @@ -167,6 +167,10 @@ uxa_print_composite_fallback(const char *func, CARD8 op, if (! uxa_screen->fallback_debug) return; + /* Limit the noise if fallbacks are expected. */ + if (uxa_screen->force_fallback) + return; + uxa_composite_fallback_pict_desc(pSrc, srcdesc, 40); uxa_composite_fallback_pict_desc(pMask, maskdesc, 40); uxa_composite_fallback_pict_desc(pDst, dstdesc, 40); @@ -1502,17 +1506,15 @@ uxa_composite(CARD8 op, RegionRec region; int tx, ty; - if (uxa_screen->swappedOut) + if (uxa_screen->swappedOut || uxa_screen->force_fallback) goto fallback; if (!uxa_drawable_is_offscreen(pDst->pDrawable)) goto fallback; - if (pDst->alphaMap || pSrc->alphaMap || (pMask && pMask->alphaMap)) goto fallback; - /* Remove repeat in source if useless */ if (pSrc->pDrawable && pSrc->repeat && pSrc->filter != PictFilterConvolution && transform_is_integer_translation(pSrc->transform, &tx, &ty) && |