diff options
author | Sagiv Ozeri <sozeri@habana.ai> | 2021-02-23 17:00:05 +0100 |
---|---|---|
committer | Oded Gabbay <ogabbay@kernel.org> | 2021-04-09 13:09:23 +0200 |
commit | 586f2caf0ef952ca5e0f38a00b7ba8d945345cf7 (patch) | |
tree | 3bd9fa875594b7420af6fcd64f71f24b85c263fc /include | |
parent | habanalabs: support HW blocks vm show (diff) | |
download | linux-586f2caf0ef952ca5e0f38a00b7ba8d945345cf7.tar.xz linux-586f2caf0ef952ca5e0f38a00b7ba8d945345cf7.zip |
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')
-rw-r--r-- | include/uapi/misc/habanalabs.h | 9 |
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 |