drm_gtf_mode — create the modeline based on the GTF algorithm
struct drm_display_mode * drm_gtf_mode ( | struct drm_device * dev, |
| int hdisplay, | |
| int vdisplay, | |
| int vrefresh, | |
| bool interlaced, | |
int margins); |
devdrm device
hdisplayhdisplay size
vdisplayvdisplay size
vrefreshvrefresh rate.
interlacedwhether to compute an interlaced mode
marginsdesired margin (borders) size
return the modeline based on GTF algorithm
This function is to create the modeline based on the GTF algorithm.
//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
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.