mirror of
https://github.com/torvalds/linux.git
synced 2026-05-29 17:43:52 +02:00
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:
parent
eeb38d0e91
commit
65a3f5bc33
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user