]> git.baikalelectronics.ru Git - kernel.git/commit
habanalabs: fix wait offset handling
authorfarah kassabri <fkassabri@habana.ai>
Sun, 12 Sep 2021 11:30:35 +0000 (14:30 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Tue, 14 Sep 2021 12:00:04 +0000 (15:00 +0300)
commit862fcbad87182e386aba8ab6f3be7eb3df83f6db
tree1daffe4f49956c2dc62249d98fc95f1bf59f7461
parent12ce6cf965f0476638516721f10c3060b8d992be
habanalabs: fix wait offset handling

Add handling for case where the user doesn't set wait offset,
and keeps it as 0. In such a case the driver will decrement one
from this zero value which will cause the code to wait for
wrong number of signals.

The solution is to treat this case as in legacy wait cs,
and wait for the next signal.

Signed-off-by: farah kassabri <fkassabri@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/hw_queue.c