habanalabs: add debug flag to prevent failure on timeout
authorYuri Nudelman <ynudelman@habana.ai>
Tue, 25 May 2021 11:49:52 +0000 (14:49 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Fri, 18 Jun 2021 12:23:41 +0000 (15:23 +0300)
commit8e8125f192288802267157f613c0ca654dfbde8e
tree0f64fe8484408c553eece8879d5421d005c63eb4
parent254fac6d1a73aac40aa4d423c993965987728040
habanalabs: add debug flag to prevent failure on timeout

Sometimes it is useful to allow the command to continue running despite
the timeout occurred, to differentiate between really stuck or just very
time consuming commands. This can be achieved by passing a new debug
flag alongside the cs, HL_CS_FLAGS_SKIP_RESET_ON_TIMEOUT.

Anyway, if the timeout occurred, a warning print shall be issued,
however this shall not fail the submission.

Signed-off-by: Yuri Nudelman <ynudelman@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/command_submission.c
drivers/misc/habanalabs/common/habanalabs.h
include/uapi/misc/habanalabs.h