lima: actually wait for bo in lima_bo_wait
authorErico Nunes <nunes.erico@gmail.com>
Wed, 14 Aug 2019 20:39:33 +0000 (22:39 +0200)
committerErico Nunes <nunes.erico@gmail.com>
Fri, 16 Aug 2019 14:31:29 +0000 (16:31 +0200)
commit7a51abab425af6c467d70109a95b22937bd3a63d
tree9bf17d7718a60e44d8fde31e5ab48438b83e9ca9
parent0a790c3019f24dcf905c1c6245827525a11f2a44
lima: actually wait for bo in lima_bo_wait

PIPE_TIMEOUT_INFINITE is unsigned and gets assigned to signed fields
where it ends up as -1. When this reaches the kernel as a timeout it
gets translated as no timeout, which cause the waiting functions to
return immediately and not actually wait for a completion.

This seems to cause unstable results with lima where even piglit tests
randomly fail.

Handle this by setting the signed max value in case of infinite timeout.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
src/gallium/drivers/lima/lima_bo.c
src/gallium/drivers/lima/lima_submit.c