calculate_st...t_from_swath(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… calculate_st...t_from_swath(9) β€” Kernel API Manual ✨

okay so bestie, welcome to the group chat for calculate_st...t_from_swath(9) β€” that's the Kernel API manual, and yes the title is literally truncated like that, it's giving "my name got cut off in the GC nickname" energy 😭. Anyway. Sit down, hydrate, let's get into it.


🌸 NAME 🌸

calculate_start_line_and_height_from_swath β€” okay so this icon takes the output from calculate_hubp_start_end_lines and calculates hardware programming values. Which values? SVP0/1_START_LINE and SVP0/1_HEIGHT. That's the whole vibe, periodt.


✨ SYNOPSIS ✨

void calculate_start_line_and_height_from_swath (uint32_t
svp0_start_sw_idx_curr , uint32_t svp0_num_swaths_curr , uint32_t
svp0_start_sw_idx_next , uint32_t svp0_num_swaths_next , uint32_t
svp1_start_sw_idx_curr , uint32_t svp1_num_swaths_curr , uint32_t
svp1_start_sw_idx_next , uint32_t svp1_num_swaths_next , uint16_t
rec_start_dst , uint16_t svp0_start_dst , uint32_t svp0_frame_count ,
uint32_t program_go_line , uint32_t program_go_frame_count , uint16_t
viewport_start , uint16_t viewport_size , uint8_t access_direction ,
uint16_t vstartup , uint16_t swath_height , uint16_t *svp0_start_line ,
uint16_t *svp0_height , uint16_t *svp0_height_next , uint16_t
*svp1_start_line , uint16_t *svp1_height , uint16_t *svp1_height_next );

it's a void function, she returns nothing, she simply does πŸ’…. twenty-four parameters. twenty-four. not me counting them twice to make sure 🫢.


πŸŽ€ ARGUMENTS πŸŽ€

okay so here's the part where the manpage simply Did Not Do The Reading πŸ™ˆ. Every single one of these says -- undescribed -- in the original, and I'm not about to make stuff up, so I'm passing that message along verbatim, bestie. no cap.

  • svp0_start_sw_idx_curr β€” -- undescribed --
  • svp0_num_swaths_curr β€” -- undescribed --
  • svp0_start_sw_idx_next β€” -- undescribed --
  • svp0_num_swaths_next β€” -- undescribed --
  • svp1_start_sw_idx_curr β€” -- undescribed --
  • svp1_num_swaths_curr β€” -- undescribed --
  • svp1_start_sw_idx_next β€” -- undescribed --
  • svp1_num_swaths_next β€” -- undescribed --
  • rec_start_dst β€” -- undescribed --
  • svp0_start_dst β€” -- undescribed --
  • svp0_frame_count β€” -- undescribed --
  • program_go_line β€” -- undescribed --
  • program_go_frame_count β€” -- undescribed --
  • viewport_start β€” -- undescribed --
  • viewport_size β€” -- undescribed --
  • access_direction β€” -- undescribed --
  • vstartup β€” -- undescribed --
  • swath_height β€” -- undescribed --
  • svp0_start_line β€” -- undescribed --
  • svp0_height β€” -- undescribed --
  • svp0_height_next β€” -- undescribed --
  • svp1_start_line β€” -- undescribed --
  • svp1_height β€” -- undescribed --
  • svp1_height_next β€” -- undescribed --

like, the way that literally all twenty-four of them are just sitting there undescribed... the manpage said "figure it out" and dipped πŸ˜­πŸ’€. (the types are in the synopsis though, so at least we know which ones are uint32_t, which are uint16_t, which is the lone uint8_t access_direction, and which six are uint16_t * out-pointers. slay for that, at least πŸ‘‘)


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so the actual tea β˜•: this function takes the output from calculate_hubp_start_end_lines and calculates the values for START_LINE and HEIGHT β€” and those are the values that get used to program directly into hardware. direct. into. hardware. main character energy fr fr πŸ”₯.

and then the original drops this absolute wall of asterisks, which I am preserving in its full chaotic glory because it's iconic and I refuse to edit it:

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

that's it. that's the description. she's mysterious, she's got a star divider, she ate ✨


🌈 SEE ALSO 🌈

first up, the kernel file itself β€” located at:

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

and the whole friend group, in the original order, no cap:

go read all of them, bestie, they're all in the same little dml2 friend group 🫢


heads up: this page came from the source path ./drivers/gpu/drm/amd/display/... (yes, truncated just like the title β€” the manpage generator was in a hurry okay 😭) and it's dated October 2026. that's the whole footer, and I'm folding it in here instead of copy-pasting the line, as promised πŸ’–

and that's the page!! πŸ’œ calculate_st...t_from_swath(9) out. twenty-four arguments, zero descriptions, one star divider, infinite swag. mwah πŸŽ€βœ¨πŸŒΈπŸ’…

πŸ“¦ where this page comes from