broadcom/vc4: Fix infinite retry in vc4_bo_alloc()
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Tue, 26 Sep 2017 07:48:37 +0000 (09:48 +0200)
committerEric Anholt <eric@anholt.net>
Tue, 26 Sep 2017 21:49:48 +0000 (14:49 -0700)
commitef578906d849bf05d04d246e9e3994146dddc01d
tree802919dfa931d1f989515a344d40b3d04d9f094a
parent68c91a87d73cfcd947e09803ceb800b50bf9e399
broadcom/vc4: Fix infinite retry in vc4_bo_alloc()

cleared_and_retried is always reset to false when jumping to the retry
label, thus leading to an infinite retry loop.

Fix that by moving the cleared_and_retried variable definitions at the
beginning of the function.  While we're at it, move the create variable
with the other local variables and explicitly reset its content in the
retry path.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Fixes: 78087676c98aa8884ba92 "vc4: Restructure the simulator mode."
src/gallium/drivers/vc4/vc4_bufmgr.c