drm/vmwgfx: Cleanup the cursor snooping code
authorZack Rusin <zackr@vmware.com>
Wed, 26 Oct 2022 03:19:36 +0000 (23:19 -0400)
committerZack Rusin <zackr@vmware.com>
Mon, 31 Oct 2022 15:50:24 +0000 (11:50 -0400)
commitda7ffb9660c96eec4167f177eb1cb6e78dd7fc0e
tree62e1fe1ebc2994ff6a3da7cffa6746ee11579764
parent4cf949c7fafe21e085a4ee386bb2dade9067316e
drm/vmwgfx: Cleanup the cursor snooping code

Cursor snooping depended on implicit size and format which made debugging
quite difficult. Make the code easier to following by making everything
explicit and instead of using magic numbers predefine all the
parameters the code depends on.

Also fixes incorrectly computed pitches for non-aligned cursor snoops.
Fix which has no practical effect because non-aligned cursor snoops
are not used by the X11 driver and Wayland cursors will go through
mob cursors, instead of surface dma's.

Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Michael Banack <banackm@vmware.com>
Reviewed-by: Martin Krastev <krastevm@vmware.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221026031936.1004280-2-zack@kde.org
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
drivers/gpu/drm/vmwgfx/vmwgfx_surface.c