Skip to content

drm: Add vblank timers for devices without interrupts

Thomas Zimmermann dri-devel linux-hyperv 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest4 patches 1 replyIn review
  2. v34 patches 7 repliesSuperseded
  3. v24 patches 12 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v1 RFC6 patches3 repliesSuperseded

Changes in v4 from the cover letter

- fix a race condition in drm_crtc_vblank_get_vblank_timeout() (Michael) v3:
- fix deadlock (Ville, Lyude)

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4drm/vblank: Add vblank timerDocumentation/gpu/drm-kms-helpers.rst drivers/gpu/drm/Makefile drivers/gpu/drm/drm_vblank.c +4 more+357 -30 replies
2/4drm/vblank: Add CRTC helpers for simple use casesdrivers/gpu/drm/drm_vblank_helper.c include/drm/drm_vblank_helper.h+103 -00 replies
3/4drm/vkms: Convert to DRM's vblank timerdrivers/gpu/drm/vkms/vkms_crtc.c drivers/gpu/drm/vkms/vkms_drv.h+7 -780 replies
4/4drm/hypervdrm: Use vblank timerdrivers/gpu/drm/hyperv/hyperv_drm_modeset.c+11 -01 reply

Reviews trailers per patch

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

PatchJavier Martinez CanillasMichael KelleyLouis ChauvetPrasanna Kumar T S M
1/4R-b T-b T-b R-b
2/4R-b T-b
3/4R-b T-b R-b
4/4R-b T-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v4 thread

Cover letter [PATCH v4 0/4] drm: Add vblank timers for devices without interrupts

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]

v4:
- fix a race condition in drm_crtc_vblank_get_vblank_timeout() (Michael) v3:
- fix deadlock (Ville, Lyude)
v2:
- rework interfaces

[1] https://lore.kernel.org/dri-devel/[email protected]/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                | 172 ++++++++++++++++++-
 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                    |  32 ++++
 include/drm/drm_vblank_helper.h             |  56 +++++++
 10 files changed, 478 insertions(+), 81 deletions(-)
 create mode 100644 drivers/gpu/drm/drm_vblank_helper.c
 create mode 100644 include/drm/drm_vblank_helper.h
Signature · 1 line
2.51.0