fb_get_hblank_by_hfreq(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– fb_get_hblank_by_hfreq(9) πŸ’–

okay so this one's from the Kernel API Manual, and it's giving β€œmath but make it kernel.” It's literally the page for fb_get_hblank_by_hfreq.

✨ NAME ✨

fb_get_hblank_by_hfreq β€” get horizontal blank time given hfreq. That's it, that's the vibe πŸ’….

🌸 SYNOPSIS 🌸

u32 fb_get_hblank_by_hfreq (u32 hfreq , u32 xres );

πŸŽ€ ARGUMENTS πŸŽ€

  • hfreq β€” horizontal freq.
  • xres β€” horizontal resolution in pixels.

πŸ’… DESCRIPTION πŸ’…

okay bestie, here's the formula situation. The page gives you hblank like this:

           xres * duty_cycle
hblank = ------------------
            100 - duty_cycle

And duty cycle is described as:

duty cycle = percent of htotal assigned to inactive display
duty cycle = C - (M/Hfreq)

Then the "where" part, with every token kept exactly as the page names it:

where: C = ((offset - scale factor) * blank_scale)
       -------------------------------------- + scale factor
                        256
       M = blank_scale * gradient

That's the whole math tea: xres, duty_cycle, 100 - duty_cycle, htotal, C, M, Hfreq, offset, scale factor, blank_scale, gradient, and the 256. No cap, it's all there 🫢.

πŸ”₯ SEE ALSO πŸ”₯

Kernel file: ./drivers/video/fbdev/core/fbmon.c


okay that's the whole page, bestie πŸ’– source: ./drivers/video/fbdev/core, dated October 2026 β€” periodt πŸŽ€

πŸ“¦ where this page comes from