summaryrefslogtreecommitdiffstats
path: root/drivers/misc/habanalabs/habanalabs.h
diff options
context:
space:
mode:
authorDalit Ben Zoor2019-03-24 09:15:44 +0100
committerOded Gabbay2019-03-24 09:15:44 +0100
commitaa957088b4e846146b230e431dd9dad59e907f9a (patch)
tree26f0a463b800b7945a86eb0230cef65c8129e722 /drivers/misc/habanalabs/habanalabs.h
parenthabanalabs: allow user to modify TPC clock relaxation value (diff)
downloadkernel-qcow2-linux-aa957088b4e846146b230e431dd9dad59e907f9a.tar.gz
kernel-qcow2-linux-aa957088b4e846146b230e431dd9dad59e907f9a.tar.xz
kernel-qcow2-linux-aa957088b4e846146b230e431dd9dad59e907f9a.zip
habanalabs: add device status option to INFO IOCTL
This patch adds a new opcode to INFO IOCTL that returns the device status. This will allow users to query the device status in order to avoid sending command submissions while device is in reset. Signed-off-by: Dalit Ben Zoor <dbenzoor@habana.ai> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Diffstat (limited to 'drivers/misc/habanalabs/habanalabs.h')
-rw-r--r--drivers/misc/habanalabs/habanalabs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/misc/habanalabs/habanalabs.h b/drivers/misc/habanalabs/habanalabs.h
index e9253d937bfc..fd7fcdf7050f 100644
--- a/drivers/misc/habanalabs/habanalabs.h
+++ b/drivers/misc/habanalabs/habanalabs.h
@@ -1272,6 +1272,7 @@ static inline bool hl_mem_area_crosses_range(u64 address, u32 size,
int hl_device_open(struct inode *inode, struct file *filp);
bool hl_device_disabled_or_in_reset(struct hl_device *hdev);
+enum hl_device_status hl_device_status(struct hl_device *hdev);
int create_hdev(struct hl_device **dev, struct pci_dev *pdev,
enum hl_asic_type asic_type, int minor);
void destroy_hdev(struct hl_device *hdev);