habanalabs: keep a record of completed CS outcomes
authorYuri Nudelman <ynudelman@habana.ai>
Tue, 24 May 2022 13:29:03 +0000 (16:29 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Tue, 12 Jul 2022 06:09:22 +0000 (09:09 +0300)
commit2bc61bc4f3eadc967f8540ef48f2085198b24db8
treefc1230e86b50dded602f42aaf8e206a41a84bc10
parent8742a75a1c3f4c93efedfa5004d18c87e467ca3b
habanalabs: keep a record of completed CS outcomes

Often, the user is not interested in the completion timestamp of all
command submissions.
A common situation is, for example, when the user submits a burst of,
possibly, several thousands of commands, then request the completion
timestamp of only couple of specific key commands from all the burst.
The problem is that currently, the outcome of the early commands may be
lost, due to a large amount of later commands, that the user does not
really care about.

This patch creates a separate store with the outcomes of commands the
user has mark explicitly as interested in. This store does not mix the
marked commands with the unmarked ones, hence the data there will
survive for much longer.

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/context.c
drivers/misc/habanalabs/common/habanalabs.h