From: John Stultz <jstultz@google.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: "John Stultz" <jstultz@google.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"Jason Ekstrand" <jason@jlekstrand.net>,
"Christian König" <christian.koenig@amd.com>,
"Lionel Landwerlin" <lionel.g.landwerlin@intel.com>,
"Chunming Zhou" <david1.zhou@amd.com>,
"David Airlie" <airlied@linux.ie>,
"Daniel Vetter" <daniel@ffwll.ch>,
dri-devel@lists.freedesktop.org
Subject: [RFC][PATCH 1/3] drm: drm_syncobj: Add note in DOC about absolute timeout values
Date: Tue, 12 Jul 2022 04:22:56 +0000 [thread overview]
Message-ID: <20220712042258.293010-1-jstultz@google.com> (raw)
After having to debug down through the kernel to figure out
why my _WAIT calls were always timing out, I realized its
an absolute timeout value instead of the more common relative
timeouts.
This detail should be called out in the documentation, as while
the absolute value makes sense here, its not as common for timeout
values.
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Jason Ekstrand <jason@jlekstrand.net>
Cc: Christian König <christian.koenig@amd.com>
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: Chunming Zhou <david1.zhou@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: John Stultz <jstultz@google.com>
---
drivers/gpu/drm/drm_syncobj.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c
index 7e48dcd1bee4..b84d842a1c21 100644
--- a/drivers/gpu/drm/drm_syncobj.c
+++ b/drivers/gpu/drm/drm_syncobj.c
@@ -136,6 +136,10 @@
* requirement is inherited from the wait-before-signal behavior required by
* the Vulkan timeline semaphore API.
*
+ * It should be noted, that both &DRM_IOCTL_SYNCOBJ_WAIT and
+ * &DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT takes an *absolute* CLOCK_MONOTONIC
+ * nanosecond value for the timeout value. Accidentally passing relative time
+ * values will likely result in an immediate -ETIME return.
*
* Import/export of syncobjs
* -------------------------
--
2.37.0.144.g8ac04bfd2-goog
next reply other threads:[~2022-07-12 4:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-12 4:22 John Stultz [this message]
2022-07-12 4:22 ` [RFC][PATCH 2/3] drm: vgem: Enable SYNCOBJ and SYNCOBJ_TIMELINE on vgem driver John Stultz
2022-07-12 7:45 ` Christian König
2022-07-12 16:50 ` John Stultz
2022-07-13 8:02 ` Christian König
2022-07-12 4:22 ` [RFC][PATCH 3/3] kselftest: Add drm_syncobj API test tool John Stultz
2022-07-12 7:43 ` Christian König
2022-07-12 15:52 ` John Stultz
2022-08-10 16:42 ` Daniel Vetter
2022-07-12 5:29 ` [RFC][PATCH 1/3] drm: drm_syncobj: Add note in DOC about absolute timeout values John Stultz
2022-07-12 7:40 ` Christian König
2022-07-12 15:48 ` John Stultz
2022-07-12 15:54 ` Christian König
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220712042258.293010-1-jstultz@google.com \
--to=jstultz@google.com \
--cc=airlied@linux.ie \
--cc=christian.koenig@amd.com \
--cc=daniel@ffwll.ch \
--cc=david1.zhou@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jason@jlekstrand.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lionel.g.landwerlin@intel.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox