diff options
author | Kristian H. Kristensen <[email protected]> | 2020-01-14 16:56:41 -0800 |
---|---|---|
committer | Kristian H. Kristensen <[email protected]> | 2020-01-15 14:47:46 -0800 |
commit | a3a73d116c1425d1d2da2f3b3aabe06a53c3d800 (patch) | |
tree | 099bd764f2b1d8ffd003ce950cb8d240ea6f8c24 /src/gallium/drivers/iris/iris_fence.c | |
parent | 1ac138694b480e5eaba70a9efb076af6281a8009 (diff) |
iris: Print warning and return *out = NULL when fd to syncobj fails
Signed-off-by: Kristian H. Kristensen <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/gallium/drivers/iris/iris_fence.c')
-rw-r--r-- | src/gallium/drivers/iris/iris_fence.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/drivers/iris/iris_fence.c b/src/gallium/drivers/iris/iris_fence.c index 3de906cca29..dbd2d826588 100644 --- a/src/gallium/drivers/iris/iris_fence.c +++ b/src/gallium/drivers/iris/iris_fence.c @@ -343,7 +343,12 @@ iris_fence_create_fd(struct pipe_context *ctx, .flags = DRM_SYNCOBJ_FD_TO_HANDLE_FLAGS_IMPORT_SYNC_FILE, .fd = fd, }; - gen_ioctl(screen->fd, DRM_IOCTL_SYNCOBJ_FD_TO_HANDLE, &args); + if (gen_ioctl(screen->fd, DRM_IOCTL_SYNCOBJ_FD_TO_HANDLE, &args) == -1) { + fprintf(stderr, "DRM_IOCTL_SYNCOBJ_FD_TO_HANDLE failed: %s\n", + strerror(errno)); + *out = NULL; + return; + } struct iris_syncpt *syncpt = malloc(sizeof(*syncpt)); syncpt->handle = args.handle; |