Compositors often depend on vblanks to limit their display-update rate. Without, they see vblank events ASAP, which breaks the rate- limit feature. This creates high CPU overhead. It is especially a problem with virtual devices with fast framebuffer access.
The series moves vkms' vblank timer to DRM and converts the hyperv DRM driver. An earlier version of this series contains examples of other updated drivers. In principle, any DRM driver without vblank hardware can use the timer. The series has been motivated by a recent discussion about hypervdrm [1] and other long-standing bug reports. [2][3] [1] https://lore.kernel.org/dri-devel/20250523161522.409504-1-mhkli...@outlook.com/T/#ma2ebb52b60bfb0325879349377738fadcd7cb7ef [2] https://bugzilla.suse.com/show_bug.cgi?id=1189174 [3] https://invent.kde.org/plasma/kwin/-/merge_requests/1229#note_284606 Thomas Zimmermann (4): drm/vblank: Add vblank timer drm/vblank: Add CRTC helpers for simple use cases drm/vkms: Convert to DRM's vblank timer drm/hypervdrm: Use vblank timer Documentation/gpu/drm-kms-helpers.rst | 12 ++ drivers/gpu/drm/Makefile | 3 +- drivers/gpu/drm/drm_vblank.c | 122 +++++++++++++- drivers/gpu/drm/drm_vblank_helper.c | 176 ++++++++++++++++++++ drivers/gpu/drm/hyperv/hyperv_drm_modeset.c | 11 ++ drivers/gpu/drm/vkms/vkms_crtc.c | 83 +-------- drivers/gpu/drm/vkms/vkms_drv.h | 2 - include/drm/drm_modeset_helper_vtables.h | 12 ++ include/drm/drm_vblank.h | 28 ++++ include/drm/drm_vblank_helper.h | 56 +++++++ 10 files changed, 424 insertions(+), 81 deletions(-) create mode 100644 drivers/gpu/drm/drm_vblank_helper.c create mode 100644 include/drm/drm_vblank_helper.h -- 2.50.1