From: Petri Latvala <petri.latvala@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [CI 1/2] lib/sw_sync: Fix querying fence status
Date: Thu, 14 Mar 2019 12:27:39 +0200 [thread overview]
Message-ID: <20190314102740.5243-1-petri.latvala@intel.com> (raw)
From: Chris Wilson <chris@chris-wilson.co.uk>
To query the fence status, and only the fence status, you only need to
pass .num_fences = 0.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Petri Latvala <petri.latvala@intel.com>
---
lib/sw_sync.c | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/lib/sw_sync.c b/lib/sw_sync.c
index f2086033..d671923c 100644
--- a/lib/sw_sync.c
+++ b/lib/sw_sync.c
@@ -206,19 +206,12 @@ int sync_fence_count_status(int fd, int status)
int sync_fence_status(int fence)
{
- struct sync_fence_info fence_info;
- struct sync_file_info file_info = {
- .sync_fence_info = to_user_pointer(&fence_info),
- .num_fences = 1,
- };
+ struct sync_file_info info = { };
- if (ioctl(fence, SYNC_IOC_FILE_INFO, &file_info))
+ if (ioctl(fence, SYNC_IOC_FILE_INFO, &info))
return -errno;
- if (file_info.num_fences != 1)
- return -EINVAL;
-
- return fence_info.status;
+ return info.status;
}
static void modprobe(const char *driver)
--
2.19.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next reply other threads:[~2019-03-14 10:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-14 10:27 Petri Latvala [this message]
2019-03-14 10:27 ` [igt-dev] [CI 2/2] gem_exec_fence: Really loop through all engines Petri Latvala
2019-03-14 11:15 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [CI,1/2] lib/sw_sync: Fix querying fence status Patchwork
2019-03-14 12:51 ` Patchwork
2019-03-14 19:35 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2019-08-12 12:36 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [CI,1/2] lib/sw_sync: Fix querying fence status (rev2) Patchwork
2019-08-12 17:38 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2019-08-12 17:44 ` [igt-dev] [CI 1/2] lib/sw_sync: Fix querying fence status Matthew Auld
2019-08-12 17:47 ` Chris Wilson
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=20190314102740.5243-1-petri.latvala@intel.com \
--to=petri.latvala@intel.com \
--cc=igt-dev@lists.freedesktop.org \
/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