summaryrefslogtreecommitdiff
path: root/lwis_fence.c
diff options
context:
space:
mode:
authorTommy Kardach <thomaskardach@google.com>2022-06-09 15:55:02 +0000
committerTommy Kardach <thomaskardach@google.com>2022-06-28 20:11:14 +0000
commita423aa44f05c9d37625f22004daacdffab61b5f6 (patch)
tree40b3ab0d3dc25e6e9b26943c757433b43220ef65 /lwis_fence.c
parent75ab9e84f348e4432eb9ef04c27368c3c89c8baf (diff)
downloadlwis-a423aa44f05c9d37625f22004daacdffab61b5f6.tar.gz
LWIS: Implement TriggerExpression SignalFenceOnDone
Implements adding external lwis_fences to signal when the transaction completes. Bug: 232844639 Test: Pixel camera checklist Change-Id: If06a63beb6dfd8a3cc5203940a1ff71b9a9640be Signed-off-by: Tommy Kardach <thomaskardach@google.com>
Diffstat (limited to 'lwis_fence.c')
-rw-r--r--lwis_fence.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/lwis_fence.c b/lwis_fence.c
index 554e035..7b45184 100644
--- a/lwis_fence.c
+++ b/lwis_fence.c
@@ -507,16 +507,19 @@ int lwis_initialize_completion_fences(struct lwis_client *client,
int fd_or_err;
struct lwis_transaction_info *info = &transaction->info;
- if (info->create_completion_fence) {
+ if (info->completion_fence_fd == LWIS_CREATE_COMPLETION_FENCE) {
fd_or_err = lwis_fence_create(client->lwis_dev);
if (fd_or_err < 0) {
return fd_or_err;
}
- ret = lwis_add_completion_fence(client, transaction, fd_or_err);
+ info->completion_fence_fd = fd_or_err;
+ }
+
+ if (info->completion_fence_fd >= 0) {
+ ret = lwis_add_completion_fence(client, transaction, info->completion_fence_fd);
if (ret) {
return ret;
}
- info->completion_fence_fd = fd_or_err;
}
return 0;