summaryrefslogtreecommitdiff
path: root/include/uapi/misc
diff options
context:
space:
mode:
authorSagiv Ozeri <sozeri@habana.ai>2021-02-23 18:00:05 +0200
committerOded Gabbay <ogabbay@kernel.org>2021-04-09 14:09:23 +0300
commit586f2caf0ef952ca5e0f38a00b7ba8d945345cf7 (patch)
tree3bd9fa875594b7420af6fcd64f71f24b85c263fc /include/uapi/misc
parenta4371c1a1ec150bc8bb87333e0a59935c4a630e2 (diff)
habanalabs: return current power via INFO IOCTL
Add driver implementation for reading the current power from the device CPU F/W. Signed-off-by: Sagiv Ozeri <sozeri@habana.ai> Reviewed-by: Oded Gabbay <ogabbay@kernel.org> Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'include/uapi/misc')
-rw-r--r--include/uapi/misc/habanalabs.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/uapi/misc/habanalabs.h b/include/uapi/misc/habanalabs.h
index 05c7cf4e727e..92fd000ce0d3 100644
--- a/include/uapi/misc/habanalabs.h
+++ b/include/uapi/misc/habanalabs.h
@@ -297,6 +297,7 @@ enum hl_device_status {
#define HL_INFO_SYNC_MANAGER 14
#define HL_INFO_TOTAL_ENERGY 15
#define HL_INFO_PLL_FREQUENCY 16
+#define HL_INFO_POWER 17
#define HL_INFO_VERSION_MAX_LEN 128
#define HL_INFO_CARD_NAME_MAX_LEN 16
@@ -411,6 +412,14 @@ struct hl_pll_frequency_info {
};
/**
+ * struct hl_power_info - power information
+ * @power: power consumption
+ */
+struct hl_power_info {
+ __u64 power;
+};
+
+/**
* struct hl_info_sync_manager - sync manager information
* @first_available_sync_object: first available sob
* @first_available_monitor: first available monitor