calculate_ub..._dpp_per_svp(9)
β¨ calculate_ub_copy_size_per_plane_per_dpp_per_svp β¨
okay bestie, buckle up π
this one lives in the Kernel API Manual and it's a whole mouthful of a function name β calculate_ub_copy_size_per_plane_per_dpp_per_svp β but like, it's actually just doing math for display copy sizes, iykyk.
π NAME π
calculate_ub_copy_size_per_plane_per_dpp_per_svp β calculates the upper bound copy size in bytes for a given plane and svp_dst_lines, no cap, that's literally the job π
β¨ SYNOPSIS β¨
unsigned int calculate_ub_copy_size_per_plane_per_dpp_per_svp (const
struct dml2_core_calcs_calculate_alternate_params *p , unsigned int
svp_dst_lines , unsigned int plane_idx , bool chroma );
she takes four things and hands you back an unsigned int, periodt πΈ
π¦ ARGUMENTS π¦
okay so the manpage is being super mysterious here β every single one of these is literally listed as -- undescribed -- in the source. not me side-eyeing the doc writers π anyway:
pβ-- undescribed --π«Άsvp_dst_linesβ-- undescribed --π«Άplane_idxβ-- undescribed --π«Άchromaβ-- undescribed --π«Ά
girl help, the documentation said "you'll figure it out" and dipped π we're keeping it 100% honest here: the original gives us nothing more than -- undescribed -- for all four, so that's what you get too.
π DESCRIPTION π
okay so first up, there's a TODO in here, and it's giving "future me problem":
TODO: The check for total copy size versus total alt-channel aperture size can be moved directly into mode support (from optimize / admissibility check layer)
that's it, that's the TODO, bestie, it's an idea someone had and wrote down π
π Note 2 π
now THIS is the part you actually need to know, so listen up π
This function calculates a loose upper bound for the size required for the copy. Why? Because each SVP aperture needs enough space to hold the worst case copy size (i.e., prefetch + some recout swaths), so we calculate such that any SVP needs to consider the prefetch swaths in the size required.
But β and this is the plot twist π₯ β in actuality only one of SVP0 or SVP1 would have prefetch swaths required to be copied, since there cannot be the case where both SVPs overlap with prefetch.
Therefore, the result of this function should not be used to calculate the total copy time required (as it would be too long).
β οΈ fr fr, do NOT use this return value for total copy time. it's a loose upper bound, it's dramatic on purpose, she's an overestimator π
okay and then there's just a giant line of asterisks in the original:
*****************************************************************************************************************************
iconic honestly, we respect the divider energy π
π SEE ALSO π
- Kernel file β
./drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_calcs_dchub.c get_plane_params(9)compute_pre_rec_first_hdl(9)calculate_copy_swaths(9)calculate_alt_copy_time_us(9)calculate_swath_params(9)
go read those next, bestie, they're the friend group π«Ά
π sign-off π
this lil masterpiece comes to you from ./drivers/gpu/drm/amd/display/..., dated October 2026, and it's the calculate_ub..._dpp_per_svp(9) page π mwah, go calculate some upper bounds responsibly β¨π
π¦ 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