is_end_swath_in_next_frame(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ is_end_swath_in_next_frame β€” from the Kernel API Manual (section 9, bestie)

okay so this is is_end_swath_in_next_frame(9), and yes it's a whole mouthful. It's a helper function. It answers exactly one question: is the dst_line that belongs to an END swath sitting in the "next" frame or not? that's it. that's the whole personality. πŸ’…


✨ SYNOPSIS ✨

bool is_end_swath_in_next_frame (uint32_t target_frame_count , uint32_t
curr_frame_count , uint32_t curr_line , uint32_t dst_line , uint16_t
frame_boundary , uint16_t vstartup );

like, six arguments, all vibes. returns a bool. slay. πŸŽ€


🌸 ARGUMENTS 🌸

so here's the thing, bestie β€” the actual manpage says -- undescribed -- for every single one of these. no cap, not one of them got a description. so I'm not gonna sit here and make stuff up, because that would be lying to you and we don't do that. πŸ™ˆ

  • target_frame_count β€” -- undescribed -- πŸ’€
  • curr_frame_count β€” -- undescribed -- πŸ’€
  • curr_line β€” -- undescribed -- πŸ’€
  • dst_line β€” -- undescribed -- πŸ’€
  • frame_boundary β€” -- undescribed -- πŸ’€
  • vstartup β€” -- undescribed -- πŸ’€
fr fr if you need to know what these do, go read the source. the docs are not carrying us here and that's just the reality of it. 🫢

πŸ’– DESCRIPTION πŸ’–

okay so the actual tea: this function figures out whether a dst line associated with an END swath is in the "next" frame.

and here's the part that matters β€” END swaths have special handling for deciding current vs. next, compared to regular swaths. so like, don't just assume it works the same way regular swaths do. it does not. it's built different. πŸ‘‘

the actual rule, and I'm quoting the logic not vibing here: if the dst line is beyond the boundary (prefetch start) of the next frame, it is considered part of "next." that's the whole test. past the boundary β†’ next frame. periodt. ✨


πŸ”₯ RETURN πŸ”₯

  • true β€” the dst line is considered part of the "next" frame 🌈
  • false β€” it's not πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

go read the Kernel file, bestie, it's right here:

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

and then the whole friend group, all iconic, no skips:


and that's the page!! πŸ’– mwah. this one came out of the Kernel API Manual, lives at is_end_swath_in_next_frame(9), got dated October 2026, and its source path is that long gorgeous ./drivers/gpu/drm/amd/display/... situation up there. go be a main character and read the actual C file, iykyk. πŸ¦‹βœ¨

πŸ“¦ where this page comes from