drm_gtf_mode(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– drm_gtf_mode(9) β€” Kernel API Manual πŸ’–

okay bestie, welcome to the Kernel API Manual πŸ’… this one is all about drm_gtf_mode(9), and it's lowkey a whole modeline-making moment. let's get into it 🫢

✨ 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 https://www.vesa.org πŸ“Ί

And it is copied from the file of xserver/hw/xfree86/modes/xf86gtf.c. What the author did is translate it by using integer calculation. They 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

✨ RETURN ✨

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. πŸ˜­πŸ’–

✨ SEE ALSO ✨

Kernel file ./drivers/gpu/drm/drm_modes.c πŸ‘‘

the whole SEE ALSO friend group is here, no cap:


xoxo, your Unix bestie πŸ’… this page comes from ./drivers/gpu/drm, dated October 2026, and the manual page is drm_gtf_mode(9) πŸŽ€βœ¨

πŸ“¦ where this page comes from