aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/lima/lima_bo.c
diff options
context:
space:
mode:
authorVasily Khoruzhick <[email protected]>2019-09-07 19:30:39 -0700
committerVasily Khoruzhick <[email protected]>2019-09-22 19:20:59 -0700
commit9f897a2b4cf2c0e222487470053a69de843f2084 (patch)
treee4d482d2e461d4d92432d3968cf7f2d68c26d50e /src/gallium/drivers/lima/lima_bo.c
parent7f7ac21088603aa1ab70119bba3fd97317435276 (diff)
lima: use 0 to poll if BO is busy in lima_bo_wait()
os_time_get_absolute_timeout(0) returns current time, while kernel driver expects 0 as value to poll BO status and return immediately. Fix it by setting abs_timeout to 0 if timeout_ns is 0 Reviewed-by: Qiang Yu <[email protected]> Signed-off-by: Vasily Khoruzhick <[email protected]>
Diffstat (limited to 'src/gallium/drivers/lima/lima_bo.c')
-rw-r--r--src/gallium/drivers/lima/lima_bo.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/drivers/lima/lima_bo.c b/src/gallium/drivers/lima/lima_bo.c
index bd1f6cf8c8c..b082d32afd8 100644
--- a/src/gallium/drivers/lima/lima_bo.c
+++ b/src/gallium/drivers/lima/lima_bo.c
@@ -326,7 +326,13 @@ struct lima_bo *lima_bo_import(struct lima_screen *screen,
bool lima_bo_wait(struct lima_bo *bo, uint32_t op, uint64_t timeout_ns)
{
- int64_t abs_timeout = os_time_get_absolute_timeout(timeout_ns);
+ int64_t abs_timeout;
+
+ if (timeout_ns == 0)
+ abs_timeout = 0;
+ else
+ abs_timeout = os_time_get_absolute_timeout(timeout_ns);
+
if (abs_timeout == OS_TIMEOUT_INFINITE)
abs_timeout = INT64_MAX;