Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: MIT */
0002 #ifndef __NVIF_IF0001_H__
0003 #define __NVIF_IF0001_H__
0004 
0005 #define NVIF_CONTROL_PSTATE_INFO                                           0x00
0006 #define NVIF_CONTROL_PSTATE_ATTR                                           0x01
0007 #define NVIF_CONTROL_PSTATE_USER                                           0x02
0008 
0009 struct nvif_control_pstate_info_v0 {
0010     __u8  version;
0011     __u8  count; /* out: number of power states */
0012 #define NVIF_CONTROL_PSTATE_INFO_V0_USTATE_DISABLE                         (-1)
0013 #define NVIF_CONTROL_PSTATE_INFO_V0_USTATE_PERFMON                         (-2)
0014     __s8  ustate_ac; /* out: target pstate index */
0015     __s8  ustate_dc; /* out: target pstate index */
0016     __s8  pwrsrc; /* out: current power source */
0017 #define NVIF_CONTROL_PSTATE_INFO_V0_PSTATE_UNKNOWN                         (-1)
0018 #define NVIF_CONTROL_PSTATE_INFO_V0_PSTATE_PERFMON                         (-2)
0019     __s8  pstate; /* out: current pstate index */
0020     __u8  pad06[2];
0021 };
0022 
0023 struct nvif_control_pstate_attr_v0 {
0024     __u8  version;
0025 #define NVIF_CONTROL_PSTATE_ATTR_V0_STATE_CURRENT                          (-1)
0026     __s8  state; /*  in: index of pstate to query
0027               * out: pstate identifier
0028               */
0029     __u8  index; /*  in: index of attribute to query
0030               * out: index of next attribute, or 0 if no more
0031               */
0032     __u8  pad03[5];
0033     __u32 min;
0034     __u32 max;
0035     char  name[32];
0036     char  unit[16];
0037 };
0038 
0039 struct nvif_control_pstate_user_v0 {
0040     __u8  version;
0041 #define NVIF_CONTROL_PSTATE_USER_V0_STATE_UNKNOWN                          (-1)
0042 #define NVIF_CONTROL_PSTATE_USER_V0_STATE_PERFMON                          (-2)
0043     __s8  ustate; /*  in: pstate identifier */
0044     __s8  pwrsrc; /*  in: target power source */
0045     __u8  pad03[5];
0046 };
0047 #endif