aboutsummaryrefslogtreecommitdiff
path: root/doc/opal-api/opal-power-shift-ratio.html
blob: d226ebae31d5d11d69d32e34e1e6f41d3e8adcf0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236

<!DOCTYPE html>

<html>
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />

    <title>OPAL Power Shift Ratio &#8212; skiboot e6cda17
 documentation</title>
    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/classic.css" />
    
    <script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
    <script src="../_static/jquery.js"></script>
    <script src="../_static/underscore.js"></script>
    <script src="../_static/doctools.js"></script>
    
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="OPAL Power Caps" href="opal-powercap.html" />
    <link rel="prev" title="OPAL_POLL_EVENTS" href="opal-poll-events.html" /> 
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="opal-powercap.html" title="OPAL Power Caps"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="opal-poll-events.html" title="OPAL_POLL_EVENTS"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">skiboot e6cda17
 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">OPAL API Documentation</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">OPAL Power Shift Ratio</a></li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <section id="opal-power-shift-ratio">
<span id="opal-psr"></span><h1>OPAL Power Shift Ratio<a class="headerlink" href="#opal-power-shift-ratio" title="Permalink to this headline"></a></h1>
<p>Sometimes power management firmware needs to throttle power availability
to system components in order to keep within power cap or thermal limits.
It’s possible to set a preference as to what trade-offs power management
firmware will make. For example, certain workloads may heavily prefer
throttling CPU over GPUs or vice-versa.</p>
<section id="opal-get-power-shift-ratio">
<span id="id1"></span><h2>OPAL_GET_POWER_SHIFT_RATIO<a class="headerlink" href="#opal-get-power-shift-ratio" title="Permalink to this headline"></a></h2>
<p>OPAL call to read the power-shifting-ratio using a handle to identify
the type (e.g CPU vs. GPU, CPU vs. MEM) which is exported via
device-tree.</p>
<p>The call can be asynchronus, where the token parameter is used to wait
for the completion.</p>
<section id="parameters">
<h3>Parameters<a class="headerlink" href="#parameters" title="Permalink to this headline"></a></h3>
<table class="docutils align-default">
<colgroup>
<col style="width: 30%" />
<col style="width: 70%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"></th>
<th class="head"></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>u32</p></td>
<td><p>handle</p></td>
</tr>
<tr class="row-odd"><td><p>int</p></td>
<td><p>token</p></td>
</tr>
<tr class="row-even"><td><p>u32</p></td>
<td><p>*ratio</p></td>
</tr>
</tbody>
</table>
</section>
<section id="returns">
<h3>Returns<a class="headerlink" href="#returns" title="Permalink to this headline"></a></h3>
<dl class="simple">
<dt><a class="reference internal" href="return-codes.html#opal-success"><span class="std std-ref">OPAL_SUCCESS</span></a></dt><dd><p>Success</p>
</dd>
<dt><a class="reference internal" href="return-codes.html#opal-parameter"><span class="std std-ref">OPAL_PARAMETER</span></a></dt><dd><p>Invalid ratio pointer</p>
</dd>
<dt><a class="reference internal" href="return-codes.html#opal-unsupported"><span class="std std-ref">OPAL_UNSUPPORTED</span></a></dt><dd><p>No support for reading psr</p>
</dd>
<dt><a class="reference internal" href="return-codes.html#opal-hardware"><span class="std std-ref">OPAL_HARDWARE</span></a></dt><dd><p>Unable to procced due to the current hardware state</p>
</dd>
<dt><a class="reference internal" href="return-codes.html#opal-async-completion"><span class="std std-ref">OPAL_ASYNC_COMPLETION</span></a></dt><dd><p>Request was sent and an async completion message will be sent with
token and status of the request.</p>
</dd>
</dl>
</section>
</section>
<section id="opal-set-power-shift-ratio">
<span id="id2"></span><h2>OPAL_SET_POWER_SHIFT_RATIO<a class="headerlink" href="#opal-set-power-shift-ratio" title="Permalink to this headline"></a></h2>
<p>OPAL call to set power-shifting-ratio using a handle to identify
the type of PSR which is exported in device-tree. This call can be
asynchronus where the token parameter is used to wait for the
completion.</p>
<section id="id3">
<h3>Parameters<a class="headerlink" href="#id3" title="Permalink to this headline"></a></h3>
<table class="docutils align-default">
<colgroup>
<col style="width: 33%" />
<col style="width: 67%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"></th>
<th class="head"></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>u32</p></td>
<td><p>handle</p></td>
</tr>
<tr class="row-odd"><td><p>int</p></td>
<td><p>token</p></td>
</tr>
<tr class="row-even"><td><p>u32</p></td>
<td><p>ratio</p></td>
</tr>
</tbody>
</table>
</section>
<section id="id4">
<h3>Returns<a class="headerlink" href="#id4" title="Permalink to this headline"></a></h3>
<dl class="simple">
<dt><a class="reference internal" href="return-codes.html#opal-success"><span class="std std-ref">OPAL_SUCCESS</span></a></dt><dd><p>Success</p>
</dd>
<dt><a class="reference internal" href="return-codes.html#opal-parameter"><span class="std std-ref">OPAL_PARAMETER</span></a></dt><dd><p>Invalid ratio requested</p>
</dd>
<dt><a class="reference internal" href="return-codes.html#opal-unsupported"><span class="std std-ref">OPAL_UNSUPPORTED</span></a></dt><dd><p>No support for changing the ratio</p>
</dd>
<dt><a class="reference internal" href="return-codes.html#opal-permission"><span class="std std-ref">OPAL_PERMISSION</span></a></dt><dd><p>Hardware cannot take the request</p>
</dd>
<dt><a class="reference internal" href="return-codes.html#opal-async-completion"><span class="std std-ref">OPAL_ASYNC_COMPLETION</span></a></dt><dd><p>Request was sent and an async completion message will be sent with
token and status of the request.</p>
</dd>
<dt><a class="reference internal" href="return-codes.html#opal-hardware"><span class="std std-ref">OPAL_HARDWARE</span></a></dt><dd><p>Unable to procced due to the current hardware state</p>
</dd>
<dt><a class="reference internal" href="return-codes.html#opal-busy"><span class="std std-ref">OPAL_BUSY</span></a></dt><dd><p>Previous request in progress</p>
</dd>
<dt><a class="reference internal" href="return-codes.html#opal-internal-error"><span class="std std-ref">OPAL_INTERNAL_ERROR</span></a></dt><dd><p>Error in request response</p>
</dd>
<dt><a class="reference internal" href="return-codes.html#opal-timeout"><span class="std std-ref">OPAL_TIMEOUT</span></a></dt><dd><p>Timeout in request completion</p>
</dd>
</dl>
</section>
</section>
</section>


            <div class="clearer"></div>
          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../index.html">Table of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">OPAL Power Shift Ratio</a><ul>
<li><a class="reference internal" href="#opal-get-power-shift-ratio">OPAL_GET_POWER_SHIFT_RATIO</a><ul>
<li><a class="reference internal" href="#parameters">Parameters</a></li>
<li><a class="reference internal" href="#returns">Returns</a></li>
</ul>
</li>
<li><a class="reference internal" href="#opal-set-power-shift-ratio">OPAL_SET_POWER_SHIFT_RATIO</a><ul>
<li><a class="reference internal" href="#id3">Parameters</a></li>
<li><a class="reference internal" href="#id4">Returns</a></li>
</ul>
</li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="opal-poll-events.html"
                        title="previous chapter">OPAL_POLL_EVENTS</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="opal-powercap.html"
                        title="next chapter">OPAL Power Caps</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../_sources/opal-api/opal-power-shift-ratio.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>
    </div>
</div>
<script>$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="opal-powercap.html" title="OPAL Power Caps"
             >next</a> |</li>
        <li class="right" >
          <a href="opal-poll-events.html" title="OPAL_POLL_EVENTS"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">skiboot e6cda17
 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="index.html" >OPAL API Documentation</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">OPAL Power Shift Ratio</a></li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright 2016-2017, IBM, others.
      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.3.2.
    </div>
  </body>
</html>