1*4882a593Smuzhiyun /* SPDX-License-Identifier: MIT */ 2*4882a593Smuzhiyun #ifndef __NVIF_IF0001_H__ 3*4882a593Smuzhiyun #define __NVIF_IF0001_H__ 4*4882a593Smuzhiyun 5*4882a593Smuzhiyun #define NVIF_CONTROL_PSTATE_INFO 0x00 6*4882a593Smuzhiyun #define NVIF_CONTROL_PSTATE_ATTR 0x01 7*4882a593Smuzhiyun #define NVIF_CONTROL_PSTATE_USER 0x02 8*4882a593Smuzhiyun 9*4882a593Smuzhiyun struct nvif_control_pstate_info_v0 { 10*4882a593Smuzhiyun __u8 version; 11*4882a593Smuzhiyun __u8 count; /* out: number of power states */ 12*4882a593Smuzhiyun #define NVIF_CONTROL_PSTATE_INFO_V0_USTATE_DISABLE (-1) 13*4882a593Smuzhiyun #define NVIF_CONTROL_PSTATE_INFO_V0_USTATE_PERFMON (-2) 14*4882a593Smuzhiyun __s8 ustate_ac; /* out: target pstate index */ 15*4882a593Smuzhiyun __s8 ustate_dc; /* out: target pstate index */ 16*4882a593Smuzhiyun __s8 pwrsrc; /* out: current power source */ 17*4882a593Smuzhiyun #define NVIF_CONTROL_PSTATE_INFO_V0_PSTATE_UNKNOWN (-1) 18*4882a593Smuzhiyun #define NVIF_CONTROL_PSTATE_INFO_V0_PSTATE_PERFMON (-2) 19*4882a593Smuzhiyun __s8 pstate; /* out: current pstate index */ 20*4882a593Smuzhiyun __u8 pad06[2]; 21*4882a593Smuzhiyun }; 22*4882a593Smuzhiyun 23*4882a593Smuzhiyun struct nvif_control_pstate_attr_v0 { 24*4882a593Smuzhiyun __u8 version; 25*4882a593Smuzhiyun #define NVIF_CONTROL_PSTATE_ATTR_V0_STATE_CURRENT (-1) 26*4882a593Smuzhiyun __s8 state; /* in: index of pstate to query 27*4882a593Smuzhiyun * out: pstate identifier 28*4882a593Smuzhiyun */ 29*4882a593Smuzhiyun __u8 index; /* in: index of attribute to query 30*4882a593Smuzhiyun * out: index of next attribute, or 0 if no more 31*4882a593Smuzhiyun */ 32*4882a593Smuzhiyun __u8 pad03[5]; 33*4882a593Smuzhiyun __u32 min; 34*4882a593Smuzhiyun __u32 max; 35*4882a593Smuzhiyun char name[32]; 36*4882a593Smuzhiyun char unit[16]; 37*4882a593Smuzhiyun }; 38*4882a593Smuzhiyun 39*4882a593Smuzhiyun struct nvif_control_pstate_user_v0 { 40*4882a593Smuzhiyun __u8 version; 41*4882a593Smuzhiyun #define NVIF_CONTROL_PSTATE_USER_V0_STATE_UNKNOWN (-1) 42*4882a593Smuzhiyun #define NVIF_CONTROL_PSTATE_USER_V0_STATE_PERFMON (-2) 43*4882a593Smuzhiyun __s8 ustate; /* in: pstate identifier */ 44*4882a593Smuzhiyun __s8 pwrsrc; /* in: target power source */ 45*4882a593Smuzhiyun __u8 pad03[5]; 46*4882a593Smuzhiyun }; 47*4882a593Smuzhiyun #endif 48