Skip to content

drm/vmwgfx: fix cursor validation and buffer lifetimes

Zack Rusin dri-devel lkml stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6drm/vmwgfx: keep cursor mappings and pins with each plane statedrivers/gpu/drm/vmwgfx/vmwgfx_cursor_plane.c drivers/gpu/drm/vmwgfx/vmwgfx_cursor_plane.h drivers/gpu/drm/vmwgfx/vmwgfx_kms.c+48 -263 replies
2/6drm/vmwgfx: validate GB-only cursor command limitsdrivers/gpu/drm/vmwgfx/vmwgfx_cursor_plane.c+21 -23 replies
3/6drm/vmwgfx: include legacy hotspots in GB-only cursor imagesdrivers/gpu/drm/vmwgfx/vmwgfx_cursor_plane.c+5 -52 replies
4/6drm/vmwgfx: reserve dumb buffers while detaching their surfacesdrivers/gpu/drm/vmwgfx/vmwgfx_bo.c+3 -01 reply
5/6drm/vmwgfx: validate the framebuffer selected for cursor updatesdrivers/gpu/drm/vmwgfx/vmwgfx_cursor_plane.c+43 -183 replies
6/6drm/vmwgfx: reserve cursor MOBs before unpinning themdrivers/gpu/drm/vmwgfx/vmwgfx_cursor_plane.c+7 -01 reply

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by.

PatchfaustenMaaz Mombasawala
SeriesT-b
1/6R-b
2/6R-b
3/6R-b
4/6R-b
5/6R-b
6/6R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/6] drm/vmwgfx: fix cursor validation and buffer lifetimes

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

Signature · 1 line
2.53.0