tegra_cvb_add_opp_table(9)
π tegra_cvb_add_opp_table(9) β Kernel API Manual, bestie edition β¨
okay so. header check: this is tegra_cvb_add_opp_table(9) from the Kernel API Manual, and yes it's exactly as iconic as it sounds. buckle up π
β¨ NAME β¨
tegra_cvb_add_opp_table β literally builds an OPP table from the Tegra CVB tables π¦
πΈ SYNOPSIS πΈ
const struct cvb_table * tegra_cvb_add_opp_table (struct device *dev ,
const struct cvb_table *tables , size_t count , struct rail_alignment
*align , int process_id , int speedo_id , int speedo_value , unsigned
long max_freq );
like yes that's a lot of arguments, but we're gonna get through them together, i promise π«Ά
π ARGUMENTS π
devβ thestruct device *that we're building the OPP table for. it's giving main character energy, honestly πtablesβ the array of CVB tables. the whole squad πcountβ the size of that array we just mentioned. gotta know how many besties we're working with β¨alignβ the parameters of the regulator step and offset. fancy regulator math, don't worry about it πprocess_idβ the process id of the HW module π₯speedo_idβ the speedo id of the HW module π©± (no cap, that's the actual name)speedo_valueβ the speedo value of the HW module βmax_freqβ the highest safe clock rate. the ceiling, the limit, the "don't push it" π«
π§ DESCRIPTION π§
so, on Tegra, a CVB table encodes the relationship between operating voltage and safe maximal frequency for a given module (e.g. GPU or CPU). iykyk π
this function calculates the optimal voltage-frequency operating points for the given arguments and exports them via the OPP library for the given dev. it's literally matchmaking but for voltage and frequency π
and what does it give back? it returns a pointer to the struct cvb_table that matched, or an ERR_PTR on failure. so like, either you get your match or you get a vibe check that failed π
π SEE ALSO π
- Kernel file
./drivers/clk/tegra/cvb.cβ go read it, bestie, it's right there π
fr fr:ERR_PTRis not a validcvb_tablepointer, so check that return value before you dereference it. no cap π¨
and that's the whole page, periodt π
source is ./drivers/clk/tegra, this is the Kernel API Manual, dated October 2026, and the page itself is tegra_cvb_add_opp_table(9) β obsessed with her, honestly ππΈβ¨
π¦ 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