]> asedeno.scripts.mit.edu Git - linux.git/commit
habanalabs: perform accounting for active CS
authorOded Gabbay <oded.gabbay@gmail.com>
Sun, 3 Mar 2019 13:13:15 +0000 (15:13 +0200)
committerOded Gabbay <oded.gabbay@gmail.com>
Sun, 3 Mar 2019 13:13:15 +0000 (15:13 +0200)
commitcbaa99ed1b697072f089693a7fe2d649d08bf317
tree0af62e0d486c1aae0539c7d44cc3ddc3bbf26107
parentd12a5e2458d49aad2b7d25766794eec95ae8f6f1
habanalabs: perform accounting for active CS

This patch adds accounting for active CS. Active means that the CS was
submitted to the H/W queues and was not completed yet.

This is necessary to support suspend operation. Because the device will be
reset upon suspend, we can only suspend after all active CS have been
completed. Hence, we need to perform accounting on their number.

Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/misc/habanalabs/command_submission.c
drivers/misc/habanalabs/device.c
drivers/misc/habanalabs/habanalabs.h
drivers/misc/habanalabs/hw_queue.c