is_dst_in_next_frame(9)
π is_dst_in_next_frame(9) π
okay so first of all, this is from the Kernel API Manual β yes, the kernel has a whole manual and this little function lives in it, and honestly it's giving "small but crucial" energy.
πΈ NAME πΈ
is_dst_in_next_frame β a helper function that figures out if a given dst line is in the "next" frame. that's it, that's the job. lowkey iconic.
β¨ SYNOPSIS β¨
bool is_dst_in_next_frame (uint32_t curr_otg_line , uint32_t
curr_frame_count , uint32_t dst_line , uint32_t target_frame_count ,
uint16_t frame_boundary );
so she takes five args and hands you back a bool. cute. π
π¦ ARGUMENTS π¦
bestie. i have to be so fr with you right now. the page literally says -- undescribed -- for every single one of these. the manpage author said "i'm not doing that today" and honestly? relatable. π
here's the full lineup in the order they show up, with their types from the synopsis, because that's all we're getting:
curr_otg_lineβuint32_t. the page says:-- undescribed --. that's it. that's the description. πcurr_frame_countβuint32_t. also-- undescribed --. (iykyk, i guess??)dst_lineβuint32_t. yep.-- undescribed --. together withtarget_frame_countit does stuff in DESCRIPTION, but this section is not helping you.target_frame_countβuint32_t.-- undescribed --yet again.frame_boundaryβuint16_t(the only 16-bit baby here π«Ά). and yes.-- undescribed --.
no cap: if you wanted the actual meanings, this page isn't giving them. i'm not gonna invent lore that isn't there.
π DESCRIPTION π
okay HERE'S where it actually slays. this function decides whether a given dst_line counts as living in the "next" frame. and the rules are honestly not that deep:
- if the target frame count is NOT equal to the current frame count β the dst line is considered in the next frame, no matter which line it is on. like, any line. any position. doesn't matter. frame counts don't match, you're next frame, periodt. π
- if the frame counts ARE equal β then the dst line only counts as next frame when the current line <
frame_boundaryanddst_line >= frame_boundary. both conditions, bestie. both. it's an AND, not a vibe check. β¨
so it's basically a little boundary-crossing detective. two comparisons, one bool, done.
π₯ RETURN π₯
True if the dst line is considered part of the "next" frame, false otherwise. simple. clean. no notes. π
and then the original page just... ends the section with an entire line of asterisks. not me being obsessed with whatever aesthetic decision happened there π i'm preserving it because i respect the artist:
***********************************************************************************************************
π SEE ALSO π
the page points you at:
- Kernel file
./drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_standalone_libraries/alternate_pstate_shared_lib.c
and then the friend group shows up, fr fr β all of these are referenced:
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_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_start_index_num_swaths(9)calculate_hubp_start_end_lines(9)get_prefetch_end_line(9)get_effective_vblank_start(9)
π and that's the whole page! cute little sign-off time: this one comes from ./drivers/gpu/drm/amd/display/..., dated October 2026, and it's filed under is_dst_in_next_frame(9). drink some water, go read the actual source file, ily, bye ππ¦
π¦ 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