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