fill_dc_dirty_rects(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… fill_dc_dirty_rects(9) β€” kernel API manual, bestie edition ✨

okay so this is a page from the Kernel API Manual (section 9, the fancy kernel-internals section, iykyk) and we're talking about fill_dc_dirty_rects β€” the little function that handles DC dirty regions for PSR selective updates. yes it's as niche as it sounds and yes it's iconic πŸŽ€


🌸 NAME 🌸

fill_dc_dirty_rects β€” fills DC dirty regions so PSR selective updates can happen πŸ’–


✨ SYNOPSIS ✨

void fill_dc_dirty_rects (struct drm_plane *plane , struct
drm_plane_state *old_plane_state , struct drm_plane_state
*new_plane_state , struct drm_crtc_state *crtc_state , struct
dc_flip_addrs *flip_addrs , bool is_psr_su , bool *dirty_regions_changed
);

like, seven arguments and a pointer to a bool. she's high maintenance but she delivers 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • plane β€” the DRM plane holding the dirty regions that need to be flushed over to the eDP remote fb. this is the main character of the whole operation πŸ’…
  • old_plane_state β€” the old state of the plane. the before pic πŸ“Έ
  • new_plane_state β€” the new state of the plane. the glow-up ✨
  • crtc_state β€” the new state of the CRTC that's connected to the plane. yes, they're linked, it's giving committed relationship πŸ’œ
  • flip_addrs β€” the DC flip tracking struct, which also tracks dirty rects. multitasking queen πŸ‘‘
  • is_psr_su β€” flag saying whether Panel Self Refresh Selective Update (PSR SU) is enabled. and here's the tea: if PSR SU is enabled and damage clips are available, only the regions of the screen that actually changed get updated 🎯. if PSR SU is not enabled, or if damage clips aren't available, then the entire screen gets updated. no shortcuts, no vibes check, just the whole thing 😭
  • dirty_regions_changed β€” dirty regions changed. that's it, that's the description, and honestly? she's straightforward and we respect that πŸ™ˆ

πŸ”₯ DESCRIPTION πŸ”₯

so for PSR SU, DC tells the DMUB uController all about the dirty rectangle regions (DRM calls these "damage clips", cute name fr fr) that need updating on the eDP remote buffer. and whose job is it to specify those dirty regions? that's amdgpu_dm's responsibility, no cap πŸ’ͺ

a damage-aware DRM client should fill the FB_DAMAGE_CLIPS property on the plane with the regions that need flushing to the eDP remote buffer 🌈

plus β€” and this is the fun part β€” some use cases, like cursor and multi-plane overlay (MPO), just go ahead and implicitly provide damage clips all on their own, no client support needed, straight from the plane bounds. self-sufficient icons, we love to see it ⭐


🧚 SEE ALSO 🧚

first up, the kernel file itself, go read the source bestie:

./drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

then the whole friend group 🫢:


πŸ’€ reminder bestie: this page comes from ./drivers/gpu/drm/amd/display/... and it's dated October 2026, all under the fill_dc_dirty_rects(9) name. that's the whole source/version situation, mwah πŸ’‹

slay, you now understand dirty rects better than most of the internet. periodt πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from