[Intel-gfx] [PATCH igt 1/2] lib/sw_sync: Cleanup up error message for sw_sync_timeline_inc()
Chris Wilson
chris at chris-wilson.co.uk
Fri Oct 13 15:28:37 UTC 2017
do_ioctl() generates an incompressible error string, replace with a
functio so that the assert is readable.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
lib/sw_sync.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/lib/sw_sync.c b/lib/sw_sync.c
index 9b36dd85..e691952b 100644
--- a/lib/sw_sync.c
+++ b/lib/sw_sync.c
@@ -152,9 +152,21 @@ int sw_sync_timeline_create_fence(int fd, uint32_t seqno)
return fence;
}
+static int __sw_sync_timeline_inc(int fd, uint32_t count)
+{
+ int err;
+
+ err = 0;
+ if (igt_ioctl(fd, INT_SYNC_IOC_INC, &count))
+ err = -errno;
+
+ errno = 0;
+ return err;
+}
+
void sw_sync_timeline_inc(int fd, uint32_t count)
{
- do_ioctl(fd, INT_SYNC_IOC_INC, &count);
+ igt_assert_eq(__sw_sync_timeline_inc(fd, count), 0);
}
int sync_fence_merge(int fd1, int fd2)
--
2.15.0.rc0
More information about the Intel-gfx
mailing list