162306a36Sopenharmony_ci/* SPDX-License-Identifier: MIT */ 262306a36Sopenharmony_ci#ifndef __NVIF_IF0001_H__ 362306a36Sopenharmony_ci#define __NVIF_IF0001_H__ 462306a36Sopenharmony_ci 562306a36Sopenharmony_ci#define NVIF_CONTROL_PSTATE_INFO 0x00 662306a36Sopenharmony_ci#define NVIF_CONTROL_PSTATE_ATTR 0x01 762306a36Sopenharmony_ci#define NVIF_CONTROL_PSTATE_USER 0x02 862306a36Sopenharmony_ci 962306a36Sopenharmony_cistruct nvif_control_pstate_info_v0 { 1062306a36Sopenharmony_ci __u8 version; 1162306a36Sopenharmony_ci __u8 count; /* out: number of power states */ 1262306a36Sopenharmony_ci#define NVIF_CONTROL_PSTATE_INFO_V0_USTATE_DISABLE (-1) 1362306a36Sopenharmony_ci#define NVIF_CONTROL_PSTATE_INFO_V0_USTATE_PERFMON (-2) 1462306a36Sopenharmony_ci __s8 ustate_ac; /* out: target pstate index */ 1562306a36Sopenharmony_ci __s8 ustate_dc; /* out: target pstate index */ 1662306a36Sopenharmony_ci __s8 pwrsrc; /* out: current power source */ 1762306a36Sopenharmony_ci#define NVIF_CONTROL_PSTATE_INFO_V0_PSTATE_UNKNOWN (-1) 1862306a36Sopenharmony_ci#define NVIF_CONTROL_PSTATE_INFO_V0_PSTATE_PERFMON (-2) 1962306a36Sopenharmony_ci __s8 pstate; /* out: current pstate index */ 2062306a36Sopenharmony_ci __u8 pad06[2]; 2162306a36Sopenharmony_ci}; 2262306a36Sopenharmony_ci 2362306a36Sopenharmony_cistruct nvif_control_pstate_attr_v0 { 2462306a36Sopenharmony_ci __u8 version; 2562306a36Sopenharmony_ci#define NVIF_CONTROL_PSTATE_ATTR_V0_STATE_CURRENT (-1) 2662306a36Sopenharmony_ci __s8 state; /* in: index of pstate to query 2762306a36Sopenharmony_ci * out: pstate identifier 2862306a36Sopenharmony_ci */ 2962306a36Sopenharmony_ci __u8 index; /* in: index of attribute to query 3062306a36Sopenharmony_ci * out: index of next attribute, or 0 if no more 3162306a36Sopenharmony_ci */ 3262306a36Sopenharmony_ci __u8 pad03[5]; 3362306a36Sopenharmony_ci __u32 min; 3462306a36Sopenharmony_ci __u32 max; 3562306a36Sopenharmony_ci char name[32]; 3662306a36Sopenharmony_ci char unit[16]; 3762306a36Sopenharmony_ci}; 3862306a36Sopenharmony_ci 3962306a36Sopenharmony_cistruct nvif_control_pstate_user_v0 { 4062306a36Sopenharmony_ci __u8 version; 4162306a36Sopenharmony_ci#define NVIF_CONTROL_PSTATE_USER_V0_STATE_UNKNOWN (-1) 4262306a36Sopenharmony_ci#define NVIF_CONTROL_PSTATE_USER_V0_STATE_PERFMON (-2) 4362306a36Sopenharmony_ci __s8 ustate; /* in: pstate identifier */ 4462306a36Sopenharmony_ci __s8 pwrsrc; /* in: target power source */ 4562306a36Sopenharmony_ci __u8 pad03[5]; 4662306a36Sopenharmony_ci}; 4762306a36Sopenharmony_ci#endif 48