stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/lima: fix lima_gem_wait() return value
@ 2019-09-08  2:48 Vasily Khoruzhick
  2019-09-09  2:30 ` Qiang Yu
  0 siblings, 1 reply; 6+ messages in thread
From: Vasily Khoruzhick @ 2019-09-08  2:48 UTC (permalink / raw)
  To: Qiang Yu, David Airlie, Daniel Vetter, dri-devel, lima
  Cc: Vasily Khoruzhick, stable

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
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
---
 drivers/gpu/drm/lima/lima_gem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/lima/lima_gem.c b/drivers/gpu/drm/lima/lima_gem.c
index 477c0f766663..b609dc030d6c 100644
--- a/drivers/gpu/drm/lima/lima_gem.c
+++ b/drivers/gpu/drm/lima/lima_gem.c
@@ -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;
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-09-10  3:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-08  2:48 [PATCH] drm/lima: fix lima_gem_wait() return value Vasily Khoruzhick
2019-09-09  2:30 ` Qiang Yu
2019-09-09 12:18   ` [Lima] " Heiko Stübner
2019-09-09 16:23     ` Vasily Khoruzhick
2019-09-10  1:16       ` Qiang Yu
2019-09-10  3:09         ` Qiang Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).