This series fixes cursor validation and buffer lifetime handling in
vmwgfx, including guest-backed devices without cursor MOB support.

Each prepared plane state keeps its own mapping, reference and pin, so
cleanup of an older commit cannot release resources needed by a newer
one. Cursor MOB teardown and dumb-buffer surface detachment also hold the
buffer reservations required by TTM.

Validation uses the newly selected framebuffer and rejects zero-sized
images and surfaces without backing storage. GB-only cursors use the
define-cursor command limits, including the 32 KiB whole-command guarantee
when using command buffers. Legacy cursor-bypass hotspots are included
consistently in the image and position, fixing displaced Xorg cursors.

Thanks to Yunfeng Li and Tomas M for reporting and diagnosing the GB-only
cursor issues, and to Tomas for the hotspot fix.

LLM assistance was used for the fixes, tests and commit descriptions;
the patches carry Assisted-by: LLM.

Tomas M (1):
  drm/vmwgfx: include legacy hotspots in GB-only cursor images

Zack Rusin (5):
  drm/vmwgfx: keep cursor mappings and pins with each plane state
  drm/vmwgfx: validate GB-only cursor command limits
  drm/vmwgfx: reserve dumb buffers while detaching their surfaces
  drm/vmwgfx: validate the framebuffer selected for cursor updates
  drm/vmwgfx: reserve cursor MOBs before unpinning them

 drivers/gpu/drm/vmwgfx/vmwgfx_bo.c           |   3 +
 drivers/gpu/drm/vmwgfx/vmwgfx_cursor_plane.c | 166 +++++++++++++------
 drivers/gpu/drm/vmwgfx/vmwgfx_cursor_plane.h |   4 +
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c          |   1 +
 4 files changed, 125 insertions(+), 49 deletions(-)


base-commit: 8ef66514d7b993c9fb96a5886f001e3556610c1c
-- 
2.53.0

Reply via email to