accel/habanalabs: add info when FD released while device still in use
authorTomer Tayar <ttayar@habana.ai>
Wed, 18 Jan 2023 15:35:17 +0000 (17:35 +0200)
committerOded Gabbay <ogabbay@kernel.org>
Wed, 15 Mar 2023 11:29:12 +0000 (13:29 +0200)
commitd43bce6e762f25b25685487630510452feaf7362
tree51e3fb724942476cfa9a1fde12f1352bd4ebbcbc
parentc0e6df916050dbc71450d20e8df6712c2ebe83e8
accel/habanalabs: add info when FD released while device still in use

When user closes the device file descriptor, it is checked whether the
device is still in use, and a message is printed if it is.
To make this message more informative, add to this print also the reason
due to which the device is considered as in use.
The possible reasons which are checked for now are active CS and
exported dma-buf.

Signed-off-by: Tomer Tayar <ttayar@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
drivers/accel/habanalabs/common/command_submission.c
drivers/accel/habanalabs/common/device.c
drivers/accel/habanalabs/common/habanalabs.h
drivers/accel/habanalabs/common/memory.c