sna: Force GTT readback if the GPU is wedged

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2013-02-07 13:33:58 +00:00
parent 8a272971d5
commit feeff6fcef
1 changed files with 5 additions and 2 deletions

View File

@ -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))