accel/habanalabs: add HL_GET_P_STATE passthrough type
Add a new passthrough type HL_GET_P_STATE to the cpucp generic ioctl to allow userspace to read the device performance state via firmware. Signed-off-by: Ariel Aviad <ariel.aviad@intel.com> Reviewed-by: Koby Elbaz <koby.elbaz@intel.com> Signed-off-by: Koby Elbaz <koby.elbaz@intel.com>
This commit is contained in:
@@ -964,6 +964,9 @@ static int send_fw_generic_request(struct hl_device *hdev, struct hl_info_args *
|
||||
case HL_GET_ERR_COUNTERS_CMD:
|
||||
need_input_buff = true;
|
||||
break;
|
||||
case HL_GET_P_STATE:
|
||||
need_input_buff = false;
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -1426,10 +1426,12 @@ struct cpucp_monitor_dump {
|
||||
*
|
||||
* HL_PASSTHROUGHT_VERSIONS - Fetch all firmware versions.
|
||||
* HL_GET_ERR_COUNTERS_CMD - Command to get error counters
|
||||
* HL_GET_P_STATE - get performance state
|
||||
*/
|
||||
enum hl_passthrough_type {
|
||||
HL_PASSTHROUGH_VERSIONS,
|
||||
HL_GET_ERR_COUNTERS_CMD,
|
||||
HL_GET_P_STATE,
|
||||
};
|
||||
|
||||
#endif /* CPUCP_IF_H */
|
||||
|
||||
Reference in New Issue
Block a user