intel_wm_method2(9)
π
intel_wm_method2 β Kernel API Manual, bestie edition β¨
okay so picture this: it's giving manual page, it's giving DRM/i915 display watermark math, and you're the main character who needs to know how much FIFO to hand over. The function is called intel_wm_method2, and it lives its little life in the Kernel API Manual. Let's get into it π«Ά
β¨ NAME β¨
intel_wm_method2 β the Method 2 / "large buffer" watermark formula, no cap πΈ
π¦ SYNOPSIS π¦
unsigned int intel_wm_method2 (unsigned int pixel_rate , unsigned int
htotal , unsigned int width , unsigned int cpp , unsigned int latency );
literally just five unsigned ints in and one unsigned int out, we love a clean signature π
π ARGUMENTS π
pixel_rateβ the pipe pixel rate, measured in kHz βhtotalβ the pipe horizontal total, iconicwidthβ the plane width in pixels, yes bestie, pixels π¦cppβ the plane's bytes per pixel, so like, how chunky each pixel is πlatencyβ memory wakeup latency, and bestie listen, it's in 0.1us units so don't come at it with plain microseconds π
π DESCRIPTION π
So what are we even doing here? We're computing the watermark with the method 2 β aka the "large buffer" formula π. And heads up: the caller is allowed to add extra cachelines on top of this to account for TLB misses and clock crossings. That's a you thing, not a this function thing, iykyk β¨
This method is obsessed (affectionate) with the long term drain rate of the FIFO β like, it does account for blanking periods, which effectively reduce the average drain rate across a longer period π. And the whole "large" thing? It's not about the buffer being large in a vague vibe sense β it refers to the fact that the FIFO is relatively large compared to the amount of data fetched. Periodt π
The FIFO level vs. time graph lowkey looks something like this:
|___ |___ | ___ | ___ | | __
--__--__--__--__--__--__ (- plane active, _ blanking) -> time
(that's - for plane active, _ for blanking, and the arrow means time, bestie π°οΈ)
π₯ RETURN π₯
The watermark, in bytes. That's it, that's the tea π
πΈ SEE ALSO πΈ
- Kernel file
./drivers/gpu/drm/i915/display/i9xx_wm.cπ intel_set_memory_cxsr(9)intel_wm_method1(9)intel_calculate_wm(9)
go read those too, they're all in the same friend group fr fr π«Ά
and that's the whole page!! π
this lil icon comes to you from ./drivers/gpu/drm/i915/display, dated October 2026, and honestly? she ate. mwah πβ¨
π¦ 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