1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>struct drm_crtc_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-drm-atomic-helper-connector-destroy-state.html" title="drm_atomic_helper_connector_destroy_state"><link rel="next" href="API-struct-drm-encoder-helper-funcs.html" title="struct drm_encoder_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_crtc_helper_funcs</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-drm-atomic-helper-connector-destroy-state.html">Prev</a> </td><th width="60%" align="center">Modeset Helper Functions Reference</th><td width="20%" align="right"> <a accesskey="n" href="API-struct-drm-encoder-helper-funcs.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-struct-drm-crtc-helper-funcs"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct drm_crtc_helper_funcs — 2 helper operations for CRTCs 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="programlisting"> 4struct drm_crtc_helper_funcs { 5 void (* dpms) (struct drm_crtc *crtc, int mode); 6 void (* prepare) (struct drm_crtc *crtc); 7 void (* commit) (struct drm_crtc *crtc); 8 bool (* mode_fixup) (struct drm_crtc *crtc,const struct drm_display_mode *mode,struct drm_display_mode *adjusted_mode); 9 int (* mode_set) (struct drm_crtc *crtc, struct drm_display_mode *mode,struct drm_display_mode *adjusted_mode, int x, int y,struct drm_framebuffer *old_fb); 10 void (* mode_set_nofb) (struct drm_crtc *crtc); 11 int (* mode_set_base) (struct drm_crtc *crtc, int x, int y,struct drm_framebuffer *old_fb); 12 int (* mode_set_base_atomic) (struct drm_crtc *crtc,struct drm_framebuffer *fb, int x, int y,enum mode_set_atomic); 13 void (* load_lut) (struct drm_crtc *crtc); 14 void (* disable) (struct drm_crtc *crtc); 15 void (* enable) (struct drm_crtc *crtc); 16 int (* atomic_check) (struct drm_crtc *crtc,struct drm_crtc_state *state); 17 void (* atomic_begin) (struct drm_crtc *crtc); 18 void (* atomic_flush) (struct drm_crtc *crtc); 19}; </pre></div><div class="refsect1"><a name="idp1125420412"></a><h2>Members</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">dpms</span></dt><dd><p> 20set power state 21 </p></dd><dt><span class="term">prepare</span></dt><dd><p> 22prepare the CRTC, called before <em class="parameter"><code>mode_set</code></em> 23 </p></dd><dt><span class="term">commit</span></dt><dd><p> 24commit changes to CRTC, called after <em class="parameter"><code>mode_set</code></em> 25 </p></dd><dt><span class="term">mode_fixup</span></dt><dd><p> 26try to fixup proposed mode for this CRTC 27 </p></dd><dt><span class="term">mode_set</span></dt><dd><p> 28set this mode 29 </p></dd><dt><span class="term">mode_set_nofb</span></dt><dd><p> 30set mode only (no scanout buffer attached) 31 </p></dd><dt><span class="term">mode_set_base</span></dt><dd><p> 32update the scanout buffer 33 </p></dd><dt><span class="term">mode_set_base_atomic</span></dt><dd><p> 34non-blocking mode set (used for kgdb support) 35 </p></dd><dt><span class="term">load_lut</span></dt><dd><p> 36load color palette 37 </p></dd><dt><span class="term">disable</span></dt><dd><p> 38disable CRTC when no longer in use 39 </p></dd><dt><span class="term">enable</span></dt><dd><p> 40enable CRTC 41 </p></dd><dt><span class="term">atomic_check</span></dt><dd><p> 42check for validity of an atomic state 43 </p></dd><dt><span class="term">atomic_begin</span></dt><dd><p> 44begin atomic update 45 </p></dd><dt><span class="term">atomic_flush</span></dt><dd><p> 46flush atomic update 47 </p></dd></dl></div></div><div class="refsect1"><a name="idp1125431524"></a><h2>Description</h2><p> 48 The helper operations are called by the mid-layer CRTC helper. 49 </p><p> 50 51 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 52 deprecated. Used <em class="parameter"><code>enable</code></em> and <em class="parameter"><code>disable</code></em> instead exclusively. 53 </p><p> 54 55 With legacy crtc helpers there's a big semantic difference between <em class="parameter"><code>disable</code></em> 56</p></div><div class="refsect1"><a name="idp1125434740"></a><h2>and the other hooks</h2><p> 57 <em class="parameter"><code>disable</code></em> also needs to release any resources acquired in 58 <em class="parameter"><code>mode_set</code></em> (like shared PLLs). 59</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-drm-atomic-helper-connector-destroy-state.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch02s05.html#idp1125415036">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-struct-drm-encoder-helper-funcs.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">drm_atomic_helper_connector_destroy_state</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">struct drm_encoder_helper_funcs</span></td></tr></table></div></body></html> 60