radeon_uvd_...pll_dividers(9)
๐ฆ 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โ aradeon_devicepointer. 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
- 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