summaryrefslogtreecommitdiff
path: root/drivers/misc
diff options
context:
space:
mode:
authorOfir Bitton <obitton@habana.ai>2020-10-25 09:36:08 +0200
committerOded Gabbay <ogabbay@kernel.org>2020-11-30 10:47:32 +0200
commitc1d505a922fe89ff44db4de5f88f20037a571c7a (patch)
tree293f2cfab0270a6e45cebe2bbe9ce4afdbf4114b /drivers/misc
parent4ba1b227b6c77252f49f96aa77cf1b50b9d2542c (diff)
habanalabs: release signal if collective wait was dropped
As in standard wait cs, we must release a signal fence once a collective wait cs was dropped and not submitted. Signed-off-by: Ofir Bitton <obitton@habana.ai> Reviewed-by: Oded Gabbay <ogabbay@kernel.org> Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/habanalabs/common/command_submission.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/misc/habanalabs/common/command_submission.c b/drivers/misc/habanalabs/common/command_submission.c
index 56dc18f0bc27..536e09542e22 100644
--- a/drivers/misc/habanalabs/common/command_submission.c
+++ b/drivers/misc/habanalabs/common/command_submission.c
@@ -300,9 +300,11 @@ static void cs_do_release(struct kref *ref)
if (!cs->submitted) {
/* In case the wait for signal CS was submitted, the put occurs
- * in init_signal_wait_cs() right before hanging on the PQ.
+ * in init_signal_wait_cs() or collective_wait_init_cs()
+ * right before hanging on the PQ.
*/
- if (cs->type == CS_TYPE_WAIT)
+ if (cs->type == CS_TYPE_WAIT ||
+ cs->type == CS_TYPE_COLLECTIVE_WAIT)
hl_fence_put(cs->signal_fence);
goto out;