[RFC PATCH 0/6] drm: Add vblank timers for devices without interrupts
Thomas Zimmermann
tzimmermann at suse.de
Thu Jun 5 15:24:38 UTC 2025
Compositors often depend on vblanks to limit their display-update
rate. Without, they see vblank events ASAP, which creates high CPU
overhead. This is especially a problem with virtual devices with fast
framebuffer access.
The series moves vkms' vblank timer to DRM and converts a number of
drivers. The final patch rate-limits the output of DRM's framebuffer
console to vblank intervals. It has been taken from [1]. It reduces
the time for doing
time find /usr/src/linux
from 24s to 20s with the patched bochs driver. Apparently the system
is spending less CPU overhead on display updates.
This is an RFC patchset to see if the approach is feasible. It's been
motivated by a recent discussion about hypervdrm [2] and other long-
standing bug reports. [3][4]
[1] https://patchwork.freedesktop.org/series/66442/
[2] https://lore.kernel.org/dri-devel/20250523161522.409504-1-mhklinux@outlook.com/T/#ma2ebb52b60bfb0325879349377738fadcd7cb7ef
[3] https://bugzilla.suse.com/show_bug.cgi?id=1189174
[4] https://invent.kde.org/plasma/kwin/-/merge_requests/1229#note_284606
Thomas Zimmermann (6):
drm/vblank: Add vblank timer
drm/vkms: Use vblank timer
drm/simpledrm: Use vblank timer
drm/bochs: Use vblank timer
drm/hypervdrm: Use vblank timer
drm/fb-helper: Synchronize dirty worker with vblank
drivers/gpu/drm/Makefile | 3 +-
drivers/gpu/drm/drm_fb_helper.c | 20 ++++
drivers/gpu/drm/drm_vblank_timer.c | 100 ++++++++++++++++++++
drivers/gpu/drm/hyperv/hyperv_drm.h | 4 +
drivers/gpu/drm/hyperv/hyperv_drm_modeset.c | 70 ++++++++++++++
drivers/gpu/drm/sysfb/simpledrm.c | 81 ++++++++++++++++
drivers/gpu/drm/tiny/bochs.c | 68 +++++++++++++
drivers/gpu/drm/vkms/vkms_crtc.c | 49 +++-------
drivers/gpu/drm/vkms/vkms_drv.h | 6 +-
include/drm/drm_vblank_timer.h | 26 +++++
10 files changed, 386 insertions(+), 41 deletions(-)
create mode 100644 drivers/gpu/drm/drm_vblank_timer.c
create mode 100644 include/drm/drm_vblank_timer.h
--
2.49.0
More information about the dri-devel
mailing list