1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>struct drm_encoder_helper_funcs</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux DRM Developer's Guide"><link rel="up" href="ch02s05.html#idp1125415036" title="Modeset Helper Functions Reference"><link rel="prev" href="API-struct-drm-crtc-helper-funcs.html" title="struct drm_crtc_helper_funcs"><link rel="next" href="API-struct-drm-connector-helper-funcs.html" title="struct drm_connector_helper_funcs"></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 drm_encoder_helper_funcs</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-struct-drm-crtc-helper-funcs.html">Prev</a>&#160;</td><th width="60%" align="center">Modeset Helper Functions Reference</th><td width="20%" align="right">&#160;<a accesskey="n" href="API-struct-drm-connector-helper-funcs.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-struct-drm-encoder-helper-funcs"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct drm_encoder_helper_funcs &#8212; 
2     helper operations for encoders
3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="programlisting">
4struct drm_encoder_helper_funcs {
5  void (* dpms) (struct drm_encoder *encoder, int mode);
6  void (* save) (struct drm_encoder *encoder);
7  void (* restore) (struct drm_encoder *encoder);
8  bool (* mode_fixup) (struct drm_encoder *encoder,const struct drm_display_mode *mode,struct drm_display_mode *adjusted_mode);
9  void (* prepare) (struct drm_encoder *encoder);
10  void (* commit) (struct drm_encoder *encoder);
11  void (* mode_set) (struct drm_encoder *encoder,struct drm_display_mode *mode,struct drm_display_mode *adjusted_mode);
12  struct drm_crtc *(* get_crtc) (struct drm_encoder *encoder);
13  enum drm_connector_status (* detect) (struct drm_encoder *encoder,struct drm_connector *connector);
14  void (* disable) (struct drm_encoder *encoder);
15  void (* enable) (struct drm_encoder *encoder);
16  int (* atomic_check) (struct drm_encoder *encoder,struct drm_crtc_state *crtc_state,struct drm_connector_state *conn_state);
17};  </pre></div><div class="refsect1"><a name="idp1125440908"></a><h2>Members</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">dpms</span></dt><dd><p>
18   set power state
19      </p></dd><dt><span class="term">save</span></dt><dd><p>
20   save connector state
21      </p></dd><dt><span class="term">restore</span></dt><dd><p>
22   restore connector state
23      </p></dd><dt><span class="term">mode_fixup</span></dt><dd><p>
24   try to fixup proposed mode for this connector
25      </p></dd><dt><span class="term">prepare</span></dt><dd><p>
26   part of the disable sequence, called before the CRTC modeset
27      </p></dd><dt><span class="term">commit</span></dt><dd><p>
28   called after the CRTC modeset
29      </p></dd><dt><span class="term">mode_set</span></dt><dd><p>
30   set this mode, optional for atomic helpers
31      </p></dd><dt><span class="term">get_crtc</span></dt><dd><p>
32   return CRTC that the encoder is currently attached to
33      </p></dd><dt><span class="term">detect</span></dt><dd><p>
34   connection status detection
35      </p></dd><dt><span class="term">disable</span></dt><dd><p>
36   disable encoder when not in use (overrides DPMS off)
37      </p></dd><dt><span class="term">enable</span></dt><dd><p>
38   enable encoder
39      </p></dd><dt><span class="term">atomic_check</span></dt><dd><p>
40   check for validity of an atomic update
41      </p></dd></dl></div></div><div class="refsect1"><a name="idp1125450028"></a><h2>Description</h2><p>
42   The helper operations are called by the mid-layer CRTC helper.
43   </p><p>
44
45   Note that with atomic helpers <em class="parameter"><code>dpms</code></em>, <em class="parameter"><code>prepare</code></em> and <em class="parameter"><code>commit</code></em> hooks are
46   deprecated. Used <em class="parameter"><code>enable</code></em> and <em class="parameter"><code>disable</code></em> instead exclusively.
47   </p><p>
48
49   With legacy crtc helpers there's a big semantic difference between <em class="parameter"><code>disable</code></em>
50</p></div><div class="refsect1"><a name="idp1125453244"></a><h2>and the other hooks</h2><p>
51   <em class="parameter"><code>disable</code></em> also needs to release any resources acquired in
52   <em class="parameter"><code>mode_set</code></em> (like shared PLLs).
53</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-drm-crtc-helper-funcs.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="ch02s05.html#idp1125415036">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="API-struct-drm-connector-helper-funcs.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">struct drm_crtc_helper_funcs</span>&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;<span class="phrase">struct drm_connector_helper_funcs</span></td></tr></table></div></body></html>
54