1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>drm_cvt_mode</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="drm-mode-setting.html#idp1123353068" title="Display Modes Function Reference"><link rel="prev" href="API-drm-mode-probed-add.html" title="drm_mode_probed_add"><link rel="next" href="API-drm-gtf-mode-complex.html" title="drm_gtf_mode_complex"></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">drm_cvt_mode</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-drm-mode-probed-add.html">Prev</a> </td><th width="60%" align="center">Display Modes Function Reference</th><td width="20%" align="right"> <a accesskey="n" href="API-drm-gtf-mode-complex.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-drm-cvt-mode"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>drm_cvt_mode — 2 create a modeline based on the CVT algorithm 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">struct drm_display_mode * <b class="fsfunc">drm_cvt_mode </b>(</code></td><td>struct drm_device * <var class="pdparam">dev</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">hdisplay</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">vdisplay</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">vrefresh</var>, </td></tr><tr><td> </td><td>bool <var class="pdparam">reduced</var>, </td></tr><tr><td> </td><td>bool <var class="pdparam">interlaced</var>, </td></tr><tr><td> </td><td>bool <var class="pdparam">margins</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idp1123401812"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>dev</code></em></span></dt><dd><p> 4 drm device 5 </p></dd><dt><span class="term"><em class="parameter"><code>hdisplay</code></em></span></dt><dd><p> 6 hdisplay size 7 </p></dd><dt><span class="term"><em class="parameter"><code>vdisplay</code></em></span></dt><dd><p> 8 vdisplay size 9 </p></dd><dt><span class="term"><em class="parameter"><code>vrefresh</code></em></span></dt><dd><p> 10 vrefresh rate 11 </p></dd><dt><span class="term"><em class="parameter"><code>reduced</code></em></span></dt><dd><p> 12 whether to use reduced blanking 13 </p></dd><dt><span class="term"><em class="parameter"><code>interlaced</code></em></span></dt><dd><p> 14 whether to compute an interlaced mode 15 </p></dd><dt><span class="term"><em class="parameter"><code>margins</code></em></span></dt><dd><p> 16 whether to add margins (borders) 17 </p></dd></dl></div></div><div class="refsect1"><a name="idp1123409556"></a><h2>Description</h2><p> 18 This function is called to generate the modeline based on CVT algorithm 19 according to the hdisplay, vdisplay, vrefresh. 20 It is based from the VESA(TM) Coordinated Video Timing Generator by 21 Graham Loveridge April 9, 2003 available at 22</p></div><div class="refsect1"><a name="idp1123410404"></a><h2>http</h2><p> 23 //www.elo.utfsm.cl/~elo212/docs/CVTd6r1.xls 24 </p><p> 25 26 And it is copied from xf86CVTmode in xserver/hw/xfree86/modes/xf86cvt.c. 27 What I have done is to translate it by using integer calculation. 28</p></div><div class="refsect1"><a name="idp1123411340"></a><h2>Returns</h2><p> 29 The modeline based on the CVT algorithm stored in a drm_display_mode object. 30 The display mode object is allocated with <code class="function">drm_mode_create</code>. Returns NULL 31 when no mode could be allocated. 32</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-mode-probed-add.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="drm-mode-setting.html#idp1123353068">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-drm-gtf-mode-complex.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">drm_mode_probed_add</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">drm_gtf_mode_complex</span></td></tr></table></div></body></html> 33