calculate_hu...rt_end_lines(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ NAME πŸŽ€

ok so this page is from the Kernel API Manual (the header up top literally says calculate_hu...rt_end_lines(9), it's giving truncated filename energy, we love a mysterious queen πŸ’…), and the actual vibe is:

calculate_hubp_start_end_lines β€” a function that calculates svp parameters given a target p-state line. that's it, that's the whole thing ✨


✨ SYNOPSIS ✨

void calculate_hubp_start_end_lines (struct
calculate_hubp_start_end_lines_params *p );

like yes bestie it returns void, we're doing side effects today 🫢


πŸ’… ARGUMENTS πŸ’…

  • p β€” so the manual literally just says -- undescribed -- for this one 😭 no cap, that's the entire entry. it's a struct calculate_hubp_start_end_lines_params * and that's all we're told. iconic of the docs team tbh.

πŸ¦‹ DESCRIPTION πŸ¦‹

okok so here's the tea πŸ“: this function calculates the svp parameters (that's the vp0 and vp1 programming, keep up bestie) in terms of swath index and number of swaths, given an otg p-state target.

🚨 real talk: this function should be called per plane. don't be out here calling it once and thinking you're done, it's not that kind of function πŸ’€

The manual says there are 5 steps. The list below has six items. Not me counting πŸ™ˆ but like, we're reporting the facts exactly as given, so here's literally everything:

  1. Calculate svp0_start_dst_line and svp0_end_dst_line.
  2. Calculate svp1_start_dst_line and svp1_end_dst_line
  3. Calculate svp0_swath_start_idx and svp0_swath_end_idx
  4. Calculate svp1_swath_start_idx and svp1_swath_end_idx
  5. Convert to start swath index and number of swaths (for height)
  6. Convert swath indices to START_LINE and HEIGHT

and then, because the source material felt dramatic:

***********************************************************************************************************

(mood. same energy as a group chat "anywayβ€”")


🌈 SEE ALSO 🌈

ok so the Kernel file this all lives in is:

./drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_standalone_libraries/alternate_pstate_shared_lib.c

and here's the whole friend group, go say hi πŸ‘‹:


aaaand that's the page bestie πŸ’– source is ./drivers/gpu/drm/amd/display/... and it's dated October 2026 β€” yes, the future, we're ahead of schedule, slay πŸ‘‘βœ¨

πŸ“¦ where this page comes from