habanalabs: expose compute ctx status through info ioctl
authorOfir Bitton <obitton@habana.ai>
Thu, 3 Mar 2022 07:43:10 +0000 (09:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 22 May 2022 18:57:34 +0000 (20:57 +0200)
commitfdec56c1a416c6947b1db22617da15cb89f46c6c
treebd07e17cb4cc28832742b290f07044b523735c14
parent4c3b9f6e3bd0480474666f9e016ff57ea0c5ecaa
habanalabs: expose compute ctx status through info ioctl

In order for the user to know if he can try and open device, we
expose the compute ctx state. The user can now know if the context
is used by another process or whether the device is still ongoing
through cleanup or reset and will be available soon.

Signed-off-by: Ofir Bitton <obitton@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/habanalabs/common/habanalabs_ioctl.c
include/uapi/misc/habanalabs.h