intel_wm_method2(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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, iconic
  • width β€” 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 🌸

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