1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>struct vga_switcheroo_client_ops</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux GPU Driver Developer's Guide"><link rel="up" href="pubstructures.html" title="Chapter 7. Public structures"><link rel="prev" href="API-struct-vga-switcheroo-handler.html" title="struct vga_switcheroo_handler"><link rel="next" href="pubconstants.html" title="Chapter 8. Public constants"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">struct vga_switcheroo_client_ops</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-struct-vga-switcheroo-handler.html">Prev</a> </td><th width="60%" align="center">Chapter 7. Public structures</th><td width="20%" align="right"> <a accesskey="n" href="pubconstants.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-struct-vga-switcheroo-client-ops"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct vga_switcheroo_client_ops — 
2  client callbacks
3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="programlisting">
4struct vga_switcheroo_client_ops {
5  void (* set_gpu_state) (struct pci_dev *dev, enum vga_switcheroo_state);
6  void (* reprobe) (struct pci_dev *dev);
7  bool (* can_switch) (struct pci_dev *dev);
8};  </pre></div><div class="refsect1"><a name="id-1.5.5.3.5"></a><h2>Members</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">set_gpu_state</span></dt><dd><p>
9do the equivalent of suspend/resume for the card.
10Mandatory. This should not cut power to the discrete GPU,
11which is the job of the handler
12      </p></dd><dt><span class="term">reprobe</span></dt><dd><p>
13poll outputs.
14Optional. This gets called after waking the GPU and switching
15the outputs to it
16      </p></dd><dt><span class="term">can_switch</span></dt><dd><p>
17check if the device is in a position to switch now.
18Mandatory. The client should return false if a user space process
19has one of its device files open
20      </p></dd></dl></div></div><div class="refsect1"><a name="id-1.5.5.3.6"></a><h2>Description</h2><p>
21   Client callbacks. A client can be either a GPU or an audio device on a GPU.
22   The <em class="parameter"><code>set_gpu_state</code></em> and <em class="parameter"><code>can_switch</code></em> methods are mandatory, <em class="parameter"><code>reprobe</code></em> may be
23   set to NULL. For audio clients, the <em class="parameter"><code>reprobe</code></em> member is bogus.
24</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-struct-vga-switcheroo-handler.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="pubstructures.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="pubconstants.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">struct vga_switcheroo_handler</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 8. Public constants</td></tr></table></div></body></html>
25