radeon_uvd_...pll_dividers(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

๐Ÿฆ‹ radeon_uvd_...pll_dividers(9) ๐Ÿฆ‹

okay so bestie, this is a page from the Kernel API Manual and honestly? it's giving "small function, big responsibility" and i'm obsessed. sit down, grab a lil snack ๐Ÿ“, and let's get into it.


โœจ NAME โœจ

radeon_uvd_calc_upll_dividers โ€” calc UPLL clock dividers ๐Ÿ’…

like, it calculates the clock dividers for the UPLL. that's the whole vibe. no cap.


๐ŸŒธ SYNOPSIS ๐ŸŒธ

int radeon_uvd_calc_upll_dividers (struct radeon_device *rdev , unsigned
vclk , unsigned dclk , unsigned vco_min , unsigned vco_max , unsigned
fb_factor , unsigned fb_mask , unsigned pd_min , unsigned pd_max ,
unsigned pd_even , unsigned *optimal_fb_div , unsigned *optimal_vclk_div
, unsigned *optimal_dclk_div );

it returns an int, it takes a whole squad of unsigned args, and yes there are three pointers at the end doing the actual delivering of results. main character energy fr fr ๐Ÿ‘‘


๐ŸŽ€ ARGUMENTS ๐ŸŽ€

  • rdev โ€” a radeon_device pointer. literally just your radeon device, hi bestie ๐Ÿซถ
  • vclk โ€” the VCLK you want. your wish, your dream โœจ
  • dclk โ€” the DCLK you want. matching set, cute ๐ŸŽ€
  • vco_min โ€” minimum VCO frequency. the floor, don't go below it ๐Ÿ’€
  • vco_max โ€” maximum VCO frequency. the ceiling, don't go above it ๐Ÿšซ
  • fb_factor โ€” factor to multiply vco freq with. math time, slay ๐Ÿงฎ
  • fb_mask โ€” limit and bitmask for feedback divider. mask on, mask off ๐ŸŽญ
  • pd_min โ€” post divider minimum. tiny king ๐Ÿ‘‘
  • pd_max โ€” post divider maximum. big king ๐Ÿ‘‘
  • pd_even โ€” post divider must be even above this value. even numbers only past this point, them's the rules ๐Ÿšจ
  • optimal_fb_div โ€” the resulting feedback divider gets written here ๐Ÿ’–
  • optimal_vclk_div โ€” the resulting vclk post divider lands here ๐Ÿ’–
  • optimal_dclk_div โ€” the resulting dclk post divider goes here too ๐Ÿ’–
yes bestie, those last three are output params โ€” the function hands you back the goods through the pointers ๐Ÿ”ฅ

๐ŸŒˆ DESCRIPTION ๐ŸŒˆ

okay so the actual job: it calculates dividers for UVD's UPLL. specifically R6xx-SI, except APUs โ€” like, that tag matters, don't @ me. iykyk ๐Ÿฆ‹

and the returns? immaculate. it returns zero on success, and on error it returns -EINVAL. that's it. that's the contract. periodt ๐Ÿ’…


โญ SEE ALSO โญ

  • Kernel file ./drivers/gpu/drm/radeon/radeon_uvd.c โ€” go read the source, it's right there ๐Ÿงš
  • radeon_uvd_count_handles(9) โ€” sibling function, say hi for me ๐Ÿ‘‹

and that's the whole page, bestie ๐Ÿ’œ this lil gem lives over in ./drivers/gpu/drm/radeon and the docs are dated October 2026 โ€” write it in your calendar, screenshot it, frame it, whatever you gotta do. mwah ๐Ÿ˜ญ๐Ÿ’–

๐Ÿ“ฆ where this page comes from