]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/vmwgfx: Convert to DRM vblank timers
authorThomas Zimmermann <tzimmermann@suse.de>
Mon, 27 Apr 2026 15:00:40 +0000 (17:00 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Mon, 4 May 2026 11:47:18 +0000 (13:47 +0200)
commit659e7e0f3db552b41f765c230aed7ac05e9d12a6
tree1c3e4020cb092131ed2b721e9919c8cce4cdf3a2
parent5c6113e07af73046ef32ac0acc9cdc15fb62c4da
drm/vmwgfx: Convert to DRM vblank timers

Replace vmwgfx's vblank timer with DRM's common implementation. The
timer handling is almost identical with a few additional bug fixes in
the common code.

Replace most of vmwgfx's vmw_vkms_get_vblank_timestamp() with the
shared helper drm_crtc_vblank_get_vblank_timeout(). The common helper
also works in the presence of delayed vblank timeouts that modify the
vblank counter concurrently.

Set the timeout handler to vmw_vkms_handle_vblank_timeout(). In addition
to handling vblank events, this function also controls CRC generation.

Remove all the hrtimer-related code from vmwgfx. DRM vblank timers
provides this.

v2:
- only cancel vblank timer in CRTC cleanup if vkms_enabled (Zack)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Zack Rusin <zack.rusin@broadcom.com>
Link: https://patch.msgid.link/20260427150250.699768-4-tzimmermann@suse.de
drivers/gpu/drm/vmwgfx/vmwgfx_kms.h
drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
drivers/gpu/drm/vmwgfx/vmwgfx_vkms.c
drivers/gpu/drm/vmwgfx/vmwgfx_vkms.h