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>
This commit is contained in:
@@ -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
|
||||
@@ -410,6 +411,14 @@ struct hl_pll_frequency_info {
|
||||
__u16 output[HL_PLL_NUM_OUTPUTS];
|
||||
};
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
||||
Reference in New Issue
Block a user