if0001.h 1.6 KB

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