'\" t .\" Title: drm_gtf_mode .\" Author: .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: May 2018 .\" Manual: DRM Core .\" Source: Kernel Hackers Manual 3.16.56 .\" Language: English .\" .TH "DRM_GTF_MODE" "9" "May 2018" "Kernel Hackers Manual 3\&.16\&" "DRM Core" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" drm_gtf_mode \- create the modeline based on the GTF algorithm .SH "SYNOPSIS" .HP \w'struct\ drm_display_mode\ *\ drm_gtf_mode('u .BI "struct drm_display_mode * drm_gtf_mode(struct\ drm_device\ *\ " "dev" ", int\ " "hdisplay" ", int\ " "vdisplay" ", int\ " "vrefresh" ", bool\ " "interlaced" ", int\ " "margins" ");" .SH "ARGUMENTS" .PP \fIdev\fR .RS 4 drm device .RE .PP \fIhdisplay\fR .RS 4 hdisplay size .RE .PP \fIvdisplay\fR .RS 4 vdisplay size .RE .PP \fIvrefresh\fR .RS 4 vrefresh rate\&. .RE .PP \fIinterlaced\fR .RS 4 whether to compute an interlaced mode .RE .PP \fImargins\fR .RS 4 desired margin (borders) size .RE .SH "DESCRIPTION" .PP return the modeline based on GTF algorithm .PP This function is to create the modeline based on the GTF algorithm\&. .SH "GENERALIZED TIMING FORMULA IS DERIVED FROM" .PP GTF Spreadsheet by Andy Morrish (1/5/97) .SH "AVAILABLE AT HTTP" .PP //www\&.vesa\&.org .PP And it is copied from the file of xserver/hw/xfree86/modes/xf86gtf\&.c\&. What I have done is to translate it by using integer calculation\&. I also refer to the function of fb_get_mode in the file of drivers/video/fbmon\&.c .SH "STANDARD GTF PARAMETERS" .PP M = 600 C = 40 K = 128 J = 20 .SH "RETURNS" .PP The modeline based on the GTF algorithm stored in a drm_display_mode object\&. The display mode object is allocated with \fBdrm_mode_create\fR\&. Returns NULL when no mode could be allocated\&. .SH "AUTHORS" .PP \fBJesse Barnes\fR <\&jesse.barnes@intel.com\&> .br Intel Corporation, .RS 4 Initial version .RE .PP \fBLaurent Pinchart\fR <\&laurent.pinchart@ideasonboard.com\&> .br Ideas on board SPRL, .RS 4 Driver internals .RE .PP \fBDaniel Vetter\fR <\&daniel.vetter@ffwll.ch\&> .br Intel Corporation, .RS 4 Contributions all over the place .RE .SH "COPYRIGHT" .br