drm/damage-helper: Improve damage-clipping heuristics
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest5 patches 10 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | drm/damage-helper: Style changesdrivers/ | +9 | 0 replies | |
| 2/5 | drm/damage-helper: Decouple partial plane updates from damage clippingdrivers/ drivers/ include/ | +59 | 0 replies | |
| 3/5 | drm/damage-helper: Do partial updates on legacy cursor changesdrivers/ | +12 | 0 replies | |
| 4/5 | drm/damage-helper: Do partial updates if framebuffer has not been changeddrivers/ drivers/ drivers/ +1 more | +25 | 10 replies | |
| 5/5 | drm/damage-helper: Avoid partial updates for DIRTYFB without damagedrivers/ drivers/ include/ | +13 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/5] drm/damage-helper: Improve damage-clipping heuristics
DRM Drivers can minimize a plane update by looking at damage clipping information provided by userspace. So far, not having damage information starts a full-plane update. Improve the heuristics for detecting partial and full-plane updates by looking at the various state variables of a plane update.
The current scheme of interpreting 'no damage information' as 'do full update' works for hardware with a single primary plane. For hardware with multiple planes, missing damage information can generate significant overhead. For example, ast supports a primary plane and a cursor plane. DRM performs an atomic update when the cursor plane is being updated in some way (e.g., moved). The lack of damage information on the primary plane results in a full-plane update of the primary plane as well. Using shadow planes that need to be memcpy'd to video memory creates a full redraw of the entire primary plane whenever the user moves the mouse cursor.
The patchset improves the current heuristics by looking at various state variables to detect whether a full update is necessary.
Patch #2 decouples full-plane updates from the (non-)existence of damage information. Full-plane updates are still the default, but the dedicated flag in the plane state allows for more fine-grained control.
Patches #3 to #5 enable partial plane updates on various conditions.
The patchset has been tested by converting ast to SHMEM and running Gnome on X11, Gnome in Wayland mode, and Weston. The new heuristics reduce each environment's unnecessary updates of the primary plane to
no-ops: DRM still invokes the primary plane's atomic_update, but the costly memcpy to video memory is being avoided.
Thomas Zimmermann (5):
drm/damage-helper: Style changes
drm/damage-helper: Decouple partial plane updates from damage clipping drm/damage-helper: Do partial updates on legacy cursor changes drm/damage-helper: Do partial updates if framebuffer has not been
changed
drm/damage-helper: Avoid partial updates for DIRTYFB without damage
drivers/gpu/drm/drm_atomic_helper.c | 3 + drivers/gpu/drm/drm_atomic_state_helper.c | 3 + drivers/gpu/drm/drm_damage_helper.c | 99 +++++++++++++++++------ include/drm/drm_plane.h | 23 ++++++ 4 files changed, 105 insertions(+), 23 deletions(-)
base-commit: d8deedaa0fcd8192715a052a0239bee3f74a8fb1
Signature · 1 line
2.37.3