intel_update_watermarks(9)
intel_update_watermarks(9) πβ¨
okay so this page is from the Kernel API Manual, and weβre about to make FIFO watermark math make sense, bestie. no cap.
β¨ NAME β¨
intel_update_watermarks β update FIFO watermark values based on current modes. literally thatβs the whole vibe.
π SYNOPSIS π
void intel_update_watermarks (struct intel_display *display );
thatβs the exact signature, keep it cute and keep it correct π«Ά
π«Ά ARGUMENTS π«Ά
displayβ the display device. thatβs it, bestie π
π DESCRIPTION π
Calculate watermark values for the various WM regs based on current mode and plane configuration. yes, itβs giving βmath but make it graphicsβ π§
There are several cases to deal with here:
- normal (i.e. non-self-refresh)
- self-refresh (
SR) mode - lines are large relative to FIFO size (buffer can hold up to
2) - lines are small relative to FIFO size (buffer can hold more than
2lines), so need to account for TLB latency
The normal calculation is:
watermark = dotclock * bytes per pixel * latency
where latency is platform & configuration dependent (we assume pessimal values here). yes, pessimal. we said what we said π
The SR calculation is:
watermark = (trunc(latency/line time)+1) * surface width * bytes per pixel
where line time = htotal / dotclock, surface width = hdisplay for normal plane and 64 for cursor, and latency is assumed to be high, as above. iconic formula behavior, honestly π
The final value programmed to the register should always be rounded up, and include an extra 2 entries to account for clock crossings. do not skip the rounding-up step, iβm begging π«Ά
We donβt use the sprite, so we can ignore that. And on Crestline we have to set the non-SR watermarks to 8. noted, bestie β¨
π SEE ALSO π
Kernel file ./drivers/gpu/drm/i915/display/intel_wm.c β go read it, iykyk ππ
mwah π β source/version path + date: ./drivers/gpu/drm/i915/display, October 2026. bye bestie! ππΈ
π¦ 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