calculate_fb...l_fb_divider(9)
πΈ calculate_fb...l_fb_divider(9) β Kernel API Manual πΈ
okay bestie, welcome to the group chat that is the Kernel API Manual π this one is a little baby page but she's important, so lock in. it's all about calculate_fb_and_fractional_fb_divider and honestly? the name is a mouthful but the vibe is slay β¨
β¨ NAME β¨
calculate_fb_and_fractional_fb_divider β Calculates feedback and fractional feedback dividers values π
like, that's literally her job. divider math. no cap.
π¦ SYNOPSIS π¦
bool calculate_fb_and_fractional_fb_divider (struct
calc_pll_clock_source *calc_pll_cs , uint32_t target_pix_clk_100hz ,
uint32_t ref_divider , uint32_t post_divider , uint32_t
*feedback_divider_param , uint32_t *fract_feedback_divider_param );
look at her go π six params, returns a bool, main character energy fr fr.
π ARGUMENTS π
calc_pll_csβ Pointer to clock source information π like, the whole context bestie, you gotta hand her the source info.target_pix_clk_100hzβ Desired frequency in 100 Hz πΈ that's the number you actually want, but in units of 100 Hz, okay? units matter, always.ref_dividerβ Reference divider (already known) β you already figured this one out, just pass it in.post_dividerβ Post Divider (already known) π« same deal, you know this one already, hand it over.feedback_divider_paramβ Pointer where to store calculated feedback divider value π«Ά she writes the answer here, so give her a real place to put it.fract_feedback_divider_paramβ Pointer where to store calculated fract feedback divider value π yep, the fractional one, separate pointer, separate home.
π₯ RETURN π₯
so here's the tea π β she fills the locations pointed by feedback_divider_param and fract_feedback_divider_param. that's the side quest.
and then it returns:
trueif feedback divider not 0 β iconic, everything went greatfalseshould never happen) π like genuinely, if you see this, something has gone deeply wrong and we need to talk about it. note the original's stray closing paren β she's quirky like that, i don't make the rules.
bestie. fr fr. if this returns false, do not just vibe past it. it "should never happen" and that's a red flag π©
π SEE ALSO π
- Kernel file
./drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.cβ that's where she lives π calc_fb_divider_checking_tolerance(9)β her cousin, also does divider things, go say hi π
and that's the whole page bestie, short and sweet, exactly like she should be π§ββοΈπ
kisses, and remember: this little gem comes from ./drivers/gpu/drm/amd/display/..., dated October 2026, and yes she's still out here in the Kernel API Manual looking gorgeous πβ¨ no cap.
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms