diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-02-07 13:33:58 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-02-07 13:36:03 +0000 |
commit | feeff6fcefccdca5335fea55c2fdbf8a4004c175 (patch) | |
tree | 752e4f61e621e8428400a9eccfd827f7ae5c6329 /src/sna/sna_io.c | |
parent | 8a272971d5971a56f57dde00dceb082d0b142c8c (diff) |
sna: Force GTT readback if the GPU is wedged
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_io.c')
-rw-r--r-- | src/sna/sna_io.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/sna/sna_io.c b/src/sna/sna_io.c index 85622bf9..f89cd89e 100644 --- a/src/sna/sna_io.c +++ b/src/sna/sna_io.c @@ -117,6 +117,9 @@ static void read_boxes_inplace(struct kgem *kgem, static bool download_inplace(struct kgem *kgem, struct kgem_bo *bo) { + if (unlikely(kgem->wedged)) + return true; + if (!kgem_bo_can_map(kgem, bo)) return false; @@ -623,7 +626,7 @@ static bool upload_inplace(struct kgem *kgem, const BoxRec *box, int n, int bpp) { - if (kgem->wedged) + if (unlikely(kgem->wedged)) return true; if (!kgem_bo_can_map(kgem, bo) && !upload_inplace__tiled(kgem, bo)) @@ -993,7 +996,7 @@ static bool upload_inplace__xor(struct kgem *kgem, const BoxRec *box, int n, int bpp) { - if (kgem->wedged) + if (unlikely(kgem->wedged)) return true; if (!kgem_bo_can_map(kgem, bo)) |