> Preparing a dumb framebuffer changes device-wide layout and BO shadow
> bindings before the atomic commit succeeds. An aborted preparation can
> redirect live framebuffers to an uncommitted shadow. Per-plane cleanup
> can also remove a shadow binding still needed by another head using the
> same framebuffer.
>
> Give each prepared primary plane state a reference and pin to a shared
> shadow. Compute the complete new layout and prepare one matching shadow
> without changing the displayed states. Include all primary planes and
> CRTCs so replacement and repacking redraw every head under the same
> commit dependencies. Release each state's resources independently.
>
> Keep the primary while any new primary plane remains active, and destroy
> it when the last head turns off, including DPMS with retained framebuffer
> bindings. Route DirtyFB clips through each matching active plane state
> to its packed slot; copy clips before the draw helper translates them.
>
> Retain allocation-based packing and full-framebuffer drawing here; plane
> source geometry is handled separately.
>
> Fixes: 90adda2ce898 ("drm/qxl: cover all crtcs in shadow bo.")
> Assisted-by: LLM sparse
> Signed-off-by: Dillon Amburgey <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review ยท
https://sashiko.dev/#/patchset/[email protected]?part=4