Commit 65a3f5bc authored by Ariel Aviad's avatar Ariel Aviad Committed by Koby Elbaz
Browse files

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: default avatarAriel Aviad <ariel.aviad@intel.com>
Reviewed-by: default avatarKoby Elbaz <koby.elbaz@intel.com>
Signed-off-by: default avatarKoby Elbaz <koby.elbaz@intel.com>
parent eeb38d0e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;
	}
+2 −0
Original line number Diff line number Diff line
@@ -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 */