if0001.h 1.7 KB

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