calculate_st...x_num_swaths(9)
π
calculate_st...x_num_swaths(9) β Kernel API Manual π
okay so bestie, welcome to the Kernel API Manual page for calculate_start_index_num_swaths. itβs giving helper-function main character energy, and weβre gonna read it together. π«Άβ¨
πΈ NAME πΈ
calculate_start_index_num_swaths β the helper function that calculates svp params for both vp0 and vp1. thatβs the whole vibe, no cap. π
π¦ SYNOPSIS π¦
void calculate_start_index_num_swaths (uint32_t svp0_start_swath_idx ,
uint32_t svp0_end_swath_idx , uint32_t svp1_start_swath_idx , uint32_t
svp1_end_swath_idx , uint16_t prefetch_swaths , uint16_t total_swaths ,
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 );
π ARGUMENTS π
okay so there are 14 arguments, and the source is out here giving us absolutely nothing but -- undescribed -- for every single one. not me reading the manual like ποΈπποΈ. anyway, here they all are, exactly, with zero invented lore:
svp0_start_swath_idxβ-- undescribed --svp0_end_swath_idxβ-- undescribed --svp1_start_swath_idxβ-- undescribed --svp1_end_swath_idxβ-- undescribed --prefetch_swathsβ-- undescribed --total_swathsβ-- undescribed --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 --
bestie, the manual literally says -- undescribed -- for all of these, so Iβm not gonna guess at behaviour. that would be fake lore and we donβt do that here. π
π₯ DESCRIPTION π₯
okay so the actual description is short and sweet: it calculates svp parameters in terms of start swath idx and number of swaths for both vp0 and vp1. lowkey iconic that it does both vp0 and vp1. π
thereβs also this exact asterisk wall in the page, so Iβm preserving it because details matter:
***********************************************************************************************************
π SEE ALSO π
first up, Kernel file: ./drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_standalone_libraries/alternate_pstate_shared_lib.c
then the whole bestie squad of refs, all present and accounted for:
in_circular_range(9)apply_svp1_workaround(9)calculate_start_line_and_height_from_swath(9)get_swath_deadlines(9)calculate_swath_deadline_dst(9)is_dst_in_next_frame(9)is_end_swath_in_next_frame(9)is_svp_dst_in_next_frame(9)calculate_swath_idx_from_dst(9)populate_svp_params(9)populate_start_index_num_swaths_helper(9)calculate_hubp_start_end_lines(9)get_prefetch_end_line(9)get_effective_vblank_start(9)
mwah π this page is from ./drivers/gpu/drm/amd/display/... and itβs dated October 2026, bestie. go off and calculate those svp params. periodt. πβ¨π¦
π¦ 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