diff options
| author | Zack Rusin <zack.rusin@broadcom.com> | 2026-10-27 02:07:05 -0400 |
|---|---|---|
| committer | Zack Rusin <zack.rusin@broadcom.com> | 2026-11-16 15:09:32 -0500 |
| commit | 556271f0ade9d3f1ed0a386f29d3363be294c1fc (patch) | |
| tree | 08107849922e258798be7f421ae7846ccef05f1f /rust/kernel/alloc | |
| parent | 9725b0454e65f15ae76788f2004a7ba8b493362a (diff) | |
drm/vmwgfx: keep cursor mappings and pins with each plane state
Cursor plane states duplicate the user object reference without acquiring
its mapping or pin. Preparing the duplicated state nevertheless unmaps
that object, and only pins the new buffer if it is not already pinned.
Cleanup of an older state can therefore remove a mapping or pin still
needed by another cursor commit. Repeated cursor updates from KMS clients
can then access an unmapped or movable buffer.
Give each prepared state its own mapping, buffer reference and pin, and
reset the mapping when duplicating a state. Release only the resources
owned by that state in cleanup_fb(). Map the required image extent for
every state so resizing a cursor on the same buffer cannot reuse a
smaller cached mapping. Unwind the pin and reservation if preparation
fails.
Fixes: 965544150d1c ("drm/vmwgfx: Refactor cursor handling")
Cc: stable@vger.kernel.org
Assisted-by: LLM
Signed-off-by: Zack Rusin <zack.rusin@broadcom.com>
Reviewed-by: Maaz Mombasawala <maaz.mombasawala@broadcom.com>
Tested-by: fausten <yunfeng.li.nb@gmail.com>
Link: https://patch.msgid.link/20261027211729.646988-2-zack.rusin@broadcom.com
Diffstat (limited to 'rust/kernel/alloc')
0 files changed, 0 insertions, 0 deletions
