summaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorOfir Bitton <obitton@habana.ai>2022-03-03 10:43:10 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-05-22 21:57:34 +0300
commitfdec56c1a416c6947b1db22617da15cb89f46c6c (patch)
treebd07e17cb4cc28832742b290f07044b523735c14 /include/uapi
parent4c3b9f6e3bd0480474666f9e016ff57ea0c5ecaa (diff)
downloadlinux-fdec56c1a416c6947b1db22617da15cb89f46c6c.tar.xz
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>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/misc/habanalabs.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/uapi/misc/habanalabs.h b/include/uapi/misc/habanalabs.h
index f474e7fb018d..ca2af5f98056 100644
--- a/include/uapi/misc/habanalabs.h
+++ b/include/uapi/misc/habanalabs.h
@@ -543,10 +543,15 @@ struct hl_pll_frequency_info {
* struct hl_open_stats_info - device open statistics information
* @open_counter: ever growing counter, increased on each successful dev open
* @last_open_period_ms: duration (ms) device was open last time
+ * @is_compute_ctx_active: Whether there is an active compute context executing
+ * @compute_ctx_in_release: true if the current compute context is being released
*/
struct hl_open_stats_info {
__u64 open_counter;
__u64 last_open_period_ms;
+ __u8 is_compute_ctx_active;
+ __u8 compute_ctx_in_release;
+ __u8 pad[6];
};
/**