Skip to content

Commit 21670bd

Browse files
anarsoulyuq
authored andcommitted
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: [email protected] Fixes: a1d2a63 ("drm/lima: driver for ARM Mali4xx GPUs") Signed-off-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent a3200de commit 21670bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/lima/lima_gem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ int lima_gem_wait(struct drm_file *file, u32 handle, u32 op, s64 timeout_ns)
342342
timeout = drm_timeout_abs_to_jiffies(timeout_ns);
343343

344344
ret = drm_gem_reservation_object_wait(file, handle, write, timeout);
345-
if (ret == 0)
345+
if (ret == -ETIME)
346346
ret = timeout ? -ETIMEDOUT : -EBUSY;
347347

348348
return ret;

0 commit comments

Comments
 (0)