is_dst_in_next_frame(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 with target_frame_count it 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:

  1. 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. πŸ‘‘
  2. if the frame counts ARE equal β€” then the dst line only counts as next frame when the current line < frame_boundary and dst_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:


πŸŽ€ 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