mirror of
https://gitee.com/openharmony/third_party_mesa3d
synced 2024-12-02 12:46:30 +00:00
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 <yuq825@gmail.com> Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
This commit is contained in:
parent
7f7ac21088
commit
9f897a2b4c
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user