habanalabs: Separate CS job completion from its deallocation
authorTomer Tayar <ttayar@habana.ai>
Mon, 10 Aug 2020 14:30:35 +0000 (17:30 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Mon, 30 Nov 2020 08:47:33 +0000 (10:47 +0200)
commit649c4592124b0cf1faf044b5f14de208d08ebb50
tree08def5e5f6b3b105cc0bd4b19959dca09c373906
parent0da5698bf4b8c699e5e5e23d067f5a1bb1bb2401
habanalabs: Separate CS job completion from its deallocation

Current CS jobs are no longer needed after their completion.
However, jobs of future workload might be in use even after they are
completed. To allow that, the patch adds a refcount to the job object,
and decouples its completion handling from its deallocation.

Signed-off-by: Tomer Tayar <ttayar@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/debugfs.c
drivers/misc/habanalabs/common/habanalabs.h