---
name: "drm_gtf_mode"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/drm_gtf_mode"
---

# drm\_gtf\_mode(9)

create the modeline based on the GTF algorithm

## NAME

drm\_gtf\_mode - create the modeline based on the GTF algorithm

## SYNOPSIS

**struct drm\_display\_mode \* drm\_gtf\_mode(struct drm\_device \*** *dev***, int** *hdisplay***, int** *vdisplay***, int** *vrefresh***, bool** *interlaced***, int** *margins***);**

## ARGUMENTS

*dev*

drm device

*hdisplay*

hdisplay size

*vdisplay*

vdisplay size

*vrefresh*

vrefresh rate.

*interlaced*

whether to compute an interlaced mode

*margins*

desired margin (borders) size

## DESCRIPTION

return the modeline based on GTF algorithm

This function is to create the modeline based on the GTF algorithm.

## GENERALIZED TIMING FORMULA IS DERIVED FROM

GTF Spreadsheet by Andy Morrish (1/5/97)

## AVAILABLE AT HTTP

//www.vesa.org

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

## STANDARD GTF PARAMETERS

M = 600 C = 40 K = 128 J = 20

## RETURNS

The modeline based on the GTF algorithm stored in a drm\_display\_mode object. The display mode object is allocated with **drm\_mode\_create**. Returns NULL when no mode could be allocated.

## AUTHORS

**Jesse Barnes** \<jesse.barnes@intel.com\>\
 Intel Corporation,

Initial version

**Laurent Pinchart** \<laurent.pinchart@ideasonboard.com\>\
 Ideas on board SPRL,

Driver internals

**Daniel Vetter** \<daniel.vetter@ffwll.ch\>\
 Intel Corporation,

Contributions all over the place

## COPYRIGHT
