mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-24 18:56:42 +07:00
drm/lima: fix lima_gem_wait() return value
drm_gem_reservation_object_wait() returns 0 if it succeeds and -ETIME
if it timeouts, but lima driver assumed that 0 is error.
Cc: stable@vger.kernel.org
Fixes: a1d2a63399
("drm/lima: driver for ARM Mali4xx GPUs")
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190908024800.23229-1-anarsoul@gmail.com
This commit is contained in:
parent
a3200debde
commit
21670bd78a
@ -342,7 +342,7 @@ int lima_gem_wait(struct drm_file *file, u32 handle, u32 op, s64 timeout_ns)
|
||||
timeout = drm_timeout_abs_to_jiffies(timeout_ns);
|
||||
|
||||
ret = drm_gem_reservation_object_wait(file, handle, write, timeout);
|
||||
if (ret == 0)
|
||||
if (ret == -ETIME)
|
||||
ret = timeout ? -ETIMEDOUT : -EBUSY;
|
||||
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user