dev-energymodel.yaml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
  2. #
  3. # Copyright (c) 2025 Valve Corporation.
  4. #
  5. ---
  6. name: dev-energymodel
  7. doc: |
  8. Energy model netlink interface to notify its changes.
  9. protocol: genetlink
  10. uapi-header: linux/dev_energymodel.h
  11. definitions:
  12. -
  13. type: flags
  14. name: perf-state-flags
  15. entries:
  16. -
  17. name: perf-state-inefficient
  18. doc: >-
  19. The performance state is inefficient. There is in this perf-domain,
  20. another performance state with a higher frequency but a lower or
  21. equal power cost.
  22. -
  23. type: flags
  24. name: perf-domain-flags
  25. entries:
  26. -
  27. name: perf-domain-microwatts
  28. doc: >-
  29. The power values are in micro-Watts or some other scale.
  30. -
  31. name: perf-domain-skip-inefficiencies
  32. doc: >-
  33. Skip inefficient states when estimating energy consumption.
  34. -
  35. name: perf-domain-artificial
  36. doc: >-
  37. The power values are artificial and might be created by platform
  38. missing real power information.
  39. attribute-sets:
  40. -
  41. name: perf-domain
  42. doc: >-
  43. Information on a single performance domains.
  44. attributes:
  45. -
  46. name: pad
  47. type: pad
  48. -
  49. name: perf-domain-id
  50. type: u32
  51. doc: >-
  52. A unique ID number for each performance domain.
  53. -
  54. name: flags
  55. type: u64
  56. doc: >-
  57. Bitmask of performance domain flags.
  58. enum: perf-domain-flags
  59. -
  60. name: cpus
  61. type: u64
  62. multi-attr: true
  63. doc: >-
  64. CPUs that belong to this performance domain.
  65. -
  66. name: perf-table
  67. doc: >-
  68. Performance states table.
  69. attributes:
  70. -
  71. name: perf-domain-id
  72. type: u32
  73. doc: >-
  74. A unique ID number for each performance domain.
  75. -
  76. name: perf-state
  77. type: nest
  78. nested-attributes: perf-state
  79. multi-attr: true
  80. -
  81. name: perf-state
  82. doc: >-
  83. Performance state of a performance domain.
  84. attributes:
  85. -
  86. name: pad
  87. type: pad
  88. -
  89. name: performance
  90. type: u64
  91. doc: >-
  92. CPU performance (capacity) at a given frequency.
  93. -
  94. name: frequency
  95. type: u64
  96. doc: >-
  97. The frequency in KHz, for consistency with CPUFreq.
  98. -
  99. name: power
  100. type: u64
  101. doc: >-
  102. The power consumed at this level (by 1 CPU or by a registered
  103. device). It can be a total power: static and dynamic.
  104. -
  105. name: cost
  106. type: u64
  107. doc: >-
  108. The cost coefficient associated with this level, used during energy
  109. calculation. Equal to: power * max_frequency / frequency.
  110. -
  111. name: flags
  112. type: u64
  113. doc: >-
  114. Bitmask of performance state flags.
  115. enum: perf-state-flags
  116. operations:
  117. list:
  118. -
  119. name: get-perf-domains
  120. attribute-set: perf-domain
  121. doc: Get the list of information for all performance domains.
  122. do:
  123. request:
  124. attributes:
  125. - perf-domain-id
  126. reply:
  127. attributes: &perf-domain-attrs
  128. - pad
  129. - perf-domain-id
  130. - flags
  131. - cpus
  132. dump:
  133. reply:
  134. attributes: *perf-domain-attrs
  135. -
  136. name: get-perf-table
  137. attribute-set: perf-table
  138. doc: Get the energy model table of a performance domain.
  139. do:
  140. request:
  141. attributes:
  142. - perf-domain-id
  143. reply:
  144. attributes:
  145. - perf-domain-id
  146. - perf-state
  147. -
  148. name: perf-domain-created
  149. doc: A performance domain is created.
  150. notify: get-perf-table
  151. mcgrp: event
  152. -
  153. name: perf-domain-updated
  154. doc: A performance domain is updated.
  155. notify: get-perf-table
  156. mcgrp: event
  157. -
  158. name: perf-domain-deleted
  159. doc: A performance domain is deleted.
  160. attribute-set: perf-table
  161. event:
  162. attributes:
  163. - perf-domain-id
  164. mcgrp: event
  165. mcast-groups:
  166. list:
  167. -
  168. name: event